Spread for ASP.NET 10 Product Documentation
HistogramSeries Constructor()
Example 


Creates a new series.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New HistogramSeries()
public HistogramSeries()
Example
This example creates a histogram chart.
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.BinOption.BinSize = 20;
hs.BinOption.OverFlowValue = 95;
hs.BinOption.IsOverflowBin = true;

FarPoint.Web.Chart.YPlotArea plotArea = new FarPoint.Web.Chart.YPlotArea();           
plotArea.Series.Add(hs);
FarPoint.Web.Chart.ChartModel model = new FarPoint.Web.Chart.ChartModel();
model.PlotAreas.Add(plotArea);
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.BinOption.BinSize = 20
hs.BinOption.OverFlowValue = 95
hs.BinOption.IsOverflowBin = True

Dim plotArea As New FarPoint.Web.Chart.YPlotArea()
plotArea.Series.Add(hs)
Dim model As New FarPoint.Web.Chart.ChartModel()
model.PlotAreas.Add(plotArea)
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart()
chart.Model = model
FpSpread1.ActiveSheetView.Charts.Add(chart)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

HistogramSeries Class
HistogramSeries Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.