|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ebay.carad.os.vitalsigns.util.ChartUtil
public abstract class ChartUtil
This class produces a time-series chart, and saves it as a JPEG to the specified location.
Field Summary | |
---|---|
private static java.lang.String |
CURRENT_DAY_LABEL
Label string for legends. |
private static java.lang.String |
CURRENT_HOUR_LABEL
Label string for legends. |
private static java.lang.String |
CURRENT_MONTH_LABEL
Label string for legends. |
private static java.lang.String |
CURRENT_WEEK_LABEL
Label string for legends. |
private static java.lang.String |
CURRENT_YEAR_LABEL
Label string for legends. |
static java.util.List |
DAYLEGEND
Legend for day charts. |
static java.util.List |
HOURLEGEND
Legend for hour charts. |
private static org.apache.log4j.Logger |
LOGGER
Class logger. |
static java.util.List |
MONTHLEGEND
Legend for month charts. |
private static java.lang.String |
ONE_DAY_AGO_LABEL
Label string for legends. |
private static java.lang.String |
ONE_MONTH_AGO_LABEL
Label string for legends. |
private static java.lang.String |
ONE_WEEK_AGO_LABEL
Label string for legends. |
private static java.lang.String |
ONE_YEAR_AGO_LABEL
Label string for legends. |
static java.util.List |
WEEKLEGEND
Legend for week charts. |
static java.util.List |
YEARLEGEND
Legend for year charts. |
Constructor Summary | |
---|---|
ChartUtil()
|
Method Summary | |
---|---|
private static void |
encode(java.awt.image.BufferedImage img,
java.io.OutputStream out,
float quality)
|
static void |
saveChart(org.jfree.chart.JFreeChart chart,
java.lang.String path,
int width,
int height)
Saves the given chart to the given destination JPG file at 85% quality. |
static void |
saveChart(org.jfree.chart.JFreeChart chart,
java.lang.String path,
int width,
int height,
float quality)
Saves the given chart to the given destination JPG file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOGGER
private static final java.lang.String CURRENT_HOUR_LABEL
private static final java.lang.String CURRENT_DAY_LABEL
private static final java.lang.String CURRENT_WEEK_LABEL
private static final java.lang.String CURRENT_MONTH_LABEL
private static final java.lang.String CURRENT_YEAR_LABEL
private static final java.lang.String ONE_DAY_AGO_LABEL
private static final java.lang.String ONE_WEEK_AGO_LABEL
private static final java.lang.String ONE_MONTH_AGO_LABEL
private static final java.lang.String ONE_YEAR_AGO_LABEL
public static final java.util.List HOURLEGEND
public static final java.util.List DAYLEGEND
public static final java.util.List WEEKLEGEND
public static final java.util.List MONTHLEGEND
public static final java.util.List YEARLEGEND
Constructor Detail |
---|
public ChartUtil()
Method Detail |
---|
private static void encode(java.awt.image.BufferedImage img, java.io.OutputStream out, float quality) throws java.io.IOException
java.io.IOException
public static void saveChart(org.jfree.chart.JFreeChart chart, java.lang.String path, int width, int height)
chart
- the chart to savepath
- the path of the image to save towidth
- the width of the image in pixelsheight
- the height of the image in pixespublic static void saveChart(org.jfree.chart.JFreeChart chart, java.lang.String path, int width, int height, float quality)
chart
- the chart to savepath
- the path of the image to save towidth
- the width of the image in pixelsheight
- the height of the image in pixesquality
- the quality of the JPG, from 0 to 1.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |