├── .babelrc ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── dist ├── highcharts-vue.js └── highcharts-vue.min.js ├── package.json ├── src ├── component.js ├── index.js └── utils.js ├── types └── highcharts-vue.d.ts └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { "modules": false }] 4 | ] 5 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | example 3 | node_modules 4 | webpack.config.js -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true 4 | }, 5 | extends: [ 6 | 'eslint:recommended', 7 | 'plugin:vue/vue3-essential' 8 | ], 9 | ignorePatterns: ['**/*.d.ts'], 10 | overrides: [{ 11 | env: { 12 | node: true 13 | }, 14 | files: [ 15 | '.eslintrc.{js,cjs}' 16 | ], 17 | parserOptions: { 18 | sourceType: 'script' 19 | } 20 | }], 21 | parserOptions: { 22 | ecmaVersion: 'latest', 23 | sourceType: 'module' 24 | }, 25 | plugins: ['vue'], 26 | rules: { 27 | indent: ['error', 4], 28 | 'linebreak-style': ['error', 'unix'], 29 | quotes: ['error', 'single'], 30 | semi: ['error', 'always'], 31 | 'comma-dangle': ['error', 'never'], 32 | 'quote-props': ['error', 'as-needed'] 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | package-lock.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ### [2.0.1](https://github.com/highcharts/highcharts-vue/compare/v2.0.0...v2.0.1) (2024-03-15) 6 | * Fixed a bug related to the type definitions (on all Vue 3 global components instead of only HighchartsVue). 7 | 8 | ### [2.0.0](https://github.com/highcharts/highcharts-vue/pull/258) (2024-02-08) 9 | * ❗ **From `highcharts-vue@2.0.0`, this package will only be compatible with Vue 3.** ❗ 10 | * Added full TypeScript support for Vue 3. 11 | * Updated all the dev dependencies to the most recent versions. 12 | * Got rid of Vue 2-related dependencies and potential security vulnerabilites. 13 | * Got rid of Vue 2-specific code (and thus, reduced the bundle size). 14 | * Got rid of the demo-v2 and demo-v3 examples. 15 | 16 | ### [1.4.3](https://github.com/highcharts/highcharts-vue/compare/v1.4.2...v1.4.3) (2023-07-03) 17 | * **chart update bugfix:** Fixed #239, chart object was reactive. ([076b6de](https://github.com/highcharts/highcharts-vue/pull/240/commits/076b6debef5c6b7c7a6f14685838972a7dbb1850)) 18 | * **Highcharts version updated in demos:** ([56bed69](https://github.com/highcharts/highcharts-vue/pull/241/commits/56bed694382839fd632cf7ada765997e4b183d9b)) 19 | 20 | ### [1.4.2](https://github.com/highcharts/highcharts-vue/compare/v1.4.1...v1.4.2) (2023-06-01) 21 | * **chart object bugfix:** Fixed #235, chart object is now accessible again through ref. ([594d51c](https://github.com/highcharts/highcharts-vue/commit/c4d0f79cbf689a704fa9e27394c21b8a77ca7813)) 22 | 23 | ## [1.4.1](https://github.com/highcharts/highcharts-vue/compare/v1.4.0...v1.4.1) (2023-04-20) 24 | 25 | ### Features 26 | * **composition-api:** Added support for the Composition API. ([18532db](https://github.com/highcharts/highcharts-vue/pull/229/commits/18532db4dbb78c5a1fd89c0d79bc1579f50a20fe)) 27 | * **eslint update:** Updated Eslint version. 28 | 29 | 30 | ## [1.4.0](https://github.com/highcharts/highcharts-vue/compare/v1.3.5...v1.4.0) (2021-05-26) 31 | 32 | 33 | ### Features 34 | 35 | * **demo-v3:** Added demo-v3 scripts. ([f969c0a](https://github.com/highcharts/highcharts-vue/commit/f969c0a020bdd964f8fca75ed309ba4aabf6e979)) 36 | * **docs:** Updated the docs. ([d51b1f8](https://github.com/highcharts/highcharts-vue/commit/d51b1f814b40d3f7cbe4799699e37f1316c700ba)) 37 | * **vue:** Added support for Vue v3 apps. ([268aef1](https://github.com/highcharts/highcharts-vue/commit/268aef1ce1b41a642540ebfa4aa0c8fb58351ef8)) 38 | 39 | 40 | ### Bug Fixes 41 | 42 | * **tests:** Fixed tests, and get rid of Jest deprecation warnings. ([886187a](https://github.com/highcharts/highcharts-vue/commit/886187a335df84e40f1f5bba5dc9ba2d37e32994)) 43 | 44 | 45 | ## [1.3.5](https://github.com/highcharts/highcharts-vue/compare/v1.3.4...v1.3.5) (2019-05-29) 46 | 47 | 48 | ### Bug Fixes 49 | 50 | * **typescript:** Fixed TS1192 error, imported all from Highcharts package. Closes [#85](https://github.com/highcharts/highcharts-vue/issues/85) ([56defb6](https://github.com/highcharts/highcharts-vue/commit/56defb6)) 51 | * Fixed TypeScript definitions. ([e24dcce](https://github.com/highcharts/highcharts-vue/commit/e24dcce)) 52 | 53 | 54 | 55 | 56 | ## [1.3.4](https://github.com/highcharts/highcharts-vue/compare/v1.3.3...v1.3.4) (2019-05-22) 57 | 58 | 59 | ### Bug Fixes 60 | 61 | * **tests:** Added pre-commit tests running. Files field added to package.json. ([aed1af4](https://github.com/highcharts/highcharts-vue/commit/aed1af4)) 62 | 63 | 64 | 65 | 66 | ## [1.3.3](https://github.com/highcharts/highcharts-vue/compare/v1.3.2...v1.3.3) (2019-05-22) 67 | 68 | 69 | ### Features 70 | 71 | * **tests:** Jest tests added. ([c6c88c7](https://github.com/highcharts/highcharts-vue/commit/c6c88c7)) 72 | 73 | 74 | 75 | 76 | ## [1.3.2](https://github.com/highcharts/highcharts-vue/compare/v1.3.1...v1.3.2) (2019-05-21) 77 | 78 | 79 | ### Bug Fixes 80 | 81 | * **husky:** Including actual build in pre-commit hook. ([962d706](https://github.com/highcharts/highcharts-vue/commit/962d706)) 82 | * Infinite loop on init, when series.allAreas is set to true on map charts, closes [#80](https://github.com/highcharts/highcharts-vue/issues/80). ([9d4cf40](https://github.com/highcharts/highcharts-vue/commit/9d4cf40)) 83 | 84 | 85 | 86 | 87 | ## [1.3.1](https://github.com/highcharts/highcharts-vue/compare/v1.3.0...v1.3.1) (2019-05-09) 88 | 89 | 90 | 91 | 92 | # [1.3.0](https://github.com/highcharts/highcharts-vue/compare/v1.2.0...v1.3.0) (2019-05-09) 93 | 94 | 95 | ### Bug Fixes 96 | 97 | * **#43, #49:** Webpack and Babel updated in demo app, worldmap structure changed. ([2a74914](https://github.com/highcharts/highcharts-vue/commit/2a74914)), closes [#43](https://github.com/highcharts/highcharts-vue/issues/43) [#49](https://github.com/highcharts/highcharts-vue/issues/49) 98 | 99 | 100 | ### Features 101 | 102 | * Added 'deepCopyOnUpdate property.' ([2f87156](https://github.com/highcharts/highcharts-vue/commit/2f87156)) 103 | * Added ability to indicate a specific Highcharts instance for component. ([6392791](https://github.com/highcharts/highcharts-vue/commit/6392791)) 104 | * Added TypeScript support. Closed [#48](https://github.com/highcharts/highcharts-vue/issues/48) ([859f3f7](https://github.com/highcharts/highcharts-vue/commit/859f3f7)) 105 | * Webpack configuration and output files unified. ([e63c2bd](https://github.com/highcharts/highcharts-vue/commit/e63c2bd)) 106 | 107 | 108 | 109 | 110 | # [1.2.0](https://github.com/highcharts/highcharts-vue/compare/v1.1.0...v1.2.0) (2018-08-30) 111 | 112 | 113 | ### Bug Fixes 114 | 115 | * **update:** Fixed errors on updating, caused by mutating data. ([276df46](https://github.com/highcharts/highcharts-vue/commit/276df46)) 116 | 117 | 118 | ### Features 119 | 120 | * **husky:** Husky added. ([17c0b9d](https://github.com/highcharts/highcharts-vue/commit/17c0b9d)) 121 | 122 | 123 | 124 | 125 | # 1.1.0 (2018-08-27) 126 | 127 | 128 | ### Features 129 | 130 | * **changelog:** Added changelog. ([62da229](https://github.com/highcharts/highcharts-vue/commit/62da229)) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Highcharts Vue 2 | 3 | Copyright (c) 2018-2024, Highsoft 4 | 5 | The software in Highcharts Vue repository is free and open source, 6 | but as Highcharts Vue relies on Highcharts.js, it requires a valid 7 | Highcharts license for commercial use. 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to 15 | the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Highcharts-Vue 2 | 3 | **The official Highcharts integration with Vue.** 4 | 5 | > ❗ **_IMPORTANT NOTE:_** From `highcharts-vue@2.0.0`, this package offers support for Vue >= 3.0.0. If you'd like to use this package with Vue 2, you should stay with the latest versions of `highcharts-vue@1.x.x` (Note: [Vue2 is getting officially deprecated](https://blog.vuejs.org/posts/vue-2-eol)❗ 6 | 7 | ## Table of Contents 8 | 9 | 1. [Getting started](#getting-started) 10 | 1. [Requirements](#requirements) 11 | 2. [Installation](#installation) 12 | 2. [Usage](#usage) 13 | 1. [Registering globally as a plugin](#registering-globally-as-a-plugin) 14 | 2. [Registering locally in your component](#registering-locally-in-your-component) 15 | 3. [Implementing stockChart, mapChart and ganttChart](#implementing-stockchart-mapchart-and-ganttchart) 16 | 4. [Loading maps](#loading-maps) 17 | 5. [Changing global component tag name](#changing-global-component-tag-name) 18 | 6. [Chart callback parameter](#chart-callback-parameter) 19 | 7. [Chart object reference](#chart-object-reference) 20 | 8. [Using a specific Highcharts instance](#using-a-specific-highcharts-instance) 21 | 3. [Demo apps](#demo-apps) 22 | 4. [Online demos](#online-demos) 23 | 5. [Component Properties](#component-properties) 24 | 6. [Useful links](#useful-links) 25 | 26 | ## Getting started 27 | 28 | ### Requirements 29 | 30 | - **Node.JS**, **NPM** installed globally in your OS 31 | - **Vue**, **Highcharts** libraries (updated) installed in your project. 32 | Highcharts package version should be at least `v5.0.11`, but it is always better to keep it updated. 33 | 34 | ### Installation 35 | 36 | Install `highcharts-vue` package by: 37 | 38 | ```cli 39 | npm install highcharts-vue 40 | ``` 41 | 42 | ### Usage 43 | 44 | There are two ways of adding the Highcharts-Vue package to your project: 45 | 46 | #### Registering globally as a plugin 47 | 48 | The way described below is recommended when wanted to make the HighchartsVue component available from everywhere in your app. In your main app file should have Vue and Highcharts-Vue packages imported: 49 | 50 | ```js 51 | import Vue from "vue"; 52 | import HighchartsVue from "highcharts-vue"; 53 | ``` 54 | 55 | Next, you can register it as a plugin (depending on the version of Vue): 56 | 57 | ```js 58 | // for Vue 2 59 | Vue.use(HighchartsVue); 60 | 61 | // for Vue 3 62 | app.use(HighchartsVue); 63 | ``` 64 | 65 | #### Registering locally in your component 66 | 67 | This option is recommended for direct use in specific components of your app. First, you should import the Chart component object from highcharts-vue package in your component file: 68 | 69 | ```js 70 | import { Chart } from "highcharts-vue"; 71 | ``` 72 | 73 | Then, you can use the `Chart` component in your Vue components. 74 | 75 | _NOTE:_ 76 | _If you would like to use Highcharts-Vue integration by attaching it using `