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
- Create a Bubble Chart in Excel using C#
- Free Resources
- See Also
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
Download the latest Aspose.Cells for .NET from the releases page.
Install via NuGet Package Manager:
PM> Install-Package Aspose.CellsAdd a reference to
Aspose.Cellsin 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
- Creates a workbook and fills it with sample data.
- Adds a
ChartType.Bubblechart. - Links the series’ X‑values, Y‑values, and bubble sizes to the populated ranges.
- Optionally sets axis titles and limits.
- 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
- Developer’s Guide – Comprehensive tutorials and API references: https://docs.aspose.com/cells/net/
- Online Apps – Create and edit Excel files without coding: https://products.aspose.app/cells/family
- API Reference – Full method/ property documentation: https://reference.aspose.com/cells/net/
- How‑to Articles – Real‑world scenarios and sample projects: https://blog.aspose.com/categories/aspose.cells-product-family/