1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default Scatter chart with 3rd dimension

    Scatter chart with 3rd dimension


    I have written below code for scatter chat and now I want to add group by filtering as well so I want to know how json will be form for this kind of chart which shows uptimes hours on xAxis, Downtime hours on yAxis and group by SKU. Bubble size is not important right now for me but if I can get any example with bubble size as well, it is very helpful for me scatter.jpg

    HTML Code:
    var chart = new Ext.chart.CartesianChart({
        animate: true,
        store: {
          fields: ['DE','DH'],
          data: [
              {'DE':10, 'DH':15},
               {'DE':15, 'DH':20},
               {'DE':20, 'DH':25},
             
          ]
        },
        axes: [{
            type: 'numeric',
            position: 'left',
            fields: ['DH'],
            title: {
                text: 'DH',
                fontSize: 15
            },
            grid: true,
            minimum: 0
        }, {
            type: 'numeric',
            position: 'bottom',
            fields: ['DE'],
            title: {
                text: 'DE',
                fontSize: 15
            },
            minimum: 0
        }],
        series: [{
            type: 'scatter',
            highlight: {
                size: 7,
                radius: 7
            },
            fill: true,
            xField: 'DE',
            yField: 'DH',
            marker: {
                type: 'circle',
                fillStyle: 'blue',
                radius: 10,
                lineWidth: 0
            }
        }]
    });
    Ext.Viewport.setLayout('fit');
    Ext.Viewport.add(chart);
    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    828
    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


    So you want to add a different series like:

    Code:
    var chart = new Ext.chart.CartesianChart({
        animate : true,
        store   : {
            fields : ['DE', 'DH', 'DA'],
            data   : [
                {'DE' : 10, 'DH' : 15, DA : 10},
                {'DE' : 15, 'DH' : 20, DA : 15},
                {'DE' : 20, 'DH' : 25, DA : 20}
            ]
        },
        legend  : true,
        axes    : [
            {
                type     : 'numeric',
                position : 'left',
                fields   : ['DH', 'DA'],
                title    : {
                    text     : 'DH',
                    fontSize : 15
                },
                grid     : true,
                minimum  : 0
            },
            {
                type     : 'numeric',
                position : 'bottom',
                fields   : ['DE'],
                title    : {
                    text     : 'DE',
                    fontSize : 15
                },
                minimum  : 0
            }
        ],
        series  : [
            {
                type      : 'scatter',
                highlight : {
                    size   : 7,
                    radius : 7
                },
                fill      : true,
                xField    : 'DE',
                yField    : 'DH',
                marker    : {
                    type      : 'circle',
                    fillStyle : 'blue',
                    radius    : 10,
                    lineWidth : 0
                }
            },
            {
                type      : 'scatter',
                highlight : {
                    size   : 7,
                    radius : 7
                },
                fill      : true,
                xField    : 'DE',
                yField    : 'DA',
                marker    : {
                    type      : 'circle',
                    fillStyle : 'red',
                    radius    : 10,
                    lineWidth : 0
                }
            }
        ]
    });
    Ext.Viewport.setLayout('fit');
    Ext.Viewport.add(chart);
    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.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default


    Can you please let me know a json for below chat with dummy data? It should should show 5 bubbles in the chart.
    scatter.jpg

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    53
    Vote Rating
    0
    sandeepmnit35 is on a distinguished road

      0  

    Default


    I am using below code for chart:

    HTML Code:
            RA.app.newChart[RA.app.currentActivePanelIndex] = new Ext.chart.Chart({
                id: 'chart'+RA.app.currentActivePanelIndex,
                store: store,
                renderTo: Ext.getBody(),
                flex: 1,
                shadow: true,
                autoShow: true,
                animate:true,
                legend: {
                    position: 'right',
                },
                //maxGutter: [30, 30],
                axes: [
                    {
                        type: 'Numeric',
                        position: 'left',
                        fields:['A-Crew',B-Crew','C-crew','D-crew','others'] ,                    
                        title: DowntimeEvents,
                        minimum: 0,
                        maximum: RA.app.Ymax
                        
                    },
                    {
                        type: 'Numeric',
                        position: 'bottom',
                        fields:[DowntimeHours] ,
                        title:DowntimeHours,
                        minimum: 0,
                        maximum: RA.app.Xmax
                        
                    }
                ],
                series: [
                {
                    type: 'scatter',
                    //axis: ['left', 'bottom'],
                    //markerConfig: {},
                    xField: DowntimeHours,
                    yField: 'A-crew'                
                },
                
                {
                    type: chartType,
                    //axis: ['left', 'bottom'],    
                    //markerConfig: {},
                    xField: DowntimeHours,
                    yField:'B-crew'
                    
                },
                
                {
                    type: 'scatter',
                    //axis: ['left', 'bottom'],
                    //markerConfig: {},
                    xField: DowntimeHours,
                    yField: 'C-crew'
                    
                },
                
                {
                    type: chartType,
                    //axis: ['left', 'bottom'],    
                    //markerConfig: {},
                    xField: DowntimeHours,
                    yField: 'D-Crew'
                    
                },
                {
                    type: chartType,
                    //axis: ['left', 'bottom'],    
                    //markerConfig: {},
                    xField: DowntimeHours,
                    yField: 'others'
                    
                }
                
                ], //close series
                

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