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

Change a model but the legends of previous series still exist

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.2.1.2
    • Fix Version/s: 7.2.2.0
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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