1. #1

    Join Date
    Feb 2013
    Posts
    2
    Vote Rating
    0
    parhelium is on a distinguished road

      0  

    Default sencha app build - minifies resources/app.css, lack of css of legend component

    sencha app build - minifies resources/app.css, lack of css of legend component


    REQUIRED INFORMATION
    Sencha Cmd version(s) tested:
    • Sencha Cmd 3.1.0.256
    Operating System:
    • Win7 Pro
    Framework used:
    • Sencha Touch 2.1.1 Complete
    Description:
    • After sencha app build, legend of the chart is not shown properly - probably lack of css styles.
    • before execution of sencha app build
    20130408.212054.png
    • after execution of sencha app build
    20130408.212032.png
    • After I execute sencha app build, resources/app.css is being also minified - expect to see minified app.css only in production dir
    Steps to reproduce the problem:

    Code:
    /cydrive/c/Users/me/projekty/sencha-all/projekty/legendD> sencha -debug app build production > log.txt
    log.txt

    In newly generated project only Main.js was changed. Main.js:
    Code:
    Ext.define('legendD.view.Main', {
        extend: 'Ext.Panel',
        xtype: 'main',
        requires: [
            'Ext.chart.Chart',
            'Ext.chart.axis.Numeric',
            'Ext.chart.axis.Axis',
            'Ext.chart.axis.Category',
            'Ext.chart.series.Area'
        ],
        initialize:function(){
            this.callParent();
            var chart = new Ext.chart.Chart({
                animate: true,
                store: {
                  fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
                  data: [
                      {'name':'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13},
                      {'name':'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3},
                      {'name':'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7},
                      {'name':'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23},
                      {'name':'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33}
                  ]
                },
                legend: {
                  position: 'bottom'
                },
                axes: [{
                    type: 'numeric',
                    position: 'left',
                    fields: ['data1'],
                    title: {
                        text: 'Sample Values',
                        fontSize: 15
                    },
                    grid: true,
                    minimum: 0
                }, {
                    type: 'category',
                    position: 'bottom',
                    fields: ['name'],
                    title: {
                        text: 'Sample Values',
                        fontSize: 15
                    }
                }],
                series: [{
                    type: 'area',
                    title: ['Data1', 'Data2', 'Data3'],
                    subStyle: {
                        fill: ['blue', 'green', 'red']
                    },
                    xField: 'name',
                    yField: ['data1', 'data2', 'data3']
    
    
                }]
            });
            this.add(chart);
         },
        config: {
            layout:'fit'
        }
    });



  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I just created a new app using Cmd 3.1.1.274 and Sencha Touch 2.2.0 RC (the latest releases) and changed the Main.js view to this:

    Code:
    Ext.define('MyApp.view.Main', {
        extend : 'Ext.Panel',
        xtype  : 'main',
    
        requires : 'Ext.chart.*',
    
        config : {
            layout : 'fit',
            items  : [
                {
                    xtype   : 'chart',
                    animate : true,
                    store   : {
                        fields : ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
                        data   : [
                            {'name' : 'metric one', 'data1' : 10, 'data2' : 12, 'data3' : 14, 'data4' : 8, 'data5' : 13},
                            {'name' : 'metric two', 'data1' : 7, 'data2' : 8, 'data3' : 16, 'data4' : 10, 'data5' : 3},
                            {'name' : 'metric three', 'data1' : 5, 'data2' : 2, 'data3' : 14, 'data4' : 12, 'data5' : 7},
                            {'name' : 'metric four', 'data1' : 2, 'data2' : 14, 'data3' : 6, 'data4' : 1, 'data5' : 23},
                            {'name' : 'metric five', 'data1' : 27, 'data2' : 38, 'data3' : 36, 'data4' : 13, 'data5' : 33}
                        ]
                    },
                    legend  : {
                        position : 'bottom'
                    },
                    axes    : [
                        {
                            type     : 'numeric',
                            position : 'left',
                            fields   : ['data1'],
                            title    : {
                                text     : 'Sample Values',
                                fontSize : 15
                            },
                            grid     : true,
                            minimum  : 0
                        },
                        {
                            type     : 'category',
                            position : 'bottom',
                            fields   : ['name'],
                            title    : {
                                text     : 'Sample Values',
                                fontSize : 15
                            }
                        }
                    ],
                    series  : [
                        {
                            type     : 'area',
                            title    : ['Data1', 'Data2', 'Data3'],
                            subStyle : {
                                fill : ['blue', 'green', 'red']
                            },
                            xField   : 'name',
                            yField   : ['data1', 'data2', 'data3']
    
    
                        }
                    ]
                }
            ]
        }
    });
    The development app works fine as expected. In both a testing and production build, the legend looks as in development as expected.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread