1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    jewes is on a distinguished road

      0  

    Default Unanswered: Dynamically generate multiple series in line chart using the datastore data.

    Unanswered: Dynamically generate multiple series in line chart using the datastore data.


    Please help me!!!

    I need to create a line chart containing a unknown number of series based on the data in the data store.
    My data model and store looks like this:
    Code:
    var chartDataModel =
        Ext.define
        (
            'chartDataModel',
            {
                extend: 'Ext.data.Model',
                fields:
                [
                    {
                        name: 'productName',
                        mapping: 'ProductName',
                        type: 'string'
                    },
                    {
                        name: 'entryCount',
                        mapping: 'EntryCount',
                        type: 'int'
                    },
                    {
                        name: 'createdShort',
                        mapping: 'CreatedShort',
                        type: 'string'
    
    
                    }
                ]
            }
        );
    
    
    // This create the Store. It use the Log Data Model 
    var chartDataStore =
        Ext.create
        (
            'Ext.data.Store',
            {
                id: 'chartDataStore',
                model: 'chartDataModel',
                proxy:
                {
                    type: 'ajax',
                    url: '/Helpers/GetLogAggregatesForDeveloper.ashx',
                    reader:
                    {
                        root: 'LogAggregates',
                        reader: 'array'
                    }
                },
                listeners: {
    
    
                    load: {
                        fn: function () {
    
    
                        }
                    }
                }
    
    
            }
        );
    
    
    chartDataStore.load();
    The store will contain something like this:
    Capture.PNG

    What I would like is to generate a line(serie) for every distinct 'productName'. The X-Axis should be represented by 'createdShort' and the Y-Axis by 'entryCount'.

    Hope someone out/in there can help me.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    The following demo should show you how to setup your store and create unique line series:
    http://dev.sencha.com/deploy/ext-4.1...charts/Line.js

    Scott.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi