Package org.radargun.reporting.html

Examples of org.radargun.reporting.html.LineChart


* @author Radim Vansa <rvansa@redhat.com>
*/
public class LineChartTest {
   @Test
   public void test() {
      LineChart chart = new LineChart("foos", "bars");
      Random random = new Random();
      for (int category = 0; category < 3; category++) {
         double lastValue = 0, lastDev = 1;
         for (int i = 0; i < 30; ++i) {
            lastValue = lastValue + (random.nextBoolean() ? 1 : -1);
            lastDev = lastDev + random.nextDouble() - 0.3;
            chart.addValue(lastValue, lastDev, "Serie" + category, i, String.valueOf(Math.pow(2, i)));
         }
      }
      try {
         chart.setHeight(500).setWidth(600).save("/tmp/foobar.png");
      } catch (IOException e) {
         e.printStackTrace();
      }
   }
View Full Code Here

TOP

Related Classes of org.radargun.reporting.html.LineChart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.