Note that there are some explanatory texts on larger screens.

plurals
  1. POHighlighting Bars in a chart when clicking on the related data in a grid with ExtJS 4
    primarykey
    data
    text
    <p>I have two objects on my screen, a grid and a chart being populated by the same store. What I need to do is highlight the Column on the chart related to the item I clicked in the grid.</p> <p>In the function I've figured half way to do it using Ext.getCmp('chart').series.get(0). But don't know what to do to get to each item of the series and highlight it, as the getItemForPoint(x,y) keeps returning null values...</p> <p>Thanks a lot, code below: </p> <pre><code>// Code for my grid { columnWidth: .25 ,xtype: 'grid' ,hideHeaders: true ,border: true ,styke: 'padding-top: 60px;' ,height: 360 ,store: participation ,columns: [{ dataIndex: 'ID' ,width: 24 },{ dataIndex: 'Supplier' ,width: 204 }] ,listeners: { select: function() { // function to highlight the column on my chart } } } // Code for my chart { border: false ,layout: 'column' ,items: [{ columnWidth: .75 ,xtype: 'chart' ,animate: true ,height: 432 ,shadow: false ,id: 'chart' ,store: participation ,axes: [{ type: 'Numeric' ,position: 'left' ,grid: true ,fields: 'Participation' ,title: 'Share' ,label: { renderer: Ext.util.Format.numberRenderer('0.00'+"%") } },{ type: 'Category' ,position: 'bottom' ,fields: 'ID' }] ,series: [{ type: 'column' ,axis: 'left' ,highlight: 'true' ,xField: 'ID' ,yField: 'Participation' ,tips: { trackMouse: true ,width: 312 ,maxWidth: 360 ,height: 36 ,constrainPosition: true ,renderer: function(storeItem, item) { this.setTitle('Supplier: ' + storeItem.get('Supplier')+'&lt;br/&gt;'+'Share: ' + Ext.util.Format.number(storeItem.get('Share'),"0.00")+'%'); } } ,style: { lineWidth: 1 ,stroke: '#666' } }] } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload