BSD-3-Clause licensed by Tony Day
Maintained by [email protected]
This version can be pinned in stack with:chart-svg-0.3.3@sha256:7a1b77a3d2b743b682f492ffa8fcd7365cf52ccb54271ff7d9d6f44585d3754d,2647

This package provides a charting library targetting SVG as the rendered output.

Usage

:set -XOverloadedLabels
:set -XOverloadedStrings
import Chart
import Optics.Core
let lines = [[Point 0.0 1.0, Point 1.0 1.0, Point 2.0 5.0],[Point 0.0 0.0, Point 2.8 3.0],[Point 0.5 4.0, Point 0.5 0]]
let styles = (\c -> defaultLineStyle & #color .~ palette1 c & #size .~ 0.015) <$> [0..2]
let cs = zipWith (\s x -> LineChart s [x]) styles lines
let lineExample = mempty & #charts .~ named "line" cs & #hudOptions .~ defaultHudOptions :: ChartSvg
writeChartSvg "other/usage.svg" lineExample

See Chart for a broad overview of concepts, and Chart.Examples for practical examples.