-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
166 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
0.7 | ||
=== | ||
|
||
- switch to harpie | ||
|
||
0.6.1 | ||
=== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
packages: | ||
chart-svg.cabal | ||
|
||
allow-newer: | ||
string-interpolate:template-haskell, | ||
markup-parse:containers | ||
|
||
source-repository-package | ||
type: git | ||
branch: master | ||
location: https://github.com/conal/vector-space.git | ||
|
||
write-ghc-environment-files: always | ||
|
||
tests: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Table of Contents | ||
|
||
1. [Usage](#org829f981) | ||
2. [Examples](#orge2856e9) | ||
|
||
[![img](https://img.shields.io/hackage/v/chart-svg.svg)](https://hackage.haskell.org/package/chart-svg) [![img](https://github.com/tonyday567/chart-svg/workflows/haskell-ci/badge.svg)](https://github.com/tonyday567/chart-svg/actions?query=workflow%3Ahaskell-ci) | ||
|
||
![img](other/banner.svg) | ||
|
||
A charting library targetting SVG. | ||
|
||
|
||
<a id="org829f981"></a> | ||
|
||
# Usage | ||
|
||
:r | ||
:set prompt "> " | ||
:set -XOverloadedLabels | ||
:set -XOverloadedStrings | ||
import Chart | ||
import Optics.Core | ||
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]] | ||
styles = (\c -> defaultLineStyle & #color .~ palette c & #size .~ 0.015) <$> [0..2] | ||
cs = zipWith (\s x -> LineChart s [x]) styles lines | ||
lineExample = mempty & #chartTree .~ named "line" cs & #hudOptions .~ defaultHudOptions :: ChartOptions | ||
writeChartOptions "other/usage.svg" lineExample | ||
|
||
![img](other/usage.svg) | ||
|
||
See the haddock documentation for a detailed overview. | ||
|
||
|
||
<a id="orge2856e9"></a> | ||
|
||
# Examples | ||
|
||
To redraw all the examples in Chart.Examples | ||
|
||
import Chart.Examples | ||
writeAllExamples | ||
|
||
ok | ||
|
Oops, something went wrong.