PieOptions
Namespace: Wisej.Web.Ext.ChartJS
Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)
Options for the Pie chart.
- C#
- VB.NET
public class PieOptions : Options
Public Class PieOptions
Inherits Options
The Options property returns an instance of this class when ChartType is Pie. This class doesn't add any option to the shared options defined in Options.
Example:
this.chartJS1.ChartType = ChartType.Pie;
var options = (PieOptions)this.chartJS1.Options;
options.Legend.Position = HeaderPosition.Left;
options.Title.Text = "Market Share";
Constructors
PieOptions()
Default constructor.
Creates a standalone PieOptions set that is not yet attached to a ChartJS control. Assign it to the Options property of a pie chart.
Example:
var options = new PieOptions();
options.Legend.Display = false;
this.chartJS1.ChartType = ChartType.Pie;
this.chartJS1.Options = options;
PieOptions(chart, defaults)
Constructs a new instance of the PieOptions set.
| Name | Type | Description |
|---|---|---|
| chart | ChartJS | The ChartJS that owns this set of options. |
| defaults | Options | Default options to copy from. Can be null. |
When defaults is not null, the properties shared with it (for example Title, Legend or Tooltips) are copied into the new instance, which is how the chart preserves the common settings when ChartType changes. The ChartJS control creates this instance automatically when ChartType is Pie.
Example:
var options = new PieOptions(this.chartJS1, this.chartJS1.Options);
options.Tooltips.Enabled = false;
this.chartJS1.Options = options;