![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@adrianbrs/vue3-highcharts
Advanced tools
A simple, fast, Vue 3 component for rendering Highcharts.js Charts written using the composition API.
A simple, fast, Vue 3 component for rendering Highcharts.js Charts written using the composition API.
Demos https://smithalan92.github.io/vue3-highcharts/
Fork of smithalan92's project
Vue@3.0.0 Highcharts@8.0.0 ( older versions may work but not tested )
Vue and Highcharts are not bundled with the module and need to be included in your projects dependencies.
Install with npm
npm i --save vue3-highcharts
You can register the component in 2 ways.
import { createApp } from 'vue';
import VueHighcharts from 'vue3-highcharts';
const app = createApp(..options);
app.use(VueHighcharts);
import VueHighcharts from "vue3-highcharts";
export default {
name: "MyChart",
components: {
VueHighcharts,
},
};
The following props can be passed to the component. Options is the only required one.
Name | Type | Required | Default | Notes |
---|---|---|---|---|
type | String | no | 'chart' | This should be the constructor type you'd use with highcharts. If you import the stock chat, you can pass 'stockChart' as this option for example. |
options | Object | yes | - | This should be a Highcharts chart options object |
redrawOnUpdate | Boolean | no | true | If the chart should be redrawn when options update. |
oneToOneUpdate | Boolean | no | false | If the certain collections should be updated one to one. See here. |
animateOnUpdate | Boolean | no | true | If the redraw should be animated. |
The following events are emitted from the component. No data is provided with any event.
Name | Notes |
---|---|
rendered | Emitted when the chart has been rendered on the dom |
updated | Emitted when the chart options have been updated and the chart has been updated |
destroyed | Emitted when the Highcharts chart instance has been destroyed ( happens when the component unmounts ) |
The Highcharts chart object is also exposed on the component instance as chart
A wrapper div is also created with a .vue-highcharts
class around the actual chart.
<template>
<vue-highcharts
type="chart"
:options="chartOptions"
:redrawOnUpdate="true"
:oneToOneUpdate="false"
:animateOnUpdate="true"
@rendered="onRender"
@update="onUpdate"
@destroy="onDestroy"
/>
</template>
<script>
import { ref } from 'vue';
export default {
name: 'chart',
setup() {
const data = ref([1, 2, 3])
const chartData = computed(() =>{
return {
series: [{
name: 'Test Series',
data: data.value,
}],
}
});
const onRender = () => {
console.log('Chart rendered');
};
const onUpdate = () => {
console.log('Chart updated');
};
const onDestroy = () => {
console.log('Chart destroyed');
};
return {
chartData,
onRender,
onUpdate,
onDestroy,
};
}
}
</script>
<style>
.vue-highcharts {
width: 100%;
}
</style>
To use the stock map charts, you need to import and register them. For example, to use the map chart
import HighCharts from "highcharts";
import useMapCharts from "highcharts/modules/map";
useMapCharts(HighCharts);
<template> <vue-highcharts type="mapChart" :options="chartOptions" /></template>
Since Vue and Highcharts are not bundled with the module, you may need to add some webpack aliases.
For example, the following needs to be added when using vue-cli to vue.config.js
const path = require("path");
module.exports = {
chainWebpack: (config) => {
config.resolve.alias.set("vue$", path.join(__dirname, "node_modules/vue"));
config.resolve.alias.set(
"highcharts$",
path.join(__dirname, "node_modules/highcharts")
);
},
};
See License.md
FAQs
A simple, fast, Vue 3 component for rendering Highcharts.js Charts written using the composition API.
The npm package @adrianbrs/vue3-highcharts receives a total of 7 weekly downloads. As such, @adrianbrs/vue3-highcharts popularity was classified as not popular.
We found that @adrianbrs/vue3-highcharts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.