PDA

View Full Version : Doing Chart Drilldowns



LEWJO10@ca.com
13 Nov 2011, 4:20 AM
Hi Brendan.

When you add a addSeriesSelectionHandler to a BarSeries, all you get in the event is the value of what was clicked.

This is not very useful for doing chart drilldowns where you may want to show a chart with more detail for the x-axis category or date corresponding to the click and the series item itself. The value of what was clicked is not unique (could be the same for more than one category or date or series).

Getting the index of what was clicked (selected) is far more informative. It can be used to determine which model in the ListStore corresponds to the click and what property (series) was involved.

Please see the method onMouseDown and the method onSeriesClick in the attached file. This is how I plan to support chart drilldowns.

Will this approach work with all chart types?

Is there a better way?

Or do you plan to enhance the event to be more informative?

Thanks,
John Lewis

LEWJO10@ca.com
13 Nov 2011, 6:18 AM
Hi Brendan.

No need to answer this thread.

I checked out the ToolTipExample in greater detail in the Ext GWT Explorer Demo – PR 5 and found a much better approach to use.

By the way, the ToolTipExample doesn’t really work completely.

Perhaps that could be fixed.

Thanks again,
John Lewis

LEWJO10@ca.com
13 Nov 2011, 7:55 AM
Hi Brendan.

I changed my mind again!

I would like for this thread to be answered.

In my opinion, SeriesSelectionEvent should include index in addition to value (like SeriesItemOverEvent does).

Then, a SeriesSelectionHandler can be used for chart drilldowns and a SeriesItemOverHandler can be used to customize chart tooltips.

Please let me know you thoughts.

Thanks,
John Lewis

BrendanC
14 Nov 2011, 5:51 PM
Good point. Especially as the series renderers do contain the appropriate index for the sprite. I will include it in the next release. Also I am curious what you mean by the ToolTipExample not completely working. The only bug I know of is in IE8. Thanks.

LEWJO10@ca.com
15 Nov 2011, 6:44 AM
Hi Brendan.

I should have been more clearer in my post.

When you do a mouse-over on the data points in the ToolTip Chart in the Ext GWT Explorer Demo – PR 5, the tooltips popup empty in Firefox and IE.

Not sure if it is a coding error or a bug.

From what I can gather in reviewing the code is that the intent is to show a pie chat in the tooltip, which if true is pretty cool.

John Lewis.

BrendanC
16 Nov 2011, 8:26 PM
From my testing it looks like the tooltip example does not work in IE 8 and FF 3 and is slated to be fixed. Let me know if you have a problem with any other browsers.