Tag: chart

How to add an JSF action for event handling to Chartcreator charts

Posted by – June 24, 2008

Chartcreator is a very cool charting component for JSF, it uses JFreeChart as rendering engine, chartcreator can render many kinds of charts, including 3D charts, but there are some circunstances where just render charts isn’t enougth and you need some interaction too, I’ll show in this article how can you and some user interaction with Chartcreator generated charts.

Our example is a small piece of JSF code where we have a chart, a script block and a form with a inputText and a commandLink, our idea is simple, the user clicks on any portion of chart image, a imagemap click event is triggered and in javascript code we collect the information about the imagemap portion that we clicked and then pass this data to our inputText, a click is fired on commandLink and the data stored on inputText is set on managedbean property, the managedbean action is called performing some aplication navigation of something else.

More

Share