Altitude charts

The "steps" of the Highcharts series, if I understand the documentation correctly , should repaint the data point as the value passes into different "zones".

  • This works when initially loading a table using the type 'line' or 'column' 'type.
  • This works when I update the value of a chart data point with type 'line'
  • This does not work when I update the data point value of the column type chart

Here is the fiddle: http://jsfiddle.net/bfb6w1qq/1/

You can try setting the type from 'column' to 'line' to see how it works as expected.

My question is a bug or am I not seeing some kind of configuration setting? I even tried to take another draw, but still no luck.

Thanks in advance!

Here is the code:

$(function () {
$("#higher").on("click", function()
{
    chart = $('#container').highcharts();
    chart.series[0].data[0].update(
        {
            x: 0,
            y: 15
        })
    chart.redraw();
});

$('#container').highcharts({
     chart:
        {
            type: 'column'
        },
    series: [{
        data: [-10, -5, 0, 5, 10, 15, 10, 10, 5, 0, -5],
        zones: [{
            value: 0,
            color: '#f7a35c',
            fillColor: '#f7a35c'
        }, {
            value: 10,
            color: '#7cb5ec',
            fillColor: '#7cb5ec'
        }, {
            color: '#90ed7d',
            fillColor: '#90ed7d'
        }]
    }]
});

});

+4
source share
2 answers

Thanks for the tip, it really looks like an error, so I reported it to our developers here: https://github.com/highslide-software/highcharts.com/issues/4604

+1
source
0
source

Source: https://habr.com/ru/post/1609158/


All Articles