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

Legend missing when changing point value in onPlotClick event

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.3.0
    • 1.2.0
    • None

      Reproducible sample:

      Click on any point to change it's data, the correspond legend missing.
      
      <window title="Chart Event" border="normal" hflex="1" vflex="1"
      	apply="demo.ctrl.chart.ChartEventController">
      	<charts id="chart" type="column" />
      </window>
      
      public class ChartEventController extends SelectorComposer<Window> {
      
      	private static final long serialVersionUID = -3296547971541468923L;
      
      	@Wire
      	private Charts chart;
      	public void doAfterCompose(Window comp) throws Exception {
      		super.doAfterCompose(comp);
      		CategoryModel model = new DefaultCategoryModel();
      		model.setValue("1", "A", 200);
      		model.setValue("1", "B", 100);
      		model.setValue("1", "C", 300);
      		model.setValue("2", "A", 100);
      		model.setValue("2", "B", 500);
      		model.setValue("2", "C", 200);
      		model.setValue("3", "A", 600);
      		model.setValue("3", "B", 300);
      		model.setValue("3", "C", 800);
      		chart.setModel(model);
      	}
      
      	@Listen("onPlotClick=#chart")
      	public void clickPlot(ChartsEvent event) {
      		event.getPoint().setY(250);
      	}
      
      }
      

            hanhsu hanhsu
            vincentjian vincentjian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: