java.lang.Object
org.unifi.mecvirtualresourceallocation.evaluation.util.ChartUtils

public final class ChartUtils extends Object
Utility class for creating and displaying charts using the JFreeChart library.
  • 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 chart
      xAxisLabel - the label for the X-axis
      yAxisLabel - the label for the Y-axis
      data - the data to be displayed in the chart, where the key is the X value and the value is the Y value
      label - 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 chart
      xAxisLabel - the label for the X-axis
      yAxisLabel - the label for the Y-axis
      data1 - the first data series to be displayed in the chart
      label1 - the label for the first data series
      data2 - the second data series to be displayed in the chart
      label2 - 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 chart
      xAxisLabel - the label for the X-axis
      yAxisLabel - the label for the Y-axis
      data1 - the first data series of execution times to be displayed in the chart
      label1 - the label for the first data series
      data2 - the second data series of execution times to be displayed in the chart
      label2 - the label for the second data series