Code Monkey home page Code Monkey logo

js-flot's Introduction

js-flot Hackage version Stackage version Build status


WARNING: The underlying Flot library is in a weird state, you might wish to use js-chart instead, see this pull request for context.


This package bundles the minified Flot code (a jQuery plotting library) into a Haskell package, so it can be depended upon by Cabal packages. The first three components of the version number match the upstream Flot version. The package is designed to meet the redistribution requirements of downstream users (e.g. Debian). As an example:

import qualified Language.Javascript.Flot as Flot

main = do
    putStrLn $ "Flot version " ++ show Flot.version ++ " source:"
    putStrLn =<< readFile =<< Flot.file Flot.Flot

Note that Flot depends on jQuery, a Haskell version of which can be obtained from the js-jquery package.

This package installs data files containing the Flot 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.Flot as Flot
import Language.Haskell.TH.Syntax

main = print flotContents

flotContents :: BS.ByteString
flotContents = $(embedFile =<< runIO (Flot.file Flot.Flot))

js-flot's People

Contributors

iustin avatar ndmitchell avatar tom-bop avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jonascarpay

js-flot's Issues

js-flot fails to build

I tried to use cabal new-install to get hoogle. However, when I tried that, I got this:

# bunch of packages build
Failed to build js-flot-0.8.3. The failure occurred during the configure step.
Build log (
/home/koz/.cabal/logs/ghc-8.6.5/js-flot-0.8.3-5d291987ea55095b1e71e335fbe7d8c186ce1b91bc2ca8bcd56fd08e6a879f7f.log
):
Configuring library for js-flot-0.8.3..
cabal: ghc-pkg dump failed: dieVerbatim: user error (cabal:
'/home/koz/ghc-86/bin/ghc-pkg' exited with an error:
ghc-pkg: internal error: evacuate: stack frame at 0x4201dca540

(GHC version 8.6.5 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
)

cabal: Failed to build js-flot-0.8.3 (which is required by exe:hoogle from
hoogle-5.0.17.11). See the build log above for details.

Is this a package issue, or is something really wrong on my machine? cabal --version reports 3.0.0.0.

Upgrade to flot 4.2.1?

There's some dicussion over on criterion about the log-axis support in newer versions of flot. How would you feel about updating js-flot to a newer version? I'd be happy to make a PR for it here and fix up criterion, but it would mean somebody would need to update hoogle and shake.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.