Skip to content

Commit 4db53f4

Browse files
authored
Update chart-data.md
1 parent d07f83b commit 4db53f4

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

libraries/radspreadprocessing/features/charts/chart-data.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,28 @@ The **FormulaChartData** type is abstract and it is implemented by the **Workboo
3030

3131
{{region radspreadprocessing-features-charts-chart-data_0}}
3232

33-
Workbook workbook = new Workbook();
34-
Worksheet worksheet = workbook.Worksheets.Add();
35-
FloatingChartShape chartShape = new FloatingChartShape(worksheet, new CellIndex(1, 1), new CellRange(1, 1, 1, 1), ChartType.Column)
36-
{
37-
Width = 400,
38-
Height = 200
39-
};
40-
41-
DocumentChart chart = chartShape.Chart;
42-
BarSeriesGroup barSeriesGroup = chart.SeriesGroups.First() as BarSeriesGroup;
43-
barSeriesGroup.BarDirection = BarDirection.Column;
44-
45-
StringChartData barCategoryData = new StringChartData(new List<string> { "New", "In Progress", "Ready for Test", "Done", "Declined" });
46-
NumericChartData barValueScore1Data = new NumericChartData(new List<double> { 75.31, 66.3, 62.78, 61.72, 63.9 });
47-
NumericChartData barValueScore2Data = new NumericChartData(new List<double> { 78.56, 70.7, 67.63, 66.71, 63.9 });
48-
barSeriesGroup.Series.Remove(barSeriesGroup.Series.First());
49-
barSeriesGroup.Series.Add(barCategoryData, barValueScore1Data);
50-
barSeriesGroup.Series.Add(barCategoryData, barValueScore2Data);
51-
worksheet.Charts.Add(chartShape);
52-
53-
worksheet.Charts[0].Chart.SeriesGroups.First().Series.First().Title = new TextTitle("Team 1");
54-
worksheet.Charts[0].Chart.SeriesGroups.First().Series.Last().Title = new TextTitle("Team 2");
33+
Workbook workbook = new Workbook();
34+
Worksheet worksheet = workbook.Worksheets.Add();
35+
FloatingChartShape chartShape = new FloatingChartShape(worksheet, new CellIndex(1, 1), new CellRange(1, 1, 1, 1), ChartType.Column)
36+
{
37+
Width = 400,
38+
Height = 200
39+
};
40+
41+
DocumentChart chart = chartShape.Chart;
42+
BarSeriesGroup barSeriesGroup = chart.SeriesGroups.First() as BarSeriesGroup;
43+
barSeriesGroup.BarDirection = BarDirection.Column;
44+
45+
StringChartData barCategoryData = new StringChartData(new List<string> { "New", "In Progress", "Ready for Test", "Done", "Declined" });
46+
NumericChartData barValueScore1Data = new NumericChartData(new List<double> { 75.31, 66.3, 62.78, 61.72, 63.9 });
47+
NumericChartData barValueScore2Data = new NumericChartData(new List<double> { 78.56, 70.7, 67.63, 66.71, 63.9 });
48+
barSeriesGroup.Series.Remove(barSeriesGroup.Series.First());
49+
barSeriesGroup.Series.Add(barCategoryData, barValueScore1Data);
50+
barSeriesGroup.Series.Add(barCategoryData, barValueScore2Data);
51+
worksheet.Charts.Add(chartShape);
52+
53+
worksheet.Charts[0].Chart.SeriesGroups.First().Series.First().Title = new TextTitle("Team 1");
54+
worksheet.Charts[0].Chart.SeriesGroups.First().Series.Last().Title = new TextTitle("Team 2");
5555

5656
{{endregion}}
5757

0 commit comments

Comments
 (0)