> For the complete documentation index, see [llms.txt](https://docs.atomui.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atomui.com/charts/apex-charts.md).

# Apex Charts

[ApexCharts ](https://apexcharts.com/)is an open-source modern charting library that helps developers to create interactive visualizations for web pages.

#### Step 1

Add Javascript library to body

```markup
<script src="assets/vendor/apexchart/apexcharts.min.js"></script>
```

#### Step 2

Add Chart area DOM element markup

```markup
<div id="chart" class="apexcharts-canvas"></div>
```

#### Step 3

```javascript
var options = {
  chart: {
    type: 'line'
  },
  series: [{
    name: 'sales',
    data: [30,40,35,50,49,60,70,91,125]
  }],
  xaxis: {
    categories: [1991,1992,1993,1994,1995,1996,1997, 1998,1999]
  }
}

var chart = new ApexCharts(document.querySelector("#chart"), options);

chart.render();
```

{% hint style="warning" %}
To trigger resize charts use following JS Snippet

`window.dispatchEvent(new Event('resize'));`
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.atomui.com/charts/apex-charts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
