Skip to content

altworx/elm-chartjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elm bindings to Chartjs.

This package allows you to mix Chartjs canvas based charts into your Elm 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
  • StackedBar
  • Radar
  • Polar
  • Pie
  • Doughnut

Currently listening for events in charts is not supported, but will be soon.

Usage

Set up elm-package.json

"source-directories": ["node_modules/elm-chartjs/src", ...]
import Chartjs.Line as Line

view : Model -> Html
view model = div []
  [ fromElement <| Line.chart' 700 300 model.stuff ]

Examples

run

elm reactor

To see the examples.

Packages

No packages published

Languages

  • JavaScript 80.1%
  • Elm 10.2%
  • Shell 9.7%