View Full Version : Questions about maximizing panel and adding a rect sprite as marker in a column chart

5 Mar 2012, 12:00 PM
Hi there !

I'm looking for help about some stuff I would like to do with extJS 4.
First, I would like to add kind of a marker in the top of each column bar on my chart.

I found that I can override the renderer so I can add a new sprite like this :

function(sprite, record, attr, index, store) {
var mark = Ext.create(Ext.draw.Sprite, {
/* Here is the new sprite that I add at the top of each column */
type: 'rect',
fill: '#FF3333',
surface: sprite.surface,
width: attr.width+1,
attr.fill='#4444EE'; /* Here I change the color of the column */
return attr;

But with this method I encountered 2 problems :
- The new sprite seems to be drawn several time (I have more than one rectangle sprite added at the top of each column).
- I try to add this same method on another project and my rectangle sprite appear behind the grid and the column bar even if I add zIndex atttribute on all chart element (grid, column...)

So what's wrong, or how to to that a better way ?

Secondly, I'm looking to allow my panel to be maximized (my panels contains charts and grid) I try to use the following plugin code : http://www.sencha.com/forum/archive/index.php/t-20662.html
But it only create a blank panel I don't know why.

The last question, is there an example on how to do a chart that is able to do drill down with data ?

So if someone can give me some clues.

See you.