This package bundles the minified http://www.chartjs.org/ code into a Haskell package, so it can be depended upon by Cabal packages.
The first three components of the version number match the upstream chart.js version.
The package is designed to meet the redistribution requirements of downstream users (e.g. Debian).
This package is a fork of https://hackage.haskell.org/package/js-flot using chart.js instead of flot.
importqualified Language.Javascript.Chart as Chartmain = do
putStrLn $ "Chart version " ++ show Chart.version ++ " source:"
putStrLn =<< readFile =<< Chart.file Chart.Chart
This package installs data files containing the chart.js sources, which must be available at runtime. If you want to produce an executable with no dependency on associated data files, you can use the file-embed library:
{-# LANGUAGE TemplateHaskell #-}import Data.FileEmbedimportqualified Data.ByteString as BSimportqualified Language.Javascript.Chart as Chartimport Language.Haskell.TH.Syntaxmain = print chartContents
chartContents :: BS.ByteStringchartContents = $(embedFile =<< runIO (Chart.file Chart.Chart))