highcharts-vue is the official integration package for using the Highcharts charting library within Vue.js applications. Currently at version 2.0.1, it provides first-class support exclusively for Vue 3 applications. The 2.x.x series represents a major shift, with previous 1.x.x versions supporting Vue 2. This package requires both `vue` (>=3.0.0) and `highcharts` (>=5.0.0) as peer dependencies, which must be installed separately. It facilitates declarative chart rendering, module loading, and interaction with the underlying Highcharts chart instance. The project maintains an active release cadence, with recent updates focusing on Vue 3 features and documentation. Its primary differentiator is being the official Highcharts integration, ensuring optimal compatibility and adherence to best practices for Vue developers.
npm install highcharts-vueVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to locally register the `Chart` component, render a basic line chart with a required `options` prop, and enable the exporting module.
For Vue 3 projects, ensure `vue` is upgraded to `^3.0.0`. For existing Vue 2 projects, pin `highcharts-vue` to `~1.x.x` (e.g., `npm install highcharts-vue@^1`).
Before using a module, ensure `import Highcharts from 'highcharts'` and `import moduleInit from 'highcharts/modules/modulename'`. Then call `moduleInit(Highcharts)`.
Ensure `npm install vue highcharts` (or `yarn add vue highcharts`) is executed in your project, with versions that satisfy the `highcharts-vue` peer dependency ranges (Vue >=3.0.0, Highcharts >=5.0.0 for 2.x versions).
For Vue 3, ensure you are using `app.use(HighchartsVue)` where `app` is the result of `createApp()`. For Vue 2, use `Vue.use(HighchartsVue)`.
Provide a valid Highcharts configuration object to the component via the `:options` prop: `<HighchartsChart :options='chartOptions' />`. This prop is mandatory.
Ensure `import Highcharts from 'highcharts'` is present. For Highcharts modules, confirm that `import moduleInit from 'highcharts/modules/modulename'` and `moduleInit(Highcharts)` are called before the chart is rendered.