Uploaded image for project: 'ZK Charts'
  1. ZK Charts
  2. ZKCHARTS-11

seriers colors disappear or series duplicate on model replacement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.1.0
    • 1.1.0
    • Security Level: Jimmy

      run the attached example as in ZKCHARTS-10 the "update model" fails

      commenting out line 70 shows, that the colors are lost, when replacing the model.
      Trying to preserve the colors (call setColors in line 70) leads to duplicate series stacked on top of each other.
      So you either lose the colors, or duplicate the series when replacing the model with new data.
      It should not be necessary reset the series colors, after replacing the model, or the component should provide an MVVM conformant mechanism to update the Series colors after a model has been replaced.

      The workaround is to call chart.setModel directly before setColors and not rely on NotifyChange which updates the model too late.

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: