1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
    Syntona is on a distinguished road

      0  

    Default Unanswered: Create sencha chart in loop

    Unanswered: Create sencha chart in loop


    Hi,

    I need to create gauge chart showing performance. Now the parameter can changed runtime so the number of charts.
    for that I am creating charts in loop. (just returning chart with different id and value to show)
    below is the code.
    Code:
    var data = Ext.decode(response.responseText);
    var count = data.data.length;
    for (var i=0;i<count;i++)
    {
        rec = data.data[i];
       myGaugeChart = getGaugeChart(rec.Value, rec.Name, rec.Nr);  
       GaugePanel.add(myGaugeChart);
    }
    whereas getGaugeChart function returns a gauge chart with given value.

    But the output displays only first chart. In CSS and in debugger i can see the charts are there with name given. (also in debugger values are sending properly and no error anywhere)

    I have also added label to chart(adding chart to panel and adding toolbar) , so the toolbar is displaying properly but the chart is always empty.

    Could anyone throw some light on it. how to create N chart from the basic model?

    Thanks in advance
    gaugeChart.jpg
    Attached Images

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    0
    Syntona is on a distinguished road

      0  

    Default


    Ok,

    it works. I am able to create charts in loop.
    The problem with the above code is that I was doing (looping and creating charts) in Ext.Ajax.request().Success method.(in asynchronous method call)

    Now I am first retrieving all data from server side. and after that calling my method to create charts.

    Its working flawlessly

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar