PDA

View Full Version : Using theme to change chart axes title label color, MVC



alex9311
23 Apr 2013, 4:40 PM
I have a chart with axes label titles and I want to change the color of the labels from black to red. I've looked here: http://www.sencha.com/learn/drawing-and-charting/ under "theming" and I think I can do what I want by defining a custom theme and do something like this:



axisTitleTop: {
fill: '#000',
font: '11px Arial'
}, axisTitleLeft: {
fill: '#000',
font: '11px Arial'
}, axisTitleRight: {
fill: '#000',
font: '11px Arial'
}, axisTitleBottom: {
fill: '#000',
font: '11px Arial'
}, to mess with the axes titles.
My question is: using MVC, where do I define my custom theme class and how do I include it?

slemmon
25 Apr 2013, 10:08 AM
You might look through the theming guide to see the details on how to incorporate a custom theme in an MVC build.
http://docs.sencha.com/extjs/4.2.0/#!/guide/theming

alex9311
25 Apr 2013, 1:35 PM
Thanks! I actually found a way to do it without using themes.

To configure the title label color of an axes just add the label title configuarion to that axes:

labelTitle:{

fill:"#B22222"
}