@fabriq/apexcharts

中文文档
3.37.0发布于 2025/08/17MITTypeScriptCommonJS近 30 天下载 3358

A JavaScript Chart Library

原始使用文档
文档目录22 节
  1. Browsers support
  2. Download and Installation
  3. Wrappers for Vue/React/Angular/Stencil
  4. Unofficial Wrappers
  5. Usage
  6. A little more than the basic
  7. Interactivity
  8. Dynamic Series Update
  9. Annotations
  10. Mixed Charts
  11. Candlestick
  12. Heatmaps
  13. Gauges
  14. Sparklines
  15. Need Advanced Data Grid for your next project?
  16. What's included
  17. Using it with IE11
  18. Development
  19. Where do I go next?
  20. Contacts
  21. Dependency
  22. License

License build downloads ver size prettier jsdelivr

A modern JavaScript charting library that allows you to build interactive data visualizations with simple API and 100+ ready-to-use samples. Packed with the features that you expect, ApexCharts includes over a dozen chart types that deliver beautiful, responsive visualizations in your apps and dashboards. ApexCharts is an MIT-licensed open-source project that can be used in commercial and non-commercial projects.


Browsers support

Firefox
Firefox
Chrome
Chrome
Safari
Safari
Edge
Edge
IE
IE11
31+ ✔35+ ✔6+ ✔Edge ✔(IE11) ✔

Download and Installation

Installing via npm
npm install apexcharts --save
Direct <script> include
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>

Wrappers for Vue/React/Angular/Stencil

Integrate easily with 3rd party frameworks

Unofficial Wrappers

Useful links to wrappers other than the popular frameworks mentioned above

Usage

import ApexCharts from 'apexcharts'

To create a basic bar chart with minimal configuration, write as follows:

var options = {
  chart: {
    type: 'bar'
  },
  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()

This will render the following chart

A little more than the basic

You can create a combination of different charts, sync them and give your desired look with unlimited possibilities. Below is an example of synchronized charts with github style.

Interactivity

Zoom, Pan, and Scroll through data. Make selections and load other charts using those selections. An example showing some interactivity

interactive chart

Dynamic Series Update

Another approach is to Drill down charts where one selection updates the data of other charts. An example of loading dynamic series into charts is shown below

dynamic-loading-chart

Annotations

Annotations allow you to write custom text on specific values or on axes values. Valuable to expand the visual appeal of your chart and make it more informative.

annotations

Mixed Charts

You can combine more than one chart type to create a combo/mixed chart. Possible combinations can be line/area/column together in a single chart. Each chart type can have its own y-axis.

annotations

Candlestick

Use a candlestick chart (a common financial chart) to describe price changes of a security, derivative, or currency. The below image shows how you can use another chart as a brush/preview pane which acts as a handle to browse the main candlestick chart.

candlestick

Heatmaps

Use Heatmaps to represent data through colors and shades. Frequently used with bigger data collections, they are valuable for recognizing patterns and areas of focus.

heatmap

Gauges

The tiny gauges are an important part of a dashboard and are useful in displaying single-series data. A demo of these gauges:

radialbar-chart

Sparklines

Utilize sparklines to indicate trends in data, for example, occasional increments or declines, monetary cycles, or to feature the most extreme and least values:

sparkline-chart

Need Advanced Data Grid for your next project?

We partnered with Infragistics, creators of the fastest data grids on the planet! Ignite UI Grids can handle unlimited rows and columns of data while providing access to custom templates and real-time data updates.

Featuring an intuitive API for easy theming and branding, you can quickly bind to data with minimal hand-on coding. The grid is available in most of your favorite frameworks:

Angular Data Grid | React Data Grid | Blazor Data Grid | Web Components DataGrid | jQuery Data Grid

What's included

The download bundle includes the following files and directories providing a minified single file in the dist folder. Every asset including icon/css is bundled in the js itself to avoid loading multiple files.

apexcharts/
├── dist/
│   └── apexcharts.min.js
├── src/
│   ├── assets/
│   ├── charts/
│   ├── modules/
│   ├── utils/
│   └── apexcharts.js
└── samples/

Using it with IE11

If you need to make it work with IE11, you need to include these polyfills before including ApexCharts

Development

Install dependencies and run the project

npm install
npm run dev

This will start the webpack watch and any changes you make to src folder will auto-compile and output will be produced in the dist folder.

Minifying the src

npm run build

Where do I go next?

Head over to the documentation section to read more about how to use different kinds of charts and explore all options.

Contacts

Email: [email protected]

Twitter: @apexcharts

Facebook: fb.com/apexcharts

Dependency

ApexCharts uses SVG.js for drawing shapes, animations, applying svg filters, and a lot more under the hood. The library is bundled in the final build file, so you don't need to include it.

License

ApexCharts is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.

版本与发布记录

@fabriq/apexcharts 共发布 1 个版本,首次发布于 2025/08/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.37.0latest2025/08/171.2 年前

关于 @fabriq/apexcharts 的常见问题

@fabriq/apexcharts 是什么?

A JavaScript Chart Library

如何安装 @fabriq/apexcharts?

在项目目录运行 npm install @fabriq/apexcharts,或使用 pnpm add / yarn add / bun add。

@fabriq/apexcharts 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fabriq/apexcharts 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@fabriq/apexcharts 可以商用吗?

@fabriq/apexcharts 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fabriq/apexcharts 的下载量有多少?

根据 npm 官方下载统计,@fabriq/apexcharts 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,358 次,日均约 112 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fabriq/apexcharts 还在维护吗?

最新版本 3.37.0 发布于 2025/08/17(1.2 年前);至今共发布 1 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/08/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。