public class ChartUtils extends Object
| Constructor and Description |
|---|
ChartUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.jfree.data.category.CategoryDataset |
createDatasetCountLine(List<Duration> inputDataset,
String countLabel)
Create a data structure that hold the amount of test executions
This is used for a bar chart that represends the test/service method duration in time and amount of method/service executions
|
static org.jfree.data.category.CategoryDataset |
createDatasetDuration(List<Duration> inputDataset,
String labelSeries1,
String labelSeries2,
String labelSeries3)
Create a data structure that holds the min, max and avg duration
This is used for a bar chart that represends the test/service method duration in time
|
static BufferedImage |
getBufferedImageChartImage(org.jfree.chart.JFreeChart chart,
int width,
int height)
Returns a BufferedImage of JFreeChart object
|
static org.jfree.chart.JFreeChart |
getDualAxisChart(String chartTitle,
org.jfree.data.category.CategoryDataset barDataset,
org.jfree.data.category.CategoryDataset lineDataset)
This method creates a chart that has vertical bars and a line graph though it.
|
static org.jfree.chart.JFreeChart |
getPieChart(String title,
org.jfree.data.general.DefaultPieDataset dataset)
Returns JFree chart for dataset
|
static org.jfree.data.general.DefaultPieDataset |
getPieChartDataset(Map<String,Double> datasetValues)
Returns a PieDataset
|
public static BufferedImage getBufferedImageChartImage(org.jfree.chart.JFreeChart chart, int width, int height)
chart - JFreeChart objectwidth - widthheight - heightpublic static org.jfree.chart.JFreeChart getPieChart(String title, org.jfree.data.general.DefaultPieDataset dataset)
title - dataset - public static org.jfree.data.general.DefaultPieDataset getPieChartDataset(Map<String,Double> datasetValues)
datasetValues - public static org.jfree.data.category.CategoryDataset createDatasetDuration(List<Duration> inputDataset, String labelSeries1, String labelSeries2, String labelSeries3)
inputDataset - list of duration beanslabelSeries1 - minlabelSeries2 - maxlabelSeries3 - avgpublic static org.jfree.data.category.CategoryDataset createDatasetCountLine(List<Duration> inputDataset, String countLabel)
inputDataset - list of duration beanscountLabel - amount of method/service executionspublic static org.jfree.chart.JFreeChart getDualAxisChart(String chartTitle, org.jfree.data.category.CategoryDataset barDataset, org.jfree.data.category.CategoryDataset lineDataset)
chartTitle - title of chartbarDataset - the bar series datalineDataset - the line series dasaCopyright © 2014. All rights reserved.