2

I am using this library: chartkick for load charts with vue, and need a chart bar with scroll how in this example. From HIGHTCHART. But i can´t set options to component in chartkick. I try set with :library in component but no work.

Component:

<bar-chart :data="chartData.bar" :library="chartOptions"></bar-chart>

Data:

data() {
  return {
    chartData: {
      bar: [],
      colors: [this.colors]
    },
    chartOptions:{
      xAxis: {
        scrollbar: {
          enabled: true
        },
      },
    },
  }
},
Michael
  • 168
  • 2
  • 11
  • scroll down at [chartkick](https://www.chartkick.com/vue) page, then you will see how to set option. – Sphinx Aug 08 '18 at 21:57
  • 1
    I'm having this same issue and the link doesn't help. All it shows is passing `:library="{backgroundColor:...}"`, but it doesn't explain how the `library` attribute gets merged with different options for the various charting libraries making it almost impossible to get the desired effect. I'm trying to disable animations on HighCharts and I've tried about 20 things including `:library="{chart:{animation:false}}"`, `:library="{plotOptions:{line:{animation:false}}}"`, etc – stevendesu Aug 23 '18 at 19:35
  • The scrollbar is only available inside Highstock, in Highcharts you can use `chart.scrollablePlotArea`: https://api.highcharts.com/highcharts/chart.scrollablePlotArea – Wojciech Chmiel Oct 11 '19 at 07:21

1 Answers1

-1

Please try with this option. Add this in your global js.(Main.js)

Chartkick.options = {
    xAxis: {
        scrollbar: {
            enabled: true
        },
    },
}