Spread WinRT Documentation > Developer's Guide > Working with Charts > Creating Charts > Creating Chart Types > Adding a Bubble Chart |
You can create bubble charts as shown in the following image.
The following code creates a bubble chart.
CS |
Copy Code |
---|---|
GrapeCity.Xaml.SpreadSheet.Data.SpreadBubbleSeries ds = new GrapeCity.Xaml.SpreadSheet.Data.SpreadBubbleSeries(); ds.XValues.Add(2); ds.XValues.Add(3); ds.XValues.Add(5); ds.Values.Add(3); ds.Values.Add(6); ds.Values.Add(4); ds.SizeValues.Add(3); ds.SizeValues.Add(6); ds.SizeValues.Add(4); GrapeCity.Xaml.SpreadSheet.Data.SpreadChart sc = gcSpreadSheet1.ActiveSheet.AddChart("chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.Bubble, 50, 50, 500, 400); sc.DataSeries.Add(ds); |
VB |
Copy Code |
---|---|
Dim ds As New GrapeCity.Xaml.SpreadSheet.Data.SpreadBubbleSeries() ds.XValues.Add(2) ds.XValues.Add(3) ds.XValues.Add(5) ds.Values.Add(3) ds.Values.Add(6) ds.Values.Add(4) ds.SizeValues.Add(3) ds.SizeValues.Add(6) ds.SizeValues.Add(4) Dim sc = gcSpreadSheet1.ActiveSheet.AddChart("chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.Bubble, 50, 50, 500, 400) sc.DataSeries.Add(ds) |