Okay
  Public Ticket #3619974
Javascript to Control Chart Animations
Closed

Comments

  • Howard started the conversation

    Hello,

    I'm am testing out the plugin and I'm using a Highcharts chart. Using Jquery, I was able to prevent the initial animation from playing on a column chart with:

    obj.options.plotOptions.column.animation = false;

    in the wpDataChartsCallbacks[1] callback function for chart id 1. On a button click, I want to manually trigger the animation for the chart. I can't figure out how to do this. Is there any sample code I can look at?

  •  1,819
    Miloš replied

    Hi Howard,

    Our Support does not cover custom solutions like this, but I will do my best to advise you on the subject.

    You can try to find a custom solution using chart callbacks.

    You can check our documentation about wpDataCharts callbacks

    On this Page you will find one custom example for each Chart Engine, then you would need to modify that solution to change/manipulate the options of the chart for your use-case.

    • Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts APIHighcharts API, and Chart.js API
    • All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks, you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in the Support help center). A huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and Google will search only that website). Also, a lot of examples of charts, chart settings, and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
    • Please note that using hooks or wpDataTable and wpDataChart callbacks requires a certain level of programming skills and included support refers only to advice.

    I hope that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables