# Charts

The charts enable you to summarize the data in your spreadsheet document and make it easily readable and understandable. With RadSpreadsheet you can show charts as well as add, remove and manipulate chart objects in your spreadsheet documents.

## Using Charts in Your Application

> important To visualize a chart, RadSpreadsheet uses [RadChartView](https://www.telerik.com/products/winforms/documentation/controls/chartview/overview), so you must add a reference to **Telerik.WinControls.ChartView\.dll**.

RadSpreadsheet enables you working with charts through its UI. You can add a chart through the **Insert Chart dialog**  which can be opened from the **Insert tab** of [RadSpreadsheetRibbonBar](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/getting-started/ribbon-ui). The dialog shows all of the available types of charts along with a preview of how the chart would look like when filled with the selected data.

> note To be able to see the charts, you must select at least two consecutive cells, otherwise you will get an error message. In case the selected cells don't contain any values, the charts will be shown empty.

#### Figure 1: Insert Chart dialog

![WinForms RadSpreadsheet Insert Chart](https://www.telerik.com/products/winforms/documentation/assets/6e75708bbb2e146e9e07f9e90e951591/radspreadsheet-features-ui-charts001.png)

## Supported Chart Types

### Column Charts

Column/bar charts are used to display values as sets of vertical columns, grouped by category. The length of the bars is proportional to the values that they represent. With this type of charts you can easily compare values in different categories.

| Clustered column                                                                                                                                                                    |                                                                                    Stacked column                                                                                   |                                                                                                                                                                      100% stacked column |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![WinForms RadSpreadsheet Cluster Column](https://www.telerik.com/products/winforms/documentation/assets/3b67c65f1bddfebf7c46ab5af9a8ba86/radspreadsheet-features-ui-charts002.png) | ![WinForms RadSpreadsheet Stacked column](https://www.telerik.com/products/winforms/documentation/assets/1227cbe80aa9612bbaca531cbcc2edf5/radspreadsheet-features-ui-charts003.png) | ![WinForms RadSpreadsheet 100% stacked column](https://www.telerik.com/products/winforms/documentation/assets/f820d25caedacbf0e38d2b7b0c0eb57c/radspreadsheet-features-ui-charts004.png) |

### Bar Charts

Bar charts are analogical to the column charts, except the orientation of the bars. These charts use horizontal bars instead of vertical columns to display the values and their categories.

| Clustered bar                                                                                                                                                                      |                                                                                    Stacked bar                                                                                    |                                                                                                                                                                      100% stacked bar |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![WinForms RadSpreadsheet Clustered bar](https://www.telerik.com/products/winforms/documentation/assets/dcb0ad85a1d2fda77ba1112598a600f8/radspreadsheet-features-ui-charts005.png) | ![WinForms RadSpreadsheet Stacked bar ](https://www.telerik.com/products/winforms/documentation/assets/2d69076b015a9f9d82421382dc67e247/radspreadsheet-features-ui-charts006.png) | ![WinForms RadSpreadsheet 100% stacked bar](https://www.telerik.com/products/winforms/documentation/assets/7cae15b8d013e70d47631288207b7f96/radspreadsheet-features-ui-charts007.png) |

### Line Charts

The line chart shows the category data distributed on the horizontal axis and all the values are distributed along the vertical axis. With this type of charts you can visualize continuous data over time on an evenly scaled axis. It is pretty helpful when you need to show trends in data at equal intervals, like months, years, or other periods.

| Line                                                                                                                                                                             |                                                                                    Stacked line                                                                                   |                                                                                                                                                     100% stacked line |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![WinForms RadSpreadsheet Line Charts](https://www.telerik.com/products/winforms/documentation/assets/9c071033c24d1bb7b547aab7773e97d8/radspreadsheet-features-ui-charts008.png) | ![WinForms RadSpreadsheet Stacked line](https://www.telerik.com/products/winforms/documentation/assets/fd2b0b4e92b8dbb24b8f104db6243739/radspreadsheet-features-ui-charts009.png) | ![WinForms RadSpreadsheet ](https://www.telerik.com/products/winforms/documentation/assets/3f1aa63f9828821a8114fd051444b131/radspreadsheet-features-ui-charts010.png) |

| Line with Markers                                                                                                                                                     |                                                                       Stacked line with Markers                                                                       |                                                                             100% stacked line with Markers                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![WinForms RadSpreadsheet ](https://www.telerik.com/products/winforms/documentation/assets/52390c0de2f8d2e8984e01da017c096e/radspreadsheet-features-ui-charts011.png) | ![WinForms RadSpreadsheet ](https://www.telerik.com/products/winforms/documentation/assets/2817acaea87f5b1cbac57b621df00e9c/radspreadsheet-features-ui-charts012.png) | ![WinForms RadSpreadsheet 100% stacked line](https://www.telerik.com/products/winforms/documentation/assets/80bfcd1e680f24ce923156ff307be97b/radspreadsheet-features-ui-charts013.png) |

### Scatter and Bubble Charts

Scatter and bubble charts provide you with a convenient way to display a lot of related data in a single chart. In scatter charts, the x-axis displays one numeric field and the y-axis displays another. This type of plotting the data makes it easy to see the relationship between the two values for all the items in the chart.

In a bubble chart, a third numeric field determines the size of the data points represented as bubbles.

| Scatter                                                                                                                                                                                          | Scatter with Smooth Lines                                                                                                                                                                                    | Scatter with Smooth Lines and Markers                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![WinForms RadSpreadsheet Scatter](https://www.telerik.com/products/winforms/documentation/assets/95d0c3e2302029bb424483c1988ff22f/radspreadsheet-features-ui-charts014.png)                     | ![WinForms RadSpreadsheet Scatter with Smooth Lines](https://www.telerik.com/products/winforms/documentation/assets/c7b7a91e03a1be760dd951ad61bfb384/radspreadsheet-features-ui-charts015.png)               | ![WinForms RadSpreadsheet Scatter with Smooth Lines and Markers](https://www.telerik.com/products/winforms/documentation/assets/5d850c3305857090b7b63869f12d0391/radspreadsheet-features-ui-charts016.png) |
| Scatter with Straight Lines                                                                                                                                                                      | Scatter with Straight Lines and Markers                                                                                                                                                                      | Bubble                                                                                                                                                                                                     |
| ![WinForms RadSpreadsheet Scatter with Straight Lines](https://www.telerik.com/products/winforms/documentation/assets/fc1ae6084a09d32ebcf519e3f5164335/radspreadsheet-features-ui-charts017.png) | ![WinForms RadSpreadsheet Scatter with Straight Lines and Markers](https://www.telerik.com/products/winforms/documentation/assets/e981b89f56fea396c4a09ba213b9ea2e/radspreadsheet-features-ui-charts018.png) | ![WinForms RadSpreadsheet Bubble](https://www.telerik.com/products/winforms/documentation/assets/0aab0fef3bb403ba434fd35bab64e9e8/radspreadsheet-features-ui-charts019.png)                                |

### Pie and Doughnut Charts

Pie charts are useful for comparing the values of different points in a single series. The data points in a pie chart are shown as a percentage of the whole pie. The doughnut chart is identical to the pie. However, it can contain more than a single series and can be visualized with a hole in the middle of the shape.

| Pie                                                                                                                                                                      | Doughnut                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![WinForms RadSpreadsheet Pie](https://www.telerik.com/products/winforms/documentation/assets/84d61d4991eb9a1d9022496a5c234cc3/radspreadsheet-features-ui-charts020.png) | ![WinForms RadSpreadsheet Doughnut](https://www.telerik.com/products/winforms/documentation/assets/312de9015a7ef09e80e3c894b110149a/radspreadsheet-features-ui-charts021.png) |

### Area Charts

Area charts can be used to plot change over time and draw attention to the total value across a trend. Since the area chart shows the sum of the plotted values as well, it visualized how the different parts contribute to the end result of the data.

| Clustered area                                                                                                                                                                      |                                                                                    Stacked area                                                                                   |                                                                                                                                                                      100% stacked area |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ![WinForms RadSpreadsheet Clustered area](https://www.telerik.com/products/winforms/documentation/assets/76273f6387af4dcee00327d2456c1589/radspreadsheet-features-ui-charts022.png) | ![WinForms RadSpreadsheet Stacked area](https://www.telerik.com/products/winforms/documentation/assets/f3b4b201ec89b933c750aa40e9feddb7/radspreadsheet-features-ui-charts023.png) | ![WinForms RadSpreadsheet 100% stacked area](https://www.telerik.com/products/winforms/documentation/assets/1f995d3418ec414d3cd3e6a1f40b6341/radspreadsheet-features-ui-charts024.png) |

## Manipulating Charts in Code

You can work with charts programmatically as well. For more information about the available API, refer to the documentation of the library used as a model of RadSpreadsheet - RadSpreadProcessing: [Charts API](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/charts/overview).

## Exporting Charts to PDF

To export a chart element to PDF, you will need to implement an additional renderer which can draw the chart in the PDF document. For more details on how you can implement this renderer, refer to the [Export Chart to PDF](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/charts/pdf-export.html) topic for RadSpreadProcessing and the [Export Chart SDK example](https://github.com/telerik/document-processing-sdk/tree/master/SpreadProcessing/ExportChart).

## See Also

* [RadChartView](https://www.telerik.com/products/winforms/documentation/controls/chartview/overview)
