js-chart: Obtain minified chart.js code

[ javascript, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

This package bundles the minified chart.js 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 js-flot using chart.js instead of flot.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 2.9.4, 2.9.4.1
Change log CHANGELOG.md
Dependencies base (>=4 && <5) [details]
Tested with ghc ==8.0 || ==8.2 || ==8.4 || ==8.6 || ==8.8 || ==8.10
License MIT
Copyright Jonas Carpay 2020, Neil Mitchell 2014-2020, Chart.js contributors 2020
Author Jonas Carpay <jonascarpay@gmail.com>
Maintainer Jonas Carpay <jonascarpay@gmail.com>
Category Javascript
Home page https://github.com/jonascarpay/js-chart#readme
Bug tracker https://github.com/jonascarpay/js-chart/issues
Source repo head: git clone https://github.com/jonascarpay/js-chart.git
Uploaded by jonascarpay at 2020-11-10T14:39:42Z
Distributions Arch:2.9.4.1, Fedora:2.9.4.1, LTSHaskell:2.9.4.1, NixOS:2.9.4.1, Stackage:2.9.4.1, openSUSE:2.9.4.1
Reverse Dependencies 1 direct, 3644 indirect [details]
Downloads 11328 total (144 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-11-10 [all 1 reports]

Readme for js-chart-2.9.4.1

[back to package description]

js-chart Hackage version Stackage version Build status

This package bundles the minified [http://www.chartjs.org/](`chart.js`) 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](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))