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

Show 15 series takes a long time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.2
    • 3.0.1
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. run the attached zul
      2. click 5 legends to hide 5 series manually
      3. click "show all" button to show all series

      Current Result

      it takes a long time to show all series

      Expected Result

      the time can be reduced

      Debug Information

      • since the server call show() for all series, so it causes client-side to redraw each series one by one. Please see the profile.

      Workaround

      There are 2 workarounds:
      1. charts.invalidate();
      2. listen to onPlotHide and set visible false

      	@Listen("onPlotHide = #charts")
      	public void hide(ChartsEvent e){
      		e.getSeries().setVisible(false);
      	}
      

      only call show() to those invisible series

      				if (!charts.getSeries(i).isVisible()){ //workaround 2
      					charts.getSeries(i).show();
      				};
      

        1. ChartComposer_5793.java
          1 kB
        2. Profile-chartShow
          8.48 MB
        3. profile-show.png
          profile-show.png
          50 kB
        4. t5793.zul
          0.1 kB

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

              Created:
              Updated:
              Resolved:

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