packages feed

chart-svg-0.4.0: chart-svg.cabal

cabal-version:   2.4
name:            chart-svg
version:         0.4.0
synopsis:        Charting library targetting SVGs.
description:
  This package provides a charting library targetting SVG as the rendered output.
  .
  == Usage
  .
  >>> :set -XOverloadedLabels
  >>> :set -XOverloadedStrings
  >>> import Chart
  >>> import Optics.Core
  >>> let lines = [[Point 0.0 1.0, Point 1.0 1.0, Point 2.0 5.0],[Point 0.0 0.0, Point 2.8 3.0],[Point 0.5 4.0, Point 0.5 0]]
  >>> let styles = (\c -> defaultLineStyle & #color .~ palette1 c & #size .~ 0.015) <$> [0..2]
  >>> let cs = zipWith (\s x -> LineChart s [x]) styles lines
  >>> let lineExample = mempty & #charts .~ named "line" cs & #hudOptions .~ defaultHudOptions :: ChartOptions
  >>> writeChartOptions "other/usage.svg" lineExample
  .
  ![usage example](docs/other/usage.svg)
  .
  See "Chart" for a broad overview of concepts, and "Chart.Examples" for practical examples.

category:        charts
homepage:        https://github.com/tonyday567/chart-svg#readme
bug-reports:     https://github.com/tonyday567/chart-svg/issues
author:          Tony Day
maintainer:      tonyday567@gmail.com
copyright:       Tony Day (c) 2017
license:         BSD-3-Clause
license-file:    LICENSE
build-type:      Simple
extra-doc-files: other/*.svg
tested-with:
  GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.2.5 || ==9.4.4

source-repository head
  type:     git
  location: https://github.com/tonyday567/chart-svg

library
  exposed-modules:
    Chart
    Chart.Bar
    Chart.Data
    Chart.Examples
    Chart.FlatParse
    Chart.Hud
    Chart.Markup
    Chart.Markup.Parser
    Chart.Primitive
    Chart.Style
    Chart.Surface
    Data.Colour
    Data.Path
    Data.Path.Parser

  hs-source-dirs:     src
  build-depends:
    Color ^>=0.3,
    adjunctions ^>=4.4,
    attoparsec >=0.13.2 && <0.15,
    base >=4.7 && <5,
    bytestring ^>=0.11.3,
    containers ^>=0.6,
    cubicbezier ^>=0.6,
    flatparse >= 0.4 && <0.5,
    foldl ^>=1.4,
    formatn >=0.3 && < 0.4,
    mtl >=2.2.2 && <2.4,
    numhask ^>=0.10,
    numhask-array ^>=0.10,
    numhask-space ^>=0.10,
    optics-core ^>=0.4,
    random ^>=1.2.1,
    string-interpolate ^>=0.3,
    text >=1.2 && <2.1,
    time >=1.9 && <2,
    tree-diff >=0.3 && <0.4,

  default-language:   Haskell2010
  default-extensions: StrictData
  ghc-options:
    -Wall -Wcompat -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wredundant-constraints

test-suite test
  type: exitcode-stdio-1.0
  main-is: test.hs
  default-language:   Haskell2010
  hs-source-dirs:
    test
  build-depends:
    base >=4.7 && <5,
    bytestring ^>=0.11.3,
    chart-svg,
    flatparse >= 0.4.0 && <0.5,
    tasty >=1.2 && <1.5,
    tasty-golden ^>=2.3.1.1,
    tree-diff >=0.3 && <0.4,

  ghc-options:
    -Wall -Wcompat -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wredundant-constraints