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

Change a model but the legends of previous series still exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.2.2.0
    • 7.2.1.2
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. run the zul
      2. click the button to change the model
      It replaces a model having one series of TOTAL_AMOUNT1

      Current Result

      the legend of TOTAL_AMOUNT2 still exists

      Expected Result

      the legend of TOTAL_AMOUNT2 doesn't exist because there is no data for it

      Debug Information

      • chart.setModel(new DefaultCategoryModel()) doesn't clear the legends, either.

      Workaround

      call model.clear() before setting a new model

        1. unexpectedLegend.jpg
          unexpectedLegend.jpg
          24 kB
        2. legendUpdate.zul
          0.2 kB
        3. LegendComposer.java
          2 kB

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h