T
T
Triglav772019-06-18 14:36:36
JavaScript
Triglav77, 2019-06-18 14:36:36

How to remove and add breaks in Highstock chart on click?

There is a chart on Highstock, you need the breaks property to be deleted when you click on the chart itself and reappear on the second click.
Here is the code.

yAxis: {
                       categories: datax,
                        lineColor: 'white',
                        lineWidth: 2,
                         title: false,
                        tickInterval: 1, // шаг по оси Y
                        breaks: [{
                            from: 1000000000000,
                            to:   2943000000000

                        }],
                        min: 0,
                        events: {
                            pointBreak: pointBreakColumn
                        },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-06-18
@Triglav77

chart: {
  events: {
    click() {
      this.update({
        yAxis: {
          breaks: новое значение для breaks,
        },
      });
    },
  },
},

jsfiddle.net/oyrv6a1d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question