Visualizing multi‑dimensional data is crucial for insightful analysis. A Bubble chart lets you display three data series—X‑axis, Y‑axis, and bubble size—within a single visual. In this guide you will learn how to create a Bubble chart in Excel using C# and Aspose.Cells for .NET. Whether you need to present sales performance, market share, or scientific data, the following examples will help you generate professional, export‑ready charts with just a few lines of code.

This article covers the following topics:

C# Excel Library to Create Bubble Charts

Aspose.Cells for .NET is a powerful Excel automation library that simplifies chart creation, including Bubble charts. It provides a rich API for adding data, configuring chart types, customizing series, and exporting workbooks to a variety of formats (XLSX, PDF, PNG, etc.).

Key features that make Aspose.Cells ideal for Bubble charts:

  • Strong type‑safe API – full IntelliSense support in Visual Studio.
  • Direct chart manipulation – change series type, marker size, colors, and axis settings programmatically.
  • High performance – process large data sets without UI overhead.
  • Multiple format support – save to XLSX, XLS, CSV, PDF, HTML, or images.

Getting Started

  1. Download the latest Aspose.Cells for .NET from the releases page.

  2. Install via NuGet Package Manager:

    PM> Install-Package Aspose.Cells
    
  3. Add a reference to Aspose.Cells in your C# project.

You are now ready to create Bubble charts programmatically.

Create a Bubble Chart in Excel using C#

Below are two complete, runnable examples that illustrate how to generate a Bubble chart from scratch and how to customize its appearance.

Example 1 – Basic Bubble Chart

This example creates a simple Bubble chart that shows product sales (X‑axis), profit margin (Y‑axis), and market share (bubble size).

What the code does

  1. Creates a workbook and fills it with sample data.
  2. Adds a ChartType.Bubble chart.
  3. Links the series’ X‑values, Y‑values, and bubble sizes to the populated ranges.
  4. Optionally sets axis titles and limits.
  5. Saves the workbook as BubbleChart_Basic.xlsx.

Example 2 – Customized Bubble Chart (Colors, Marker Styles, and Secondary Axis)

This example demonstrates advanced customizations such as custom bubble colors, border styles, and placing the chart on a secondary axis for better readability.

Highlights of the customization

  • Two separate bubble series (Group 1 and Group 2) with distinct colors and marker shapes.
  • The second series is plotted on a secondary axis, useful when data ranges differ.
  • Custom marker formatting (fill color, border color, weight).
  • Optional image export of the chart for inclusion in reports or web pages.

Free Resources

See Also