Spread Windows Forms 9.0 Product Documentation
GenerateFromCellRanges(SheetView,CellRange,CellRange,CellRange,Boolean) Method
Example 


The sheet view.
The category.
Name of the series.
The data.
if set to true, the procesing will switch row and column automatically if it's necessary.
Generates 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 _
) 
'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
 
instance.GenerateFromCellRanges(sheetView, category, seriesName, data, autoSwitch)
public void GenerateFromCellRanges( 
   SheetView sheetView,
   CellRange category,
   CellRange seriesName,
   CellRange data,
   bool autoSwitch
)

Parameters

sheetView
The sheet view.
category
The category.
seriesName
Name of the series.
data
The data.
autoSwitch
if set to true, the procesing will switch row and column automatically if it's necessary.
Remarks

The category parameter is for the category cell range; the seriesName parameter is for the series name cell range; and the data parameter is for the data cell range. The sheetView parameter is how the three cell ranges relate to the SheetView. This function can be used to rebuild a chart.

Example
This example uses the GenerateFromCellRanges method.
FarPoint.Win.Spread.Chart.SpreadChart chart = new FarPoint.Win.Spread.Chart.SpreadChart(typeof(FarPoint.Win.Chart.BarSeries));
chart.GenerateFromCellRanges(fpSpread1.Sheets[0], new FarPoint.Win.Spread.Model.CellRange(1, 0, 6, 1), new FarPoint.Win.Spread.Model.CellRange(0, 1, 1, 3), new FarPoint.Win.Spread.Model.CellRange(1, 1, 6, 3),true);
fpSpread1.Sheets[0].Charts.Add(chart);
Dim chart As New FarPoint.Win.Spread.Chart.SpreadChart(GetType(FarPoint.Win.Chart.BarSeries))
chart.GenerateFromCellRanges(FpSpread1.Sheets(0), New FarPoint.Win.Spread.Model.CellRange(1, 0, 6, 1), New FarPoint.Win.Spread.Model.CellRange(0, 1, 1, 3), New FarPoint.Win.Spread.Model.CellRange(1, 1, 6, 3),True)
FpSpread1.Sheets(0).Charts.Add(chart)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SpreadChart Class
SpreadChart Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.