ChartJS.UpdateData: duration is ignored after setting Labels.

0
0

Hello.

If you execute UpdateData (duration) after setting Labels of ChartJS, The duration value is always ignored.

I think the following is probably relevant.


chart-2.7.2.js

defaults._set(‘global’, {
animation: {
duration: 1000,
easing: ‘easeOutQuart’,
onProgress: helpers.noop,
onComplete: helpers.noop
}
});


I’m not sure if this is the best workaround, but if you comment below I was able to avoid it.


ChartJS.cs

public void UpdateData (int duration = 300)
{
// if the control is already scheduled for a full update, there is no
// point in updating the dataset since it will be fully redrawn with the next update.
IWisejControl me = this;
// if (me.IsDirty)
// return;

Call (“updateData”, this.DataSets, this.Labels, duration);
}


Thank you in advance.

 

  • You must to post comments
0
0

Hi Paul.

I will attach a sample.

Attachment
  • Paul
    • Paul
    • Sep 21, 2021 - 5:09 pm
    Thanks. I’ll check it and comment You Regards
  • You must to post comments
0
0

Hi Masafumi

can you please wrap up a small test case ?

Thanks in advance!

Best regards

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.