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.

5 Responses to “Clickable FlexCharts”


  1. 1 Dan Wilson

    Hi Barney,

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

    DW

  2. 2 barneyb

    RIAForge doesn't have Trac. I've requested that feature, but was told that RIAForge already had the equivalent with the existing tools. So I host stuff myself. I could create shadow projects on RIAForge, but haven't gotten around to it. Maybe one of these days. ;)

  3. 3 تحميل

    Great!!
    how can i use it with ajax

  4. 4 barneyb

    تحميل,

    The demo is all JS-based. It illustrates the concepts of using the charting engine a JS-centric app pretty completely. At it's simplest, you just call setDescriptor or setDescriptorUrl.

  5. 5 تحميل

    OK, thanks barneyb

Leave a Reply