MIT licensed and maintained by Jonas Carpay
This version can be pinned in stack with:js-chart-2.9.4.1@sha256:0f4bc23d19ac869ec0cbdbd7596a5074ba4be68e85fa5bb76a3bed559907b3bc,1802

Module documentation for 2.9.4.1

Depends on 1 package(full list with versions):
Used by 1 package in nightly-2024-11-11(full list with versions):

js-chart Hackage version Stackage version Build status

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.

import qualified Language.Javascript.Chart as Chart

main = 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.FileEmbed
import qualified Data.ByteString as BS
import qualified Language.Javascript.Chart as Chart
import Language.Haskell.TH.Syntax

main = print chartContents

chartContents :: BS.ByteString
chartContents = $(embedFile =<< runIO (Chart.file Chart.Chart))

Changes

Changelog

[2.9.4.1]

[Added]

  • Nix stuff

[Changed]

  • Fix haddock by removing stray TODOs
  • Change CHANGELOG format

[2.9.4]

  • Initial release