How To Get Chart Series data on Button click?

edited June 3 in Questions
Hi All,

When i click on button then i have need to get chart.series as well as other attribute like chartObj.xAxis, yAxis:chartObj.yAxis etc.

Using before render snippet i am able to get this information using below code:
var chartObj = arguments[0], $ = skuid.$;
But using on click button snippet how can i get this xAxis, yAxis and series data from a chart?
I have assigned a uniquie to chat as "ChartEXG":
Then using that code in snippet for button click  :skuid.$C('ChartEXG').series

But not able get series data.

Can anyone please let me know how i can get chart series and other attribute data on button click.



  • edited June 2019
    Hey Raj!

    Thanks for your question -

    You're pretty close - in order to grab the chart object similar to what you're getting in the "Before Render" snippet, you're going to have use the function getHCConfig() on click.  This will return the xAxis, yAxis, and series parameters.  Essentially, you want to use the following snippet on button click:
    var chart = skuid.$C('ChartEXG').getHCConfig(); console.log(chart.xAxis); console.log(chart.yAxis); console.log(chart.series);
    Hope this helps!
  • edited February 2017
    @Christine Thank you for your quick reply on this.

    Yes that worked and i am able to get the series, xAxis information from chart.

  • Josh MerrittJosh Merritt Member
    edited June 3
    Thanks for this post!

    Christine, do you know if it's possible to redraw a chart using a button action?


  • edited October 2017
    Josh - you can use the following to redraw a chart:
    You can create a one-line snippet which you can call on a button action.
  • Josh MerrittJosh Merritt Member
    edited October 2017
    Thanks Christine!

    Is there somewhere that I can find the commands available via the skuid. syntax for highcharts?
Sign In or Register to comment.