1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
    torhoehn is on a distinguished road

      0  

    Default Unanswered: Creating a chart

    Unanswered: Creating a chart


    I'm trying to add an chart to my Sencha Touch app.
    I have added a view like this and inserted a chart how I saw it on a couple of sites:
    Code:
    Ext.define('dergraph.view.Graph', {    extend: 'Ext.Container',
        xtype: 'graph',
        requires: [
            'Ext.TitleBar'
        ],
        config: {
            tabBarPosition: 'bottom',
            layout: 'fit',
    
    
            items: [
                {
                    xtype: 'chart',
                    animate: true,
                    store: 'dergraph.store.PhoneBook',
                    legend: {
                        position: 'right'
                    },
    
    
                    axes: [{
                            type: 'Category',
                            fields: ['firstName'],
                            position: 'bottom', //x-axis
                            title: 'Category'
                        }, {
                            type: 'Numeric',
                            fields: ['value'],
                            position: 'left', //y-axis
                            title: 'Value'
                    }]
                }
            ]
        }
    
    });

    But now I got in an Error in the Console of the browser: Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: axis.Category.
    This is my require-part in the app.js:
    Code:
    requires: [
            'Ext.MessageBox',
            'Ext.dataview.List',
            'Ext.chart.Chart',
            'Ext.chart.axis.Numeric',
            'Ext.chart.axis.Category'
        ],
    Can somebody help me with this?

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    8
    Vote Rating
    0
    assafkub is on a distinguished road

      0  

    Default


    what ST version are you using?

Thread Participants: 1

Tags for this Thread