Syncfusion.XlsIO.Base
Example 


Bubbles Property (IChartSerie)

Gets or sets series values of the bubble chart.
Syntax
'Declaration
 
Property Bubbles As IRange
'Usage
 
Dim instance As IChartSerie
Dim value As IRange
 
instance.Bubbles = value
 
value = instance.Bubbles
IRange Bubbles {get; set;}
Example
For bubble chart both horizontal and vertical axes are value axes so for the first value axis we set serie value to Values property and the next value axis we make use of Bubbles property.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main(string[] args)
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet sheet = workbook.Worksheets[0];
            
            //Add data
            sheet.Range["A1"].Value = "50";
            sheet.Range["B1"].Value = "60";
            sheet.Range["C1"].Value = "5";
            sheet.Range["A2"].Value = "1";
            sheet.Range["B2"].Value = "4";
            sheet.Range["C2"].Value = "2";
            
            //Create chart
            IChart chart = sheet.Charts.Add();
            
            //Set serie
            IChartSerie serie = chart.Series.Add(ExcelChartType.Bubble);
            
            //Set values
            serie.Values = sheet.Range["A1:C1"];
            
            //Set bubble chart range
            serie.Bubbles = sheet.Range["A2:C2"];
            
            //Save and Dispose
            workbook.SaveAs("Chart.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also