PDA

View Full Version : How to add a user defined css class name for chart surface text?



mrprabu
19 Mar 2014, 7:29 PM
Hi,

how to add a userdefined css class name for chart surface text?


I have to add my css class in below code? can any one give me idea?

var sprite = chart.surface.add({
type: 'text',
id: me.toolId + '_donutLabel',
text: surfaceText,
font: '30px Arial bold red',
x: me.textXAxis,
y: me.textYAxis
});

scottmartin
20 Mar 2014, 8:49 AM
Something like this:



.red tspan {
fill: #ff0000;
font-size : 16px;
font-weight : bold;
}




{
xtype: 'text',
text: 'Sample Vertical Text Item',
x: 240,
y: 180,
cls: 'red',
degrees: 90
}