Skip to main content

HorizontalBarDataSet

Namespace: Wisej.Web.Ext.ChartJS

Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)

Specialized data set for the HorizontalBar chart.

public class HorizontalBarDataSet : BarDataSet

Inherits all the properties of BarDataSet. The bars are drawn horizontally.

Example:

this.chartJS1.ChartType = ChartType.HorizontalBar;
this.chartJS1.Labels = new[] { "Chrome", "Firefox", "Safari", "Edge" };

var share = (HorizontalBarDataSet)this.chartJS1.DataSets.Add("Browser Share");
share.Data = new object[] { 64, 8, 19, 5 };
share.BackgroundColor = new[] { Color.Teal };

Constructors​

Instance member HorizontalBarDataSet()​

Constructs a new instance of HorizontalBarDataSet.

Sets Type to HorizontalBar.

Example:

this.chartJS1.ChartType = ChartType.HorizontalBar;
this.chartJS1.DataSets.Add(new HorizontalBarDataSet
{
Label = "Tasks",
Data = new object[] { 7, 3, 12 }
});