I'm using SmartGWT 3.1d 11/19/2012 build with Firefox 11.
I'm using the inlined-Facet approach in this post to create line charts where I wind up with a reduced number of x-axis labels, and one CellRecord for each line on the chart. For rendering purposes, this solution has worked well.
I have a need to be able to click on the points and take action depending on what point is clicked. I've set a ChartPointClickHandler and am calling setShowDataPoints(true).
The Handler is being called, but the API of the ChartPointClickEvent only provides for getting the Record and the value(), which corresponds to a y-axis value in my case. The problem is the Record contains all of the y-values as distinct attribute names and there is no way to tell which of the particular attribute names was actually clicked. Theoretically, if every x-value (ie, unique attribute name) had a distinct y-value, I could iterate over all of the record attributes and match the event.getValue() to a particular attribute value. But if two or more attributes have the same double value, that technique will not work.
Is there any workaround to this, given that I still have the need to limit the number of x-axis labels?
Given that you're correctly determining which x-axis value in my series is being clicked, if you could pass that information back to me in the event, I think I could work out some solution.
Thanks in advance.
I'm using the inlined-Facet approach in this post to create line charts where I wind up with a reduced number of x-axis labels, and one CellRecord for each line on the chart. For rendering purposes, this solution has worked well.
I have a need to be able to click on the points and take action depending on what point is clicked. I've set a ChartPointClickHandler and am calling setShowDataPoints(true).
The Handler is being called, but the API of the ChartPointClickEvent only provides for getting the Record and the value(), which corresponds to a y-axis value in my case. The problem is the Record contains all of the y-values as distinct attribute names and there is no way to tell which of the particular attribute names was actually clicked. Theoretically, if every x-value (ie, unique attribute name) had a distinct y-value, I could iterate over all of the record attributes and match the event.getValue() to a particular attribute value. But if two or more attributes have the same double value, that technique will not work.
Is there any workaround to this, given that I still have the need to limit the number of x-axis labels?
Given that you're correctly determining which x-axis value in my series is being clicked, if you could pass that information back to me in the event, I think I could work out some solution.
Thanks in advance.
Comment