GrapeCity.Xaml.SpreadSheet.Data
DataFormula Property
Example 


Gets or sets the data formula. This action will re-build the chart's series.
Syntax
'Declaration
 
Public Property DataFormula As String
'Usage
 
Dim instance As SpreadChart
Dim value As String
 
instance.DataFormula = value
 
value = instance.DataFormula
public string DataFormula {get; set;}

Property Value

The data formula.
Remarks
This property is not designed for persisting so you should save and re-use the value and access infrequently.
Example
This example uses the DataFormula property.
object[,] values = {{"","Dep1","Dep2","Dep3","Dep4"},
                               {"a",12,13,14,15},
                               {"b",20,15,25,16},
                               {"c",4,9,5,11},
                               {"d",15,10,18,12},
                               {"d",17,6,14,11}};
GcSpreadSheet1.ActiveSheet.SetArray(0, 0, values);
GrapeCity.Xaml.SpreadSheet.Data.SpreadChart chart = GcSpreadSheet1.ActiveSheet.AddChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.ColumnClustered, 0, 0, 400, 400);
chart.ItemsFormula = "Sheet1!$A$2:$A$6";
chart.NameFormula = "Sheet1!$B$1:$E$1";
chart.DataFormula = "Sheet1!$B$2:$E$6";
Dim values As Object(,) = {{"", "Dep1", "Dep2", "Dep3", "Dep4"}, {"a", 12, 13, 14, 15}, {"b", 20, 15, 25, 16}, {"c", 4, 9, 5, 11}, {"d", 15, 10, 18, 12}, {"d", 17, 6, 14, 11}}
GcSpreadSheet1.ActiveSheet.SetArray(0, 0, values)
Dim chart As GrapeCity.Xaml.SpreadSheet.Data.SpreadChart = GcSpreadSheet1.ActiveSheet.AddChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.ColumnClustered, 0, 0, 400, 400)
chart.ItemsFormula = "Sheet1!$A$2:$A$6"
chart.NameFormula = "Sheet1!$B$1:$E$1"
chart.DataFormula = "Sheet1!$B$2:$E$6"
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

SpreadChart Class
SpreadChart Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options