Spread for ASP.NET 11 Product Documentation
BinType Property
Example 


FarPoint.Web.Chart Assembly > FarPoint.Web.Chart Namespace > BinOption Class : BinType Property
Gets the axis option for the histogram series.
Syntax
'Declaration
 
Public Property BinType As BinOption.HistogramBinType
'Usage
 
Dim instance As BinOption
Dim value As BinOption.HistogramBinType
 
instance.BinType = value
 
value = instance.BinType
public BinOption.HistogramBinType BinType {get; set;}
Example
This example uses categories.
FarPoint.Web.Chart.HistogramSeries hs = new FarPoint.Web.Chart.HistogramSeries();
hs.SeriesName = "Histogram Sample";
hs.Values.Add(23);
hs.Values.Add(5);
hs.Values.Add(79);
hs.Values.Add(11);
hs.Values.Add(23);
hs.Values.Add(55);
hs.Values.Add(88);
hs.Values.Add(67);
hs.Values.Add(42);
hs.Values.Add(56);
hs.Values.Add(100);
hs.Values.Add(-5);
hs.CategoryNames.Add("First");
hs.CategoryNames.Add("Second");
hs.CategoryNames.Add("Third");
hs.CategoryNames.Add("Fourth");
hs.BinOption.BinType = FarPoint.Web.Chart.BinOption.HistogramBinType.ByCategory;

FarPoint.Web.Chart.YPlotArea plotArea = new FarPoint.Web.Chart.YPlotArea();         
plotArea.Series.Add(hs);
FarPoint.Web.Chart.LegendArea legend = new FarPoint.Web.Chart.LegendArea();           
legend.AlignmentX = 1.0f;
legend.AlignmentY = 0.5f;
FarPoint.Web.Chart.ChartModel model = new FarPoint.Web.Chart.ChartModel();
model.PlotAreas.Add(plotArea);
model.LegendAreas.Add(legend);

FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart();
chart.Model = model;           
FpSpread1.ActiveSheetView.Charts.Add(chart);
Dim hs As New FarPoint.Web.Chart.HistogramSeries()
hs.SeriesName = "Histogram Sample"
hs.Values.Add(23)
hs.Values.Add(5)
hs.Values.Add(79)
hs.Values.Add(11)
hs.Values.Add(23)
hs.Values.Add(55)
hs.Values.Add(88)
hs.Values.Add(67)
hs.Values.Add(42)
hs.Values.Add(56)
hs.Values.Add(100)
hs.Values.Add(-5)
hs.CategoryNames.Add("First")
hs.CategoryNames.Add("Second")
hs.CategoryNames.Add("Third")
hs.CategoryNames.Add("Fourth")
hs.BinOption.BinType = FarPoint.Web.Chart.BinOption.HistogramBinType.ByCategory

Dim plotArea As New FarPoint.Web.Chart.YPlotArea()
plotArea.Series.Add(hs)
Dim legend As New FarPoint.Web.Chart.LegendArea()
legend.AlignmentX = 1.0F
legend.AlignmentY = 0.5F
Dim model As New FarPoint.Web.Chart.ChartModel()
model.PlotAreas.Add(plotArea)
model.LegendAreas.Add(legend)

Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart()
chart.Model = model
FpSpread1.ActiveSheetView.Charts.Add(chart)
See Also

Reference

BinOption Class
BinOption Members