> Markdown version of [Migrating from earlier versions](https://vaadin.com/docs/v23/components/charts/migrating-from-earlier-versions). Section index: [llms.txt](https://vaadin.com/docs/v23/components/llms.txt)

# <a id="charts.migratingfromearlierversions"></a>Migrating from Earlier Versions

Charts 9 comes with new chart types and brings back the API to style from Java.

## <a id="summary"></a>Summary

- Upgraded to Highcharts 8.1

- Styling can be done either with CSS or Java API (default)

- New chart types:

  - ["Bullet Chart"](https://vaadin.com/docs/v23/components/charts/charttypes.md#charts.charttypes.bullet)

  - ["Organization Chart"](https://vaadin.com/docs/v23/components/charts/charttypes.md#charts.charttypes.organization)

  - ["Timeline Chart"](https://vaadin.com/docs/v23/components/charts/charttypes.md#charts.charttypes.timeline)

  - ["X-Range Chart"](https://vaadin.com/docs/v23/components/charts/charttypes.md#charts.charttypes.xrange)

- Java API for lazy drill-down

## <a id="migration-guide"></a>Migration Guide

If you are migrating your project to platform V17, there might be different approaches related with which styling option you pick.

> **Caution: Both CSS and Java styling can’t be used in the same project**
>
> While no error is thrown if different styling methods are used in the same project, **only one method should be used across all charts**, since having both could lead to unexpected results.

### <a id="from-a-v8-or-older-project"></a>From a V8 or Older Project

#### <a id="using-java-api-styling"></a>Using Java API Styling

Since V17 uses Java API for styling by default, there’s no needed to do any extra step.

> **Note:** There might be small changes for APIs that no longer work between the Highcharts versions used for V8 and V17.

#### <a id="using-css-styling"></a>Using CSS Styling

If you want to convert your project to use CSS styling, enable it by setting `styledMode` to `true`:

```java
Chart chart = new Chart();
Configuration conf = chart.getConfiguration();
conf.getChart().setStyledMode(true);
```

For more detailed instructions, see the ["CSS Styling guide"](https://vaadin.com/docs/v23/components/charts/css-styling.md)

### <a id="from-a-v10-project"></a>From a V10+ Project

#### <a id="using-java-api-styling-2"></a>Using Java API Styling

If your project doesn’t have any Charts custom theme, then there’s no extra step needed to do.

In the other hand, if it has custom themes, then they should be removed, along aside their `@CssImport` annotations. You can, then, use the Java API for styling the charts.

#### <a id="using-css-styling-2"></a>Using CSS Styling

To keep using CSS styling, enable the `styledMode` as described on this same topic at the previous section.

### <a id="running-charts-9-in-v14"></a>Running Charts 9 in V14

While Charts 9 is released for V17, a project running V14 in **npm mode** could use the new Charts by overriding the version in the Project Object Model (POM) file:

pom.xml

```xml
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-charts-flow</artifactId>
    <version>9.0.0</version>
</dependency>
```

> **Note:** Check the latest version on the [Charts release page](https://github.com/vaadin/vaadin-charts-flow/releases).

Then, to start using it, see the [From a V10+ Project](#from-a-v10-project) instructions presented on this page.

`CA191212-B228-4F07-9F40-BC0C68F84FA0`
