Class ChartUtils
java.lang.Object
org.unifi.mecvirtualresourceallocation.evaluation.util.ChartUtils
Utility class for creating and displaying charts using the JFreeChart library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateAndShowChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, BigDecimal> data, String label) Creates and displays a chart with a single series of data.static voidcreateAndShowChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, BigDecimal> data1, String label1, Map<Integer, BigDecimal> data2, String label2) Creates and displays a chart with two series of data.static voidcreateAndShowExecutionTimeChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, Long> data1, String label1, Map<Integer, Long> data2, String label2) Creates and displays a chart with two series of execution time data.
-
Method Details
-
createAndShowChart
public static void createAndShowChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, BigDecimal> data, String label) Creates and displays a chart with a single series of data.- Parameters:
title- the title of the chartxAxisLabel- the label for the X-axisyAxisLabel- the label for the Y-axisdata- the data to be displayed in the chart, where the key is the X value and the value is the Y valuelabel- the label for the data series
-
createAndShowChart
public static void createAndShowChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, BigDecimal> data1, String label1, Map<Integer, BigDecimal> data2, String label2) Creates and displays a chart with two series of data.- Parameters:
title- the title of the chartxAxisLabel- the label for the X-axisyAxisLabel- the label for the Y-axisdata1- the first data series to be displayed in the chartlabel1- the label for the first data seriesdata2- the second data series to be displayed in the chartlabel2- the label for the second data series
-
createAndShowExecutionTimeChart
public static void createAndShowExecutionTimeChart(String title, String xAxisLabel, String yAxisLabel, Map<Integer, Long> data1, String label1, Map<Integer, Long> data2, String label2) Creates and displays a chart with two series of execution time data.- Parameters:
title- the title of the chartxAxisLabel- the label for the X-axisyAxisLabel- the label for the Y-axisdata1- the first data series of execution times to be displayed in the chartlabel1- the label for the first data seriesdata2- the second data series of execution times to be displayed in the chartlabel2- the label for the second data series
-