Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fresheyeball/elm-chartjs
Use Chartjs charts in Elm
https://github.com/fresheyeball/elm-chartjs
Last synced: 7 days ago
JSON representation
Use Chartjs charts in Elm
- Host: GitHub
- URL: https://github.com/fresheyeball/elm-chartjs
- Owner: Fresheyeball
- License: bsd-3-clause
- Created: 2015-09-21T01:52:10.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-19T07:05:28.000Z (over 8 years ago)
- Last Synced: 2024-05-09T13:42:10.725Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 86.9 KB
- Stars: 16
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elm bindings to Chartjs.
This package allows you to mix [Chartjs](http://www.chartjs.org/) canvas based charts into your [Elm](http://elm-lang.org/) application. The api is modeled after `Graphics.Element` and is well typed (in most cases).
Bindings exist for all 6 Chartjs chart types
- Line
- Bar
- Radar
- Polar
- Pie
- DoughnutCurrently listening for events in charts is not supported, but will be soon.
### Usage
```elm
import Chartjs.Line as Lineview : Model -> Html
view model = div []
[ fromElement <| Line.chart' 700 300 model.stuff ]
```### Examples
run
```
elm reactor
```To see the examples.
---
## Contribute
Found a bug? Want to add a feature?
Native glue from JavaScript to Elm is in [**wisp**. Wisp](https://github.com/Gozala/wisp) is
> Homoiconic JS with Clojure syntax, s-expressions & macros.
Basically ClojureScript lite.
The wisp wrapper can be found [here.](https://github.com/Fresheyeball/elm-chartjs/blob/master/src/Native/Wrapper.wisp)
### Building
First get the latest *Chartjs** run
```bash
sh update-from-bower.sh
```Then you can build the artifact
```bash
sh make.sh
```Check work in the reactor like normal.