PDA

View Full Version : Axis label color



salgaf
8 Mar 2012, 2:19 AM
Hi,
I'm trying to put a color on my axis labels using label color property but has no effect.
Is it possible?



axes: [
{
type: 'Numeric',
position: 'left',
fields: ['data1'],
label: {
renderer: Ext4.util.Format.numberRenderer('0,0')
},
title: 'Sample Values',
grid: true,
maximum:0
},
{
type: 'Category',
position: 'bottom',
fields: ['name'],
title: 'Sample Metrics',
label:{
rotate:{
degrees:270
}
,color:'#FF0000'//<--no effect
}
}
],

Another question,can I put in a axis label a text like this:
Text1
Text2
My text is very long and I would to separate in two lines
Thanks

ivanatora
8 Aug 2013, 5:55 AM
I see this is an old thread, but I had the same issue today.
After digging in the source it seems the labels are created in Ext.chart.axis.Axis - getOrCreateLabel()
There it seems labels are added as Ext.draw.Sprite objects, and it doesn't have the `color` attribute, but it have `fill`. It really works with `fill`:

http://jsfiddle.net/N6s5F/ at line 57