-
24 Apr 2012 6:34 AM #1
Answered: [CHARTS-356] Sencha Touch Charts 'background' not working to change bg color
Answered: [CHARTS-356] Sencha Touch Charts 'background' not working to change bg color
So I've been working with ST for a few weeks now and just started looking at the Charts portion. I have a Line chart going and I'd like to change the background; while attempting to learn this I've decided to start slow and try and just change the color, that is not going well.
Below is my onReday function, I've combined a few tutorials but can't get this the way I'd like. The background : {fill:'red'}, portion seems to do NOTHING. Even though that is from the charts docs.
Code:onReady: function () { Ext.Viewport.add(new Ext.chart.Chart({ renderTo: Ext.getBody(), fullscreen: true, animate: true, background: { fill: 'red' }, store: store, axes: [{ type: 'Numeric', position: 'left', fields: ['data1'], title: 'RAPID3', grid: true, increment: 5, minimum: 0, }, { type: 'Time', position: 'bottom', fields: ['name'], title: '', dateFormat: 'M d', }], series: [{ type: 'line', axis: 'left', xField: 'name', yField: 'data1', }] })); }
-
Best Answer Posted by rafferty
I see sencha charts is attached to 2.1 and was refactored. I might as well consider this closed. I was able to hack highcharts into my app anyway. Not entirely sure how it ended up working, but it did and is possible.
-
26 Apr 2012 7:38 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,703
- Vote Rating
- 435
- Answers
- 3113
Thanks for the report.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2012 4:59 AM #3
This may be related to what I found for an earlier post about the stroke-width of a chart:
http://www.sencha.com/forum/showthre...for-line-chart
There is a theme built into at least the debug version of charts. I don't think it's being overwritten properly when we change attributes (like above).
-
10 Aug 2012 4:22 AM #4
Is there any update on whether this has been fixed and if there is any workaround. Any help would be appreciated. Thank you.
-
12 Nov 2012 10:00 AM #5
I see sencha charts is attached to 2.1 and was refactored. I might as well consider this closed. I was able to hack highcharts into my app anyway. Not entirely sure how it ended up working, but it did and is possible.


Reply With Quote