Chart is a set of plots, where each plot is a sequence of 2D points.

Chart may have title, names of each axis and optional format used by report processor (ReportFormat). Plot also may have title.
Plotter is used to fill in plot.

The charts may be used to represent some test results, for example, chart of running time vs total numer of items in array for sorting function.

Reporters can be used to human-friendly representation of charts. Available reporters:

Another reporter can be implemented using Reporter interface.

Usage example

    Reporter plotReporter = CombinedReporter {
        ConsoleReporter (
            ReportFormat(", ", 0, 0, 0, 0)
        ),
        CSVReporter (
            ReportFormat(", ", 0, 0, 0, 0),
            "../report.csv",
            true
        )
    };

    ChartBuilder builder = ChartBuilder("title", "category", "value");
    Plotter plotter1 = builder.addPlot("plot 1");
    Plotter plotter2 = builder.addPlot("plot 2");

    plotter1.addPoint( 1.0, 1.0 );
    ...
    plotter2.addPoint( 1.0, 1.0 );
    ...
    plotReporter.report(builder.build());

By: Lis
Since 0.3.0
Functions
reportChartByLinesshared void reportChartByLines(ReportFormat defaultFormat, Chart[] charts, void writeLine(String line))

Reports charts writing line by line:

  • line with chart title, category title and value title
  • line with plot titles
  • lines with points for each plot

Each item is separated using ReportFormat.delimiter.
Numbers are reported using language formatFloat with given decimalPlaces.

Parameters:
  • defaultFormat

    Default format used if no format specified in chart.

  • charts

    Charts to be reported.

  • writeLine

    Function used to write a line.

By: Lis
Since 0.3.0
Interfaces
Plottershared Plotter

Plot builder.

Reportershared Reporter

Reports charts.

Classes
CSVReportershared CSVReporter

Reports to a file.

Chartshared Chart

Chart as axis definitions and a list of plots.

ChartBuildershared ChartBuilder

Builds a chart.

ChartDescriptionshared ChartDescription

Description of a chart:

  • title
  • category axis title
  • value axis title
  • plot titles
CombinedReportershared CombinedReporter

Reports to a set of reporters

ConsoleReportershared ConsoleReporter

Reports to console

Plotshared Plot

A one plot as a list of points.

Pointshared Point

A one point on a plot.

Rectangleshared Rectangle

Rectangle in 2D.

ReportFormatshared ReportFormat

Represents details of report format.