score:0

Accepted answer

highcharts for performance uses the reference to the original data array. in your code, you edit the second level of the data: lastcolumn.value[1] += 100; which causes that there are no changes in the options during update.

this example presents similar situation: http://jsfiddle.net/blacklabel/tf1csqeo/

the solution is to clone your data before modifying it:

handleclick = () => {
  let newdata = this.state.data.map(x => x.slice());

  if (newdata[newdata.length - 1][1] < 450) {
    newdata[newdata.length-1][1] += 100;

    this.setstate(
      {
        data: newdata
      }
    );
  }
};

live demo: https://codesandbox.io/s/6xv0kr3v0n

as you can see, the animation works correctly.


Related Query

More Query from same tag