Skip to Content
avatar image
Former Member

Dynamic Value Colums in iChart

Just started to play around with the iChart/Stacked Bar Chart. I would like to dynamically add Value Columns to a chart based on user interaction.

Right now, I only see the "hard coded" method of physically going into the Display Template and directly specifying the names of the columns.

Is it possible to do this on the fly and add to the Value Colums as necessary?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 31, 2007 at 09:03 PM

    Hi Brian,

    Sure you can. Use the exposed method to add Value columns through javascript:

    document.iChart.getChartObject().setValueColumns(NEWVALUE);

    the NEWVALUE is a comma delimited list of column names.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jeremy Good

      And, if you have an UpdateEvent on the applet, wrap the updateChart(true) in:

      document.iChart.setUpdateEventEnabled(false);
      document.iChart.updateChart(true);
      document.iChart.setUpdateEventEnabled(true);
      

      to prevent endless looping.