packages feed

chart-svg-0.8.0.0: chart-svg.cabal

cabal-version: 3.0
name: chart-svg
version: 0.8.0.0
license: BSD-3-Clause
license-file: LICENSE
copyright: Tony Day (c) 2017
category: graphics
author: Tony Day
maintainer: tonyday567@gmail.com
homepage: https://github.com/tonyday567/chart-svg#readme
bug-reports: https://github.com/tonyday567/chart-svg/issues
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 & set #color (palette c) & set #size 0.015) <$> [0..2]
    >>> let cs = zipWith (\s x -> LineChart s [x]) styles lines
    >>> let lineExample = mempty & set #chartTree (named "line" cs) & set #hudOptions defaultHudOptions :: ChartOptions
    >>> writeChartOptions "other/usage.svg" lineExample

    ![usage example](docs/other/usage.svg)

    See "Chart" for concept design notes, and "Chart.Examples" for practical usage.

build-type: Simple
tested-with:
    , GHC == 9.10.1
    , GHC == 9.8.2
    , GHC == 9.6.5
extra-doc-files:
    ChangeLog.md
    other/*.svg
    readme.md

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

common ghc-options-stanza
    ghc-options:
        -Wall
        -Wcompat
        -Widentities
        -Wincomplete-record-updates
        -Wincomplete-uni-patterns
        -Wpartial-fields
        -Wredundant-constraints

common ghc2021-stanza
    default-language: GHC2021

library
    import: ghc-options-stanza
    import: ghc2021-stanza
    hs-source-dirs: src
    build-depends:
        , Color              >=0.3.2 && <0.4
        , base               >=4.14 && <5
        , bytestring         >=0.11.3 && <0.13
        , containers         >=0.6 && <0.8
        , cubicbezier        >=0.6 && <0.7
        , flatparse          >=0.5 && <0.6
        , formatn            >=0.3 && <0.4
        , harpie             >=0.1 && <0.2
        , markup-parse       >=0.1 && <0.2
        , mtl                >=2.2.2 && <2.4
        , numhask            >=0.11 && <0.13
        , numhask-space      >=0.10 && <0.13
        , optics-core        >=0.4 && <0.5
        , random             >=1.2 && <1.3
        , string-interpolate >=0.3 && <0.5
        , text               >=1.2 && <2.2
        , time               >=1.9 && <1.15
    exposed-modules:
        Chart
        Chart.Bar
        Chart.Compound
        Chart.Data
        Chart.Examples
        Chart.Hud
        Chart.Markup
        Chart.Primitive
        Chart.Style
        Chart.Surface
        Data.Colour
        Data.Path
        Data.Path.Parser

test-suite doctests
    import: ghc2021-stanza
    main-is: doctests.hs
    hs-source-dirs: test
    build-depends:
        , base             >=4.14 && <5
        , doctest-parallel >=0.3 && <0.4
    ghc-options: -threaded
    type: exitcode-stdio-1.0