highcharts / highcharts-vue

Other
686 stars 150 forks source link

Gantt chart #81

Closed zhy1stgg closed 5 years ago

zhy1stgg commented 5 years ago

I want use Highcharts Gantt with vue, do you have any plan to provide ganttChart constructor-type ?

Denyllon commented 5 years ago

Hi @zhy1stgg ,

Thank you for contacting us. Gantt chart (and any other available chart types) is currently supported with this wrapper, so you can simply use it by importing appropriate module from highcharts package, like below:

import Highcharts from "highcharts";
import Gantt from "highcharts/modules/gantt";
import HighchartsVue from "highcharts-vue";

Gantt(Highcharts);
Vue.use(HighchartsVue);

After that, just need to change the :constructor-type component property into a 'ganttChart':

<template>
  <div>
    <highcharts :constructor-type="'ganttChart'" :options="chartOptions"></highcharts>
  </div>
</template>

Documentation links: https://github.com/highcharts/highcharts-vue#importing-highcharts-modules https://github.com/highcharts/highcharts-vue#implementing-stockchart-and-mapchart

Live example: https://codesandbox.io/s/highcharts-vue-demo-lxgm2

Kind regards!