chart-svg-0.2.0: Charting library targetting SVGs.
Safe HaskellNone
LanguageHaskell2010

Chart.Surface

Description

Surface chart combinators.

A common chart is to present a set of rectangles on the XY plane with colour representing values of the underlying data; a surface chart (often called a heatmap).

SurfaceData, the rectangle and the color value, is a different shape to the usual data elements of a chart, so there is a bit more wrangling to do compared with other chart types.

Synopsis

Documentation

data SurfaceData Source #

Main surface data elements

Constructors

SurfaceData 

Fields

Instances

Instances details
Eq SurfaceData Source # 
Instance details

Defined in Chart.Surface

Show SurfaceData Source # 
Instance details

Defined in Chart.Surface

Generic SurfaceData Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceData :: Type -> Type #

type Rep SurfaceData Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceData = D1 ('MetaData "SurfaceData" "Chart.Surface" "chart-svg-0.2.0-92kmzNutfhz4Yaw4NJVLJs" 'False) (C1 ('MetaCons "SurfaceData" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "surfaceColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour)))

data SurfaceOptions Source #

Options for a Surface chart.

>>> defaultSurfaceOptions
SurfaceOptions {soStyle = SurfaceStyle {surfaceColors = [RGBA 0.65 0.81 0.89 1.00,RGBA 0.12 0.47 0.71 1.00], surfaceRectStyle = RectStyle {borderSize = 0.0, borderColor = RGBA 0.00 0.00 0.00 0.00, color = RGBA 0.00 0.00 0.00 1.00}}, soGrain = Point 10 10, soRange = Rect -0.5 0.5 -0.5 0.5}

Constructors

SurfaceOptions 

Fields

Instances

Instances details
Eq SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

Show SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

Generic SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceOptions :: Type -> Type #

type Rep SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceOptions = D1 ('MetaData "SurfaceOptions" "Chart.Surface" "chart-svg-0.2.0-92kmzNutfhz4Yaw4NJVLJs" 'False) (C1 ('MetaCons "SurfaceOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "soStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SurfaceStyle) :*: (S1 ('MetaSel ('Just "soGrain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Int)) :*: S1 ('MetaSel ('Just "soRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rect Double)))))

data SurfaceStyle Source #

A surface chart is a specialization of a RectA chart

>>> defaultSurfaceStyle
SurfaceStyle {surfaceColors = [RGBA 0.65 0.81 0.89 1.00,RGBA 0.12 0.47 0.71 1.00], surfaceRectStyle = RectStyle {borderSize = 0.0, borderColor = RGBA 0.00 0.00 0.00 0.00, color = RGBA 0.00 0.00 0.00 1.00}}

Constructors

SurfaceStyle 

Fields

Instances

Instances details
Eq SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

Show SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

Generic SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceStyle :: Type -> Type #

type Rep SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceStyle = D1 ('MetaData "SurfaceStyle" "Chart.Surface" "chart-svg-0.2.0-92kmzNutfhz4Yaw4NJVLJs" 'False) (C1 ('MetaCons "SurfaceStyle" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceColors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Colour]) :*: S1 ('MetaSel ('Just "surfaceRectStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RectStyle)))

defaultSurfaceStyle :: SurfaceStyle Source #

The official surface style.

mkSurfaceData :: (Point Double -> Double) -> Rect Double -> Grid (Rect Double) -> [Colour] -> ([SurfaceData], Range Double) Source #

create surface data from a function on a Point

surfaces :: RectStyle -> [SurfaceData] -> [Chart Double] Source #

surface chart without any hud trimmings

surfacef :: (Point Double -> Double) -> SurfaceOptions -> ([Chart Double], Range Double) Source #

create a surface chart from a function.

surfacefl :: (Point Double -> Double) -> SurfaceOptions -> SurfaceLegendOptions -> ([Chart Double], [Hud Double]) Source #

Create a surface chart and accompanying legend from a function.

data SurfaceLegendOptions Source #

Legend specialization for a surface chart.

>>> defaultSurfaceLegendOptions ""
SurfaceLegendOptions {sloStyle = SurfaceStyle {surfaceColors = [RGBA 0.65 0.81 0.89 1.00,RGBA 0.12 0.47 0.71 1.00], surfaceRectStyle = RectStyle {borderSize = 0.0, borderColor = RGBA 0.00 0.00 0.00 0.00, color = RGBA 0.00 0.00 0.00 1.00}}, sloTitle = "", sloWidth = 5.0e-2, sloResolution = 100, sloAxisOptions = AxisOptions {axisBar = Nothing, adjust = Nothing, axisTick = Tick {tstyle = TickRound (FormatPrec (Just 3)) 4 NoTickExtend, gtick = Just (GlyphStyle {size = 3.0e-2, color = RGBA 0.00 0.00 0.00 1.00, borderColor = RGBA 0.50 0.50 0.50 1.00, borderSize = 5.0e-3, shape = VLineGlyph 5.0e-3, rotation = Nothing, translate = Nothing},1.0e-2), ttick = Just (TextStyle {size = 5.0e-2, color = RGBA 0.50 0.50 0.50 1.00, anchor = AnchorMiddle, hsize = 0.5, vsize = 1.45, nudge1 = -0.2, rotation = Nothing, translate = Nothing},3.0e-2), ltick = Nothing}, place = PlaceRight}, sloLegendOptions = LegendOptions {lsize = 0.5, vgap = 5.0e-2, hgap = 1.0e-2, ltext = TextStyle {size = 8.0e-2, color = RGBA 0.20 0.20 0.20 1.00, anchor = AnchorMiddle, hsize = 0.5, vsize = 1.45, nudge1 = -0.2, rotation = Nothing, translate = Nothing}, lmax = 10, innerPad = 5.0e-2, outerPad = 2.0e-2, legendFrame = Nothing, lplace = PlaceRight, lscale = 0.7}}

Constructors

SurfaceLegendOptions 

Fields

Instances

Instances details
Eq SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

Show SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

Generic SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceLegendOptions :: Type -> Type #

type Rep SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

defaultSurfaceLegendOptions :: Text -> SurfaceLegendOptions Source #

official surface legend options