Results 1 to 4 of 4

Thread: Chart doesn't show new data loaded with LoadData of the chart's store

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294
    Vote Rating
    47
      0  

    Default Chart doesn't show new data loaded with LoadData of the chart's store

    Ext version tested:
    • Ext 6.0.0 rev 640
    Browser versions tested against:

    All browsers

    DOCTYPE tested against:

    <!DOCTYPE HTML>

    Description:
    • Chart doesn't show new data loaded with LoadData method of the chart's store
    Steps to reproduce the problem:


    Fiddle1 and Fiddle2
    • Create a Ext.chart.PolarChart chart with pie or gauge series and store as a data provider (see Fiddle1 or Fiddle2).
    • Load data with loadData method of the store.
    For example for FIddle1 if you trigger a legend's actions the chart is re-rendered with new data.

    The result that was expected:
    • Chart immediately renders loaded data.
    The result that occurs instead:
    • Nothing happens.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Vote Rating
    293
      0  

    Default

    Thanks for the report. So when you click on legend items the chart doesn't quickly redraw with the remaining data?

  3. #3
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294
    Vote Rating
    47
      0  

    Default

    The problem is, that when we use loadData the charts are not re-rendered with new data after load. But when we trigger the legend, chart applies new data and renders it. The "legend" is only an example to show, that after load charts become data but not re-render with new values.
    Good example is Fiddle2 where legend isn't used at all.
    We listen when the chart is rendered and load data.
    Code:
    listeners: {
            afterrender: function(){
                this.getStore().loadData([{percent: 20}]);
            }  
        },
    This data is not rendered after load.
    To see expected result uncomment string 16.

    Thanks.

  4. #4
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294
    Vote Rating
    47
      0  

    Default

    It looks like afterrender isn't correct place to load data in a chart. Moving load functionality to separate button solves this problem.
    In any case as for me after afterrender event the component should be ready to get data.

Similar Threads

  1. chart loadData() issue in the Build a Car Store example
    By denisputnam in forum Sencha Architect 2.x: Help & Discussions
    Replies: 0
    Last Post: 2 May 2012, 7:29 PM
  2. Replies: 3
    Last Post: 16 Dec 2011, 5:20 AM
  3. My Store data does not show up on the chart.
    By sluboch in forum Ext: Discussion
    Replies: 2
    Last Post: 16 Aug 2011, 10:27 AM
  4. Replies: 1
    Last Post: 26 May 2011, 3:37 PM

Posting Permissions

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