1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Answers
    2
    rafferty is on a distinguished road

      0  

    Default 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',
    			}]
    		}));
        }

  2. 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.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,703
    Vote Rating
    435
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    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.

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    52
    Vote Rating
    2
    Answers
    2
    Kikketer is on a distinguished road

      0  

    Default


    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).

  5. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Answers
    2
    rafferty is on a distinguished road

      0  

    Default


    Is there any update on whether this has been fixed and if there is any workaround. Any help would be appreciated. Thank you.

  6. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Answers
    2
    rafferty is on a distinguished road

      0  

    Default


    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.