org.javasimon.utils
Class GoogleInteractiveChartGenerator

java.lang.Object
  extended by org.javasimon.utils.GoogleInteractiveChartGenerator

public final class GoogleInteractiveChartGenerator
extends Object

Generates HTML page that generates JavaScript interactive graph based on Google Charts. http://code.google.com/apis/chart/

Author:
Richard "Virgo" Richter

Field Summary
private static int ONE_BAR_WIDTH
           
 
Constructor Summary
private GoogleInteractiveChartGenerator()
           
 
Method Summary
static String barChart(StopwatchSample[] samples, String title, double divisor, String unit)
          Generates Google bar chart HTML5 source code for the provided samples.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE_BAR_WIDTH

private static final int ONE_BAR_WIDTH
See Also:
Constant Field Values
Constructor Detail

GoogleInteractiveChartGenerator

private GoogleInteractiveChartGenerator()
Method Detail

barChart

public static String barChart(StopwatchSample[] samples,
                              String title,
                              double divisor,
                              String unit)
Generates Google bar chart HTML5 source code for the provided samples.

Parameters:
samples - stopwatch samples
title - chart title
divisor - value divisor. For example: if values are in ns and ms are required, divisor should be set to 1000000.
unit - unit shown after values under every bar - TODO currently not used
Returns:
HTML5 source code displaying the chart


Copyright © 2013. All Rights Reserved.