-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Expected behaviour
There is a simple Bar chart. After update of category name (and values) it is expect that chart is updated and that order of values is not important.
Actual behaviour
Highcharts warning #15 (Highcharts expects data to be sorted) shows up in console. 9.1.0 had bug that showed error "Highchart is not defined" but it was fixed in 9.1.1 or 9.1.2. But this warning is also unexpected. It seems everything is correct in the config:
var data1 = [
{name: 'a', y: 1},
{name: 'b', y: 2},
{name: 'c', y: 3},
];
var data2 = [
{name: 'a', y: 1},
{name: 'b2', y: 2},
{name: 'c', y: 3},
];
let chart = Highcharts.chart('container', {
chart: {
type: 'bar'
},
xAxis: {
type: 'category',
},
series: [{
data: data1
}],
});
document.getElementById('update').addEventListener('click', () => {
chart.update({
series: [{
data: data2
}],
});
});Live demo with steps to reproduce
https://jsfiddle.net/aumo7y50/
Product version
Latest (9.1.2)
Affected browser(s)
Chrome and probably others.