| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Javascript.Chart
Description
Module for accessing minified chart code (http://www.chartjs.org/). As an example:
import qualified Language.Javascript.Chart as Chart
main = do
putStrLn $ "Chart version " ++ show Chart.version ++ " source:"
putStrLn =<< readFile =<< Chart.file Chart.ChartThis 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 (https://hackage.haskell.org/package/file-embed):
{-# 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))Documentation
The Chart code to obtain.
Constructors
| Chart | The base |
| ChartBundle | The base system, plus a compliant version of the moment.js time and date library. |
| ChartCSS |
|
Instances
| Data Chart # | |
Defined in Language.Javascript.Chart Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Chart -> c Chart # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Chart # dataTypeOf :: Chart -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Chart) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Chart) # gmapT :: (forall b. Data b => b -> b) -> Chart -> Chart # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Chart -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Chart -> r # gmapQ :: (forall d. Data d => d -> u) -> Chart -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Chart -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Chart -> m Chart # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Chart -> m Chart # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Chart -> m Chart # | |
| Bounded Chart # | |
| Enum Chart # | |
Defined in Language.Javascript.Chart | |
| Read Chart # | |
| Show Chart # | |
| Eq Chart # | |
| Ord Chart # | |
The version of Chart provided by this package. Not necessarily the version of this package, but the versions will match in the first three digits.