Results 1 to 2 of 2

Thread: Charts and timeline problems

  1. #1
    Sencha User sailei1's Avatar
    Join Date
    Jul 2011
    Location
    BeiJing China
    Posts
    43

    Default Charts and timeline problems

    store
    Code:
      var store = Ext.create("Ext.data.Store", {                                       
    //                                       fields:['response','service','ssl','w','c','d','down',
    //                                               {name:'name',type:'date',dateFormat:'d?G?i?'}],
    //                                               //'name'],
                                                   
                                               fields:    [{name:'c',type: 'float'},{name:'d',type: 'float'},{name:'down',type: 'float'},{name:'name',type:'date',dateFormat:'d?G?i?'},
                                                   {name:'response',type: 'float'},{name:'service',type: 'float'},{name:'ssl',type: 'float'},{name:'w',type: 'float'},],
                                           data:result.picData.data
                                           });
    items:
    Code:
    items.push({xtype:'container',
                                                     layout:'fit',
                                                     items:[{ xtype: 'chart',
                                                           store :store,
                                                         background: 'white',
                                                         colors: ["#115fa6", "#94ae0a", "#a61120", "#ff8809", "#ffd13e", "#a61187", "#24ad9a", "#7c7474", "#a66111"],
                                                         interactions: ['panzoom'],
                                                         legend: {
                                                                position: 'bottom'
                                                            },
                                                         axes: [
                                                                {
                                                                    type: 'numeric',
                                                                    position: 'left',
                                                                    //fields: ['response','service','ssl','w','c','d','down'],
                                                                   // grid: true,
                                                                   // minimum: 0,
                                                                },
    //                                                            {
    //                                                               type: 'category',
    //                                                               position: 'bottom',
    //                                                               fields: 'name',
    //                                                            }
                                                                {type: 'time',
                                                                               dateFormat: 'd?G?i?', //
                                                                               fields: ['name'],
                                                                               position: 'bottom',
                                                                            visibleRange: [0, 0.5],
                                                                }
                                                            ],
                                                            series: [
                                                                       {
                                                                           type: 'bar',
                                                                           xField: 'name',
                                                                           yField: ['response','service','ssl','w','c','d','down'],
                                                                           stacked: true,
                                                                           style: {
                                                                               stroke: 'rgb(40,40,40)'
                                                                           },
                                                                       }
                                                                   ],
                                                            
                                                      
                                                               
                                                            }]
                                                     })
    JSon
    Code:
    {"data":[{"name":"05?00?05?","d":"0.002","w":"0.161","c":"0.012","ssl":"0","service":"0.041","response":"1.609","down":"0.001"},{"name":"05?00?15?","d":"0.002","w":"0.163","c":"0.008","ssl":"0","service":"0.054","response":"1.204","down":"0.001"},{"name":"05?00?25?","d":"0.001","w":"0.175","c":"0.018","ssl":"0","service":"0.049","response":"1.241","down":"0.003"},{"name":"05?00?35?","d":"0","w":"0.164","c":"0.016","ssl":"0","service":"0.027","response":"1.290","down":"0.002"},{"name":"05?00?45?","d":"0.001","w":"0.170","c":"0.013","ssl":"0","service":"0.039","response":"1.176","down":"0.007"},{"name":"05?00?55?","d":"0","w":"0.170","c":"0.012","ssl":"0","service":"0.039","response":"1.321","down":"0.003"},{"name":"05?01?05?","d":"0.001","w":"0.207","c":"0.009","ssl":"0","service":"0.065","response":"1.774","down":"0.003"},{"name":"05?01?15?","d":"0.001","w":"0.168","c":"0.015","ssl":"0","service":"0.036","response":"1.265","down":"0.002"},{"name":"05?01?25?","d":"0.001","w":"0.159","c":"0.013","ssl":"0","service":"0.039","response":"1.281","down":"0.002"},{"name":"05?01?35?","d":"0.001","w":"0.174","c":"0.014","ssl":"0","service":"0.051","response":"1.189","down":"0.001"},{"name":"05?01?45?","d":"0","w":"0.174","c":"0.011","ssl":"0","service":"0.035","response":"1.158","down":"0.001"},{"name":"05?01?55?","d":"0.002","w":"0.185","c":"0.011","ssl":"0","service":"0.045","response":"1.168","down":"0.008"},{"name":"05?02?05?","d":"0.001","w":"0.156","c":"0.015","ssl":"0","service":"0.040","response":"1.716","down":"0.001"},{"name":"05?02?15?","d":"0.001","w":"0.186","c":"0.012","ssl":"0","service":"0.036","response":"1.304","down":"0.003"},{"name":"05?02?25?","d":"0","w":"0.173","c":"0.009","ssl":"0","service":"0.044","response":"1.376","down":"0.001"},{"name":"05?02?35?","d":"0.001","w":"0.213","c":"0.012","ssl":"0","service":"0.048","response":"1.250","down":"0.007"},{"name":"05?02?45?","d":"0.001","w":"0.196","c":"0.023","ssl":"0","service":"0.046","response":"1.215","down":"0.001"},{"name":"05?02?55?","d":"0","w":"0.156","c":"0.016","ssl":"0","service":"0.070","response":"1.324","down":"0.006"},{"name":"05?03?05?","d":"0.001","w":"0.266","c":"0.019","ssl":"0","service":"0.035","response":"1.464","down":"0.001"},{"name":"05?03?15?","d":"0.001","w":"0.236","c":"0.022","ssl":"0","service":"0.034","response":"1.247","down":"0.002"},{"name":"05?03?25?","d":"0","w":"0.233","c":"0.015","ssl":"0","service":"0.038","response":"1.296","down":"0.004"},{"name":"05?03?35?","d":"0.001","w":"0.259","c":"0.016","ssl":"0","service":"0.054","response":"1.326","down":"0.002"},{"name":"05?03?45?","d":"0.001","w":"0.260","c":"0.016","ssl":"0","service":"0.035","response":"1.331","down":"0.002"},{"name":"05?03?55?","d":"0.002","w":"0.214","c":"0.014","ssl":"0","service":"0.037","response":"1.314","down":"0"},{"name":"05?04?05?","d":"0","w":"0.226","c":"0.015","ssl":"0","service":"0.038","response":"1.776","down":"0.002"},{"name":"05?04?15?","d":"0.001","w":"0.223","c":"0.019","ssl":"0","service":"0.043","response":"1.377","down":"0.001"},{"name":"05?04?25?","d":"0.001","w":"0.218","c":"0.017","ssl":"0","service":"0.050","response":"1.303","down":"0.001"},{"name":"05?04?35?","d":"0.002","w":"0.201","c":"0.016","ssl":"0","service":"0.045","response":"1.255","down":"0.002"},{"name":"05?04?45?","d":"0.001","w":"0.185","c":"0.012","ssl":"0","service":"0.043","response":"1.232","down":"0.002"},{"name":"05?04?55?","d":"0.002","w":"0.189","c":"0.010","ssl":"0","service":"0.037","response":"1.235","down":"0.002"},{"name":"05?05?05?","d":"0.001","w":"0.242","c":"0.011","ssl":"0","service":"0.052","response":"1.506","down":"0.002"},{"name":"05?05?15?","d":"0.001","w":"0.171","c":"0.013","ssl":"0","service":"0.043","response":"1.250","down":"0.002"},{"name":"05?05?25?","d":"0.002","w":"0.138","c":"0.013","ssl":"0","service":"0.038","response":"1.169","down":"0.003"},{"name":"05?05?35?","d":"0.002","w":"0.176","c":"0.009","ssl":"0","service":"0.053","response":"1.207","down":"0.003"},{"name":"05?05?45?","d":"0.001","w":"0.201","c":"0.014","ssl":"0","service":"0.035","response":"1.177","down":"0.013"},{"name":"05?05?55?","d":"0.001","w":"0.151","c":"0.014","ssl":"0","service":"0.035","response":"1.261","down":"0.002"},{"name":"05?06?05?","d":"0","w":"0.166","c":"0.009","ssl":"0","service":"0.037","response":"1.673","down":"0.003"},{"name":"05?06?15?","d":"0.001","w":"0.171","c":"0.010","ssl":"0","service":"0.048","response":"1.204","down":"0.001"},{"name":"05?06?25?","d":"0.001","w":"0.158","c":"0.015","ssl":"0","service":"0.055","response":"1.259","down":"0.002"},{"name":"05?06?35?","d":"0.002","w":"0.244","c":"0.013","ssl":"0","service":"0.047","response":"1.255","down":"0.002"},{"name":"05?06?45?","d":"0.001","w":"0.171","c":"0.011","ssl":"0","service":"0.035","response":"1.202","down":"0.003"},{"name":"05?06?55?","d":"0.001","w":"0.166","c":"0.018","ssl":"0","service":"0.069","response":"1.202","down":"0.002"},{"name":"05?07?05?","d":"0.001","w":"0.161","c":"0.012","ssl":"0","service":"0.053","response":"1.754","down":"0.001"},{"name":"05?07?15?","d":"0.001","w":"0.174","c":"0.013","ssl":"0","service":"0.042","response":"1.243","down":"0.003"},{"name":"05?07?25?","d":"0.001","w":"0.197","c":"0.010","ssl":"0","service":"0.042","response":"1.182","down":"0.001"},{"name":"05?07?35?","d":"0.002","w":"0.170","c":"0.014","ssl":"0","service":"0.056","response":"1.271","down":"0.007"},{"name":"05?07?45?","d":"0.002","w":"0.158","c":"0.013","ssl":"0","service":"0.035","response":"1.188","down":"0.002"},{"name":"05?07?55?","d":"0.001","w":"0.170","c":"0.011","ssl":"0","service":"0.036","response":"1.225","down":"0.006"},{"name":"05?08?05?","d":"0","w":"0.157","c":"0.010","ssl":"0","service":"0.040","response":"1.222","down":"0.002"},{"name":"05?08?15?","d":"0.001","w":"0.179","c":"0.008","ssl":"0","service":"0.054","response":"1.147","down":"0.002"},{"name":"05?08?25?","d":"0","w":"0.166","c":"0.012","ssl":"0","service":"0.035","response":"1.177","down":"0.002"},{"name":"05?08?35?","d":"0","w":"0.206","c":"0.010","ssl":"0","service":"0.083","response":"1.126","down":"0.001"},{"name":"05?08?45?","d":"0.002","w":"0.176","c":"0.017","ssl":"0","service":"0.035","response":"1.151","down":"0.002"},{"name":"05?08?55?","d":"0.001","w":"0.190","c":"0.011","ssl":"0","service":"0.033","response":"1.207","down":"0.006"},{"name":"05?09?05?","d":"0.001","w":"0.202","c":"0.017","ssl":"0","service":"0.037","response":"1.135","down":"0.001"},{"name":"05?09?15?","d":"0","w":"0.159","c":"0.011","ssl":"0","service":"0.037","response":"1.131","down":"0.008"},{"name":"05?09?25?","d":"0","w":"0.160","c":"0.010","ssl":"0","service":"0.048","response":"1.180","down":"0.001"},{"name":"05?09?35?","d":"0.003","w":"0.145","c":"0.012","ssl":"0","service":"0.059","response":"1.158","down":"0.003"},{"name":"05?09?45?","d":"0.001","w":"0.208","c":"0.012","ssl":"0","service":"0.047","response":"1.200","down":"0"},{"name":"05?09?55?","d":"0.001","w":"0.177","c":"0.020","ssl":"0","service":"0.048","response":"1.163","down":"0.002"},{"name":"05?10?05?","d":"0.003","w":"0.158","c":"0.013","ssl":"0","service":"0.080","response":"1.169","down":"0.002"},{"name":"05?10?15?","d":"0.001","w":"0.186","c":"0.051","ssl":"0","service":"0.045","response":"1.182","down":"0.002"},{"name":"05?10?25?","d":"0.001","w":"0.145","c":"0.011","ssl":"0","service":"0.035","response":"2.116","down":"0.001"},{"name":"05?10?35?","d":"0","w":"0.176","c":"0.033","ssl":"0","service":"0.035","response":"1.184","down":"0.001"},{"name":"05?10?45?","d":"0.001","w":"0.171","c":"0.031","ssl":"0","service":"0.032","response":"1.153","down":"0.009"},{"name":"05?10?55?","d":"0.002","w":"0.245","c":"0.027","ssl":"0","service":"0.042","response":"1.194","down":"0.009"},{"name":"05?11?05?","d":"0","w":"0.153","c":"0.013","ssl":"0","service":"0.039","response":"1.202","down":"0.004"},{"name":"05?11?15?","d":"0.001","w":"0.187","c":"0.012","ssl":"0","service":"0.033","response":"1.151","down":"0.004"},{"name":"05?11?25?","d":"0","w":"0.190","c":"0.012","ssl":"0","service":"0.039","response":"1.143","down":"0.001"},{"name":"05?11?35?","d":"0.001","w":"0.174","c":"0.025","ssl":"0","service":"0.033","response":"1.125","down":"0.002"},{"name":"05?11?45?","d":"0","w":"0.170","c":"0.018","ssl":"0","service":"0.028","response":"1.122","down":"0.001"},{"name":"05?11?55?","d":"0.001","w":"0.171","c":"0.008","ssl":"0","service":"0.038","response":"1.166","down":"0.001"},{"name":"05?12?05?","d":"0.001","w":"0.199","c":"0.016","ssl":"0","service":"0.035","response":"1.178","down":"0.002"}]}
    QQ截图20130705121351.png
    Chinese

  2. #2
    Sencha User sailei1's Avatar
    Join Date
    Jul 2011
    Location
    BeiJing China
    Posts
    43

    Default

    var store = Ext.create("Ext.data.Store", {

    fields:['response','service','ssl','w','c','d','down','name'],
    // {name:'name',type:'date',dateFormat:'d?G?i?'}],
    // //'name'],

    // fields: [{name:'c',type: 'float'},{name:'d',type: 'float'},{name:'down',type: 'float'},{name:'name',type:'date',dateFormat:'d?G?i?'},
    // {name:'response',type: 'float'},{name:'service',type: 'float'},{name:'ssl',type: 'float'},{name:'w',type: 'float'},],
    data:result.picData.data
    });
    debugger;
    items.push({xtype:'container',
    layout:'fit',
    items:[{ xtype: 'chart',
    store tore,
    background: 'white',
    colors: ["#115fa6", "#94ae0a", "#a61120", "#ff8809", "#ffd13e", "#a61187", "#24ad9a", "#7c7474", "#a66111"],
    interactions: ['panzoom'],
    legend: {
    position: 'bottom'
    },
    axes: [
    {
    type: 'numeric',
    position: 'left',
    //fields: ['response','service','ssl','w','c','d','down'],
    // grid: true,
    // minimum: 0,
    },
    {
    type: 'category',
    position: 'bottom',
    fields: 'name',
    }
    // {type: 'time',
    // dateFormat: 'd?G?i?', //
    // fields: ['name'],
    // position: 'bottom',
    // visibleRange: [0, 0.5],
    // }
    ],
    series: [
    {
    type: 'bar',
    xField: 'name',
    yField: ['response','service','ssl','w','c','d','down'],
    stacked: true,
    style: {
    stroke: 'rgb(40,40,40)'
    },
    }
    ],



    }]
    })
    QQ截图20130705122937.png
    Chinese

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •