Clickable FlexCharts

I just updated FlexChart with a 'click' callback.  You can now specify the name of a JavaScript function to be invoked when a data point on the chart is clicked.  The function is passed the ID of the chart, the series label, and the x and y values for the point, in that order.  Check the demo (which just pops an alert) to see it in action.

What is this good for, you ask?  Everything that CFCHART's 'url' attribute was theoretically good for, except it's actually useful.  If you wan CFCHART's behaviour, just have your callback do a window.location.  For those of us that don't, you can use the parameters to AJAX in some related content to another section of the page, compute and inject a new descriptor do do "drill-down" within the same chart instance, or any number of other things.  Lots of possibilities.

12 responses to “Clickable FlexCharts”

  1. Dan Wilson

    Hi Barney,

    This project is almost ready for a home on riaforge. whaddya think?


  2. تحميل

    how can i use it with ajax

  3. تحميل

    OK, thanks barneyb

  4. brian

    This is pretty amazing. Nice work! Would there be a way to set a chart to have a background image and a title, or would that require modifying the original .swf?

  5. brian


    So, with a little css and a lot of fiddling, I should be able to get a background image under the SWF and properly aligned. Thanks for the reply, and again, nice work!!

  6. brian

    One more quick question – is there a way to adjust the marker size? I have an application where the size of the dot is dependent upon a value not overtly shown in the graph, i.e. weighting by size. I tried adjusting the strokeWeight and even tried markerSize, though I didn't see an example of that anywhere in the XML.


  7. brian

    It would work, had it been available, since I'm just plotting points in a triangular space (triangle background image). I found that for points, if I use the line type and put the same point twice, it worked well. I would have done separate series for each point, if they were to have different sized markers.

    Anyway, thanks for your help and quick response. Happy New Year!