Spread for ASP.NET 9.0 Product Documentation
GenerateFromCellRanges(SheetView,CellRange,CellRange,CellRange,Boolean,Boolean) Method
Example 


The sheet view.
The category.
Name of the series.
The data.
if set to true, the processing switches the row and column automatically, if necessary.
if set to true, the generating process automatically detects and creates the category if the category cell range is NULL.
Generates a chart from cell ranges.
Syntax
'Declaration
 
Public Overloads Sub GenerateFromCellRanges( _
   ByVal sheetView As SheetView, _
   ByVal category As CellRange, _
   ByVal seriesName As CellRange, _
   ByVal data As CellRange, _
   ByVal autoSwitch As Boolean, _
   ByVal autoCreateCategory As Boolean _
) 
'Usage
 
Dim instance As SpreadChart
Dim sheetView As SheetView
Dim category As CellRange
Dim seriesName As CellRange
Dim data As CellRange
Dim autoSwitch As Boolean
Dim autoCreateCategory As Boolean
 
instance.GenerateFromCellRanges(sheetView, category, seriesName, data, autoSwitch, autoCreateCategory)
public void GenerateFromCellRanges( 
   SheetView sheetView,
   CellRange category,
   CellRange seriesName,
   CellRange data,
   bool autoSwitch,
   bool autoCreateCategory
)

Parameters

sheetView
The sheet view.
category
The category.
seriesName
Name of the series.
data
The data.
autoSwitch
if set to true, the processing switches the row and column automatically, if necessary.
autoCreateCategory
if set to true, the generating process automatically detects and creates the category if the category cell range is NULL.
Example
This example uses the GenerateFromCellRanges method.
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart(typeof(FarPoint.Web.Chart.BarSeries));
chart.GenerateFromCellRanges(FpSpread1.Sheets[0], new FarPoint.Web.Spread.Model.CellRange(1, 0, 6, 1), new FarPoint.Web.Spread.Model.CellRange(0, 1, 1, 3), new FarPoint.Web.Spread.Model.CellRange(1, 1, 6, 3), true, true);
FpSpread1.Sheets[0].Charts.Add(chart);
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart(GetType(FarPoint.Web.Chart.BarSeries))
chart.GenerateFromCellRanges(FpSpread1.Sheets(0), New FarPoint.Web.Spread.Model.CellRange(1, 0, 6, 1), New FarPoint.Web.Spread.Model.CellRange(0, 1, 1, 3), New FarPoint.Web.Spread.Model.CellRange(1, 1, 6, 3), True, True)
FpSpread1.Sheets(0).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

SpreadChart Class
SpreadChart Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.