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

resizing chart causes incorrect rendering

XMLWordPrintable

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

      when we send sizing continually to client, the width of SVG element won't be change.

       
      <zk> 
          <charts id="myComp2" title="Pie Chart Demo" type="pie"/>
      	
          <zscript><![CDATA[
              PieModel piemodel = new SimplePieModel();
              piemodel.setValue("C/C++", new Double(12.5));
              piemodel.setValue("Java", new Double(50.2));
              piemodel.setValue("VB", new Double(20.5));
              piemodel.setValue("PHP", new Double(15.5));
              myComp2.setModel(piemodel);
              ]]></zscript>
          
          <button onClick="myComp2.setWidth(new Integer(500));myComp2.setHeight(new Integer(500));" label="test"></button>
      </zk>
      

      in this case SVG element still has the same width.

       
      <zk> 
          
      	<charts id="myComp2" title="Pie Chart Demo" type="pie"/>
      	
          <zscript><![CDATA[
              PieModel piemodel = new SimplePieModel();
              piemodel.setValue("C/C++", new Double(12.5));
              piemodel.setValue("Java", new Double(50.2));
              piemodel.setValue("VB", new Double(20.5));
              piemodel.setValue("PHP", new Double(15.5));
              myComp2.setModel(piemodel);
              myComp2.setAnimation(false);
              ]]></zscript>
          
          <button onClick="myComp2.setHeight(new Integer(500));myComp2.setWidth(new Integer(500));" label="test"></button>
      </zk>
      

      in this case, it works. I just changed the order of setters for height and width and set animation to false.

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

              Created:
              Updated:
              Resolved: