aivika-experiment-chart-0.4: Simulation experiments with charting for the Aivika library

MaintainerDavid Sorokin <>
Safe HaskellNone



Tested with: GHC 7.4.1

The module defines XYChartView that saves the XY charts in the PNG files.



data XYChartView Source

Defines the View that saves the XY charts in the PNG files.




xyChartTitle :: String

This is a title used in HTML.

xyChartDescription :: String

This is a description used in HTML.

xyChartWidth :: Int

The width of the chart.

xyChartHeight :: Int

The height of the chart.

xyChartFileName :: FileName

It defines the file name for each PNG file. It may include special variables $TITLE, $RUN_INDEX and $RUN_COUNT.

An example is

   xyChartFileName = UniqueFileName "$TITLE - $RUN_INDEX" ".png"
xyChartPredicate :: Event Bool

It specifies the predicate that defines when we plot data in the chart.

xyChartXSeries :: Maybe String

This is a label of the X series.

You must define it, because it is Nothing by default.

xyChartYSeries :: [Either String String]

It contains the labels of Y series plotted on the XY chart.

xyChartPlotTitle :: String

This is a title used in the chart when simulating a single run. It may include special variable $TITLE.

An example is

   xyChartPlotTitle = "$TITLE"
xyChartRunPlotTitle :: String

The run title for the chart. It is used when simulating multiple runs and it may include special variables $RUN_INDEX, $RUN_COUNT and $PLOT_TITLE.

An example is

   xyChartRunPlotTitle = "$PLOT_TITLE / Run $RUN_INDEX of $RUN_COUNT"
xyChartPlotLines :: [PlotLines Double Double -> PlotLines Double Double]

Probably, an infinite sequence of plot transformations based on which the plot is constructed for each Y series. Generally, it may not coincide with a sequence of Y labels as one label may denote a whole list or an array of data providers.

Here you can define a colour or style of the plot lines.

xyChartBottomAxis :: LayoutAxis Double -> LayoutAxis Double

A transformation of the bottom axis, after the X title is added.

xyChartLayout :: Layout1 Double Double -> Layout1 Double Double

A transformation of the plot layout, where you can redefine the axes, for example.


defaultXYChartView :: XYChartViewSource

The default time series view.