Create Tornado Charts in Excel using C#

A tornado chart is a powerful tool for comparing data points and visualizing potential variations. In this blog post, we will learn how to create a tornado chart in Excel using C#. This article will teach you how to make cool charts and graphs you can add right into your apps, with easy-to-follow instructions!

This article covers the following topics:

C# API to Create Tornado Charts in Excel

Aspose.Cells for .NET is a powerful API that enables developers to create, manipulate, and convert Excel files without requiring Microsoft Excel. Among its many features, it provides a comprehensive charting capability to generate and manage charts within spreadsheets.

To leverage the API, please download the DLL or install it from NuGet using the following command:

PM> Install-Package Aspose.Cells 

Create a Tornado Chart in Excel using C#

Now, we can easily create a tornado chart in an Excel worksheet by following the steps below:

  1. Load the Excel file using the Workbook class.
  2. Get the desired worksheet into a Worksheet class object.
  3. Optionally, insert data into the worksheet.
  4. Add a stacked bar chart using the Charts.Add() method.
  5. Access the chart by its index in a Chart class object.
  6. Set the data source for the chart using the SetChartDataRange() method.
  7. Set the required properties for the chart.
  8. Finally, save the document using the Save() method

The following code sample shows how to create a tornado chart in Excel using C#.

Create a Tornado Chart in Excel using C#

Create a Tornado Chart in Excel using C#

Insert Data and Create a Tornado Chart in Excel

In the previous section, we created a tornado chart using a worksheet with pre-populated data. We can also insert data into an Excel worksheet using the PutValue() method of the Cells class. The rest of the process for creating a tornado chart will remain the same.

The following code sample shows how to insert data and then create a tornado chart in Excel using C#.

Insert Data and Create a Tornado Chart in Excel

Insert Data and Create a Tornado Chart in Excel

Get a Free License

Please get a free temporary license to create tornado charts in Excel without trial restrictions. Our “Temporary License” page provides easy-to-follow instructions to claim your free license in no time.

Tornado Charts in Excel – Free Resources

Besides creating tornado charts in Excel using C#, you can explore more about various other features of the library using the resources below:

  • Developer’s guide - Learning resources including step-by-step guides, code snippets, and recommended approaches with access to API references.
  • Free online applications - Free online apps to edit, view, convert, merge and more.
  • Blog - Cutting-edge feature details and comprehensive guides to the newest functionalities.

Conclusion

In this article, we have learned how to create tornado charts in Excel with C#. From inserting data in an Excel worksheet to creating charts and setting chart properties, Aspose.Cells for .NET API provides a comprehensive set of features for data visualization. By following the steps outlined in this article, you can easily integrate tornado charts into your applications.

In case of any ambiguity, please feel free to contact us on our free support forum.

See Also