PolarAreaDataSet
Namespace: Wisej.Web.Ext.ChartJS
Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)
Specialized data set for the PolarArea chart.
- C#
- VB.NET
public class PolarAreaDataSet : DataSet
Public Class PolarAreaDataSet
Inherits DataSet
Add creates a PolarAreaDataSet when ChartType is PolarArea. Each value in Data is a segment, usually with its own color.
Example:
this.chartJS1.ChartType = ChartType.PolarArea;
this.chartJS1.Labels = new[] { "Speed", "Power", "Range" };
var ds = (PolarAreaDataSet)this.chartJS1.DataSets.Add("Ratings");
ds.Data = new object[] { 8, 6, 9 };
ds.BackgroundColor = new[] { Color.Tomato, Color.Gold, Color.MediumSeaGreen };
Constructors
PolarAreaDataSet()
Constructs a new instance of PolarAreaDataSet.
Example:
this.chartJS1.ChartType = ChartType.PolarArea;
this.chartJS1.DataSets.Add(new PolarAreaDataSet
{
Label = "Ratings",
Data = new object[] { 8, 6, 9 }
});
Properties
BackgroundColor
Color[]: Returns or sets the fill colors of the data set. One entry is the default color for all the segments, otherwise each segment can define a background color.
Value: An array of Color values, usually one for each value in Data, or null to use the Chart.js default.
Hides BackgroundColor. When the array contains a single color, it's sent to Chart.js as a single value applied to all the segments.
Example:
var ds = (PolarAreaDataSet)this.chartJS1.DataSets.Add("Skills");
ds.Data = new object[] { 7, 9, 5, 6 };
ds.BackgroundColor = new[]
{
Color.FromArgb(150, Color.Red), Color.FromArgb(150, Color.Blue),
Color.FromArgb(150, Color.Green), Color.FromArgb(150, Color.Orange)
};
BorderColor
Color[]: Returns or sets the border colors of the data set. One entry is the default color for all the segments, otherwise each segment can define a different border color.
Value: An array of Color values, or null to use the Chart.js default.
Hides BorderColor. When the array contains a single color, it's sent to Chart.js as a single value applied to all the segments.
Example:
var ds = (PolarAreaDataSet)this.chartJS1.DataSets.Add("Wind");
ds.BorderColor = new[] { Color.DimGray };
ds.BorderWidth = 1;
HoverBackgroundColor
Color[]: Returns or sets the hover colors of the data set. One entry is the default color for all the segments, otherwise each segment can define a different hover background color.
Value: An array of Color values, or null to use the Chart.js default.
Maps to the Chart.js dataset "hoverBackgroundColor" property. When the array contains a single color, it's sent to Chart.js as a single value applied to all the segments.
Example:
var ds = (PolarAreaDataSet)this.chartJS1.DataSets.Add("Load");
ds.HoverBackgroundColor = new[] { Color.FromArgb(220, Color.Orange) };