PDA

View Full Version : How to show menu or popup above barchart of on item click of each bar in extjs4.1



vijayakumar84
9 Jul 2013, 8:27 AM
Hi,
Can anybody tell How to show menu or popup above barchart of on item click of each bar in extjs4.1




Thanks

slemmon
11 Jul 2013, 12:39 PM
You're looking to show the the menu aligned alongside the chart component itself on itemclick?

You're using the series' itemclick event now?
The series itself fires several events that are documented under Ext.chart.series.Series (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.chart.series.Series):

itemclick When the user interacts with a marker.
itemmouseup When the user interacts with a marker.
itemmousedown When the user interacts with a marker.
itemmousemove When the user iteracts with a marker.
afterrender Will be triggered when the animation ends or when the series has been rendered completely.
The itemclick, itemmouseup, itemmousedown, and itemmousemove event listener will be passed a param that is a Javascript object with the following keys:

attr (Object) - The style attributes for the marker sprite (fill, height, stroke-width, etc.)
point (Array)
series (Ext.chart.series.Series (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.chart.series.Series)) - The chart series instance
shadows (Array) - Array of sprites (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.draw.Sprite) used to render a shadow for the marker (if shadowed)
sprite (Ext.draw.Sprite (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.draw.Sprite)) - The marker sprite instance
storeItem (Ext.data.Model (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Model)) - The model/record used when rendering the marker
value (Array) - Array of values from the model
yField (String) - The model field used in this series

Also, to get more involvement from the community you might share what you've done so far.