Gephi Toolkit Javadoc

org.gephi.utils.sparklines
Class SparklineGraph

java.lang.Object
  extended by org.gephi.utils.sparklines.SparklineGraph

public class SparklineGraph
extends java.lang.Object

Class for drawing sparkline graphics.

Drawing settings are controlled with SparklineParameters class

Use SparklineComponent class to easily include interactive sparklines in your GUI

Author:
Eduardo Ramos
See Also:
SparklineParameters

Constructor Summary
SparklineGraph()
           
 
Method Summary
static java.awt.image.BufferedImage draw(java.lang.Number[] xValues, java.lang.Number[] yValues, java.lang.Number yMinValue, java.lang.Number yMaxValue, SparklineParameters parameters)
          Draw a sparkline with x axis and y axis values, and pre-calculated min and max of the y axis values.
static java.awt.image.BufferedImage draw(java.lang.Number[] xValues, java.lang.Number[] yValues, SparklineParameters parameters)
          Draw a sparkline with x axis and y axis values.
static java.awt.image.BufferedImage draw(java.lang.Number[] yValues, java.lang.Number yMinValue, java.lang.Number yMaxValue, SparklineParameters parameters)
          Draw a sparkline only providing y axis values, and pre-calculated min and max of the y axis values.
static java.awt.image.BufferedImage draw(java.lang.Number[] values, SparklineParameters parameters)
          Draw a sparkline only providing y axis values (1 x tick per number assumed)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparklineGraph

public SparklineGraph()
Method Detail

draw

public static java.awt.image.BufferedImage draw(java.lang.Number[] values,
                                                SparklineParameters parameters)
Draw a sparkline only providing y axis values (1 x tick per number assumed)

Parameters:
values - Y axis values
parameters - Rendering parameters
Returns:
Image of the sparkline

draw

public static java.awt.image.BufferedImage draw(java.lang.Number[] xValues,
                                                java.lang.Number[] yValues,
                                                SparklineParameters parameters)
Draw a sparkline with x axis and y axis values. X values must be ordered and not repeated.

Parameters:
xValues - X axis values
yValues - Y axis values
parameters - Rendering parameters
Returns:
Image of the sparkline

draw

public static java.awt.image.BufferedImage draw(java.lang.Number[] yValues,
                                                java.lang.Number yMinValue,
                                                java.lang.Number yMaxValue,
                                                SparklineParameters parameters)
Draw a sparkline only providing y axis values, and pre-calculated min and max of the y axis values. Use this when you already have min/max values calculated and want to avoid extra calculations by SparklineGraph

Parameters:
yValues - Y axis values
yMinValue - Minimum value of the Y axis, should be correct
yMaxValue - Maximum value of the Y axis, should be correct
parameters - Rendering parameters
Returns:
Image of the sparkline

draw

public static java.awt.image.BufferedImage draw(java.lang.Number[] xValues,
                                                java.lang.Number[] yValues,
                                                java.lang.Number yMinValue,
                                                java.lang.Number yMaxValue,
                                                SparklineParameters parameters)
Draw a sparkline with x axis and y axis values, and pre-calculated min and max of the y axis values. Use this when you already have min/max values calculated and want to avoid extra calculations by SparklineGraph X values must be ordered and not repeated.

Parameters:
xValues - X axis values
yValues - Y axis values
yMinValue - Minimum value of the Y axis, should be correct
yMaxValue - Maximum value of the Y axis, should be correct
parameters - Rendering parameters
Returns:
Image of the sparkline

Gephi Toolkit Javadoc