Results 1 to 5 of 5

Thread: Charts legend reloading issue

  1. #1
    Sencha User
    Join Date
    Aug 2016
    Posts
    14

    Default Charts legend reloading issue

    Hi,

    I have upgrade my sencha from 6.0.2 to 6.5.2. When i'm testing graphs functionality, i observed, when i first loaded the chart dynamically, charts and legend functionalities are working fine. But, when i reload i.e when the store data changes, its throwing an error saying 'cannot read property 'getMarkerStyleByIndex' of undefined' in SpriteLegend.js.

    here i'm loading the graphs dynamically based on data. And i'm using line and scatter charts.

    I'm using setSeries() function to plot.

    When I tried plotting using addSeries(), I did not encounter the above error but, the legends are getting added to the current legends for each time i load data, instead of getting overriden.

    please provide your suggestions to overcome this.

  2. #2
    Sencha Premium User tlloyduk's Avatar
    Join Date
    Sep 2010
    Posts
    91
    Answers
    1

    Default

    I have got the same problem

  3. #3
    Sencha Premium User tlloyduk's Avatar
    Join Date
    Sep 2010
    Posts
    91
    Answers
    1

    Default

    The problem for me was that I was calling setSeries before setStore on the chart, so the series didn't exist in the data when the Legend was drawn and hence the error.

    Code:
    chartStore.setData(data.get('chart').data);
    chart.setStore(chartStore);
    chart.setSeries(newSeries);

  4. #4
    Sencha Premium User tlloyduk's Avatar
    Join Date
    Sep 2010
    Posts
    91
    Answers
    1

    Default

    Actually no, this didn't help in all cases... still trying to find the solution other than recreating the entire chart on each reload

  5. #5

    Default

    I'm having the same problem, and using loadData on charts store to load new data. Chart refreshes fine but not its legend. I tried lengend update method but the make this empty.

    Any help will be much appreciated.


    Thanks,

Similar Threads

  1. Charts reloading issue
    By Sri Vidya in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 17 May 2017, 3:47 PM
  2. Charts: Scrolling of Legend
    By Perry Lee in forum Ext: Discussion
    Replies: 6
    Last Post: 4 Nov 2013, 10:00 PM
  3. Charts Legend
    By senchaFan23 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 7 Jan 2013, 6:32 AM
  4. [FIXED] [PR3] Legend on Pie chart walks on store reloading
    By mitchellsimoens in forum Ext:Bugs
    Replies: 4
    Last Post: 6 Dec 2011, 6:14 AM
  5. problem with legend in Charts
    By nnimmakayala in forum Ext: Q&A
    Replies: 0
    Last Post: 21 Sep 2011, 1:22 AM

Posting Permissions

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