https://github.com/jayrbolton/ff-chartist
Flexible graph component for flimflam
https://github.com/jayrbolton/ff-chartist
Last synced: 2 months ago
JSON representation
Flexible graph component for flimflam
- Host: GitHub
- URL: https://github.com/jayrbolton/ff-chartist
- Owner: jayrbolton
- Created: 2017-01-11T22:48:29.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-12T19:15:19.000Z (over 8 years ago)
- Last Synced: 2025-01-04T23:43:01.080Z (4 months ago)
- Language: CSS
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flimflam/snabbdom chartist
A thin wrapper around [Chartist](https://gionkunz.github.io/chartist-js/api-documentation.html) that returns a snabbdom VNode so you can work with it in your flimflam setup.
It uses all the same API for the `new Chart` function from the documentation above -- pass in the 'type' ('Line', 'Bar', etc) as the first argument.
This doesn't yet handle dynamic chart updating or the chart events (like 'draw' or 'created').
```js
import chart from 'ff-chartist'function view(state) {
const data = {
series: [[1,2,3],[4,5,6]]
, labels: ['a', 'b', 'c']
}
const options {width: 100, height: 100}
return h('div', [
chart('Line', data, options)
])
}graph.view(stateObject, configurationObject)
```