Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Animate DataChart based on event
posted

I would like to animate the DataChart based on any configurable event, such as a button click, in the most simple way possible. I am attempting to do this from MVC/Razor. What methods trigger the animation? In the Datachart API, it appears that there are several notifications methods that may trigger the animation (notifyClearItems(), notifyInsertItem(), etc.) Are these methods not available to the MVC HTML helper? I do not get intellisense for them.

Assuming I must call one of these methods via JavaScript based on something like an Onclick or Onload event, it is not clear to me how to populate the JavaScript parameters from an MVC framework.

From the API -

  $(".selector").igDataChart( "notifyInsertItem", dataSource:object, index:number, newItem:object );

How do you populate datasource:object from your MVC model? What would the newItem object be? Ideally, I just want to trigger the animation, I don't want to really add or remove an item from the chart.