-
Notifications
You must be signed in to change notification settings - Fork 85
Frequently Asked Questions
The Layout
data type captures all the information about a chart, so understanding it (and its contained values) is key to controlling the visual appearance of a chart. The repo contains an example script that shows some of the customizations that can be made.
Each axis has a generator (of type AxisFn a
) that builds the axis based upon the points plotted against that axis. The default generator is autoScaledAxis
and automatically scales the axis to have a range large enough to show all of the points. You can override the default generator to use scaledAxis
, and specify the range explicitly:
chart = do
layout_y_axis . laxis_generate .= scaledAxis def (-10,80)
...
There are two mechanisms for this:
The StackedLayouts
type represents a vertical stack of charts (ie 1xN) all with a consistent x axis type and range. An example of its use can be found in the test suite.
Alternatively, an arbitrary collection of charts of any type can be displayed in a grid. See the example elsewhere in the wiki.