chart-svg-0.6.0.0: Charting library targetting SVGs.
Safe HaskellSafe-Inferred
LanguageGHC2021

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. This library uses the term surface chart but it is often referred to as a heatmap.

Synopsis

Documentation

data SurfaceData Source #

Main surface data elements

Constructors

SurfaceData 

Fields

Instances

Instances details
Generic SurfaceData Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceData :: Type -> Type #

Show SurfaceData Source # 
Instance details

Defined in Chart.Surface

Eq SurfaceData Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceData Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceData = D1 ('MetaData "SurfaceData" "Chart.Surface" "chart-svg-0.6.0.0-HjsGv1l8hv76XDZORokPY6" '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.

Constructors

SurfaceOptions 

Fields

Instances

Instances details
Generic SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceOptions :: Type -> Type #

Show SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

Eq SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceOptions Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceOptions = D1 ('MetaData "SurfaceOptions" "Chart.Surface" "chart-svg-0.6.0.0-HjsGv1l8hv76XDZORokPY6" '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 RectChart

>>> defaultSurfaceStyle
SurfaceStyle {surfaceColors = [Colour 0.02 0.73 0.80 1.00,Colour 0.02 0.29 0.48 1.00], surfaceRectStyle = Style {size = 6.0e-2, borderSize = 0.0, color = Colour 0.05 0.05 0.05 1.00, borderColor = Colour 0.00 0.00 0.00 0.00, scaleP = NoScaleP, anchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}}

Constructors

SurfaceStyle 

Fields

Instances

Instances details
Generic SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceStyle :: Type -> Type #

Show SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

Eq SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceStyle Source # 
Instance details

Defined in Chart.Surface

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

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 :: Style -> [SurfaceData] -> [Chart] Source #

surface chart without any hud trimmings

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

Create a surface chart from a function.

data SurfaceLegendOptions Source #

Legend specialization for a surface chart.

Constructors

SurfaceLegendOptions 

Fields

Instances

Instances details
Generic SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

Associated Types

type Rep SurfaceLegendOptions :: Type -> Type #

Show SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

Eq SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceLegendOptions Source # 
Instance details

Defined in Chart.Surface

type Rep SurfaceLegendOptions = D1 ('MetaData "SurfaceLegendOptions" "Chart.Surface" "chart-svg-0.6.0.0-HjsGv1l8hv76XDZORokPY6" 'False) (C1 ('MetaCons "SurfaceLegendOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sloAxisOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AxisOptions) :*: (S1 ('MetaSel ('Just "sloWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "sloResolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "sloDataRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Range Double)) :*: (S1 ('MetaSel ('Just "sloRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "sloSurfaceStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SurfaceStyle)))))

defaultSurfaceLegendOptions :: SurfaceLegendOptions Source #

official surface legend options

gridReferenceChart :: SurfaceLegendOptions -> ChartTree Source #

Chart used as a reference to a surface chart.

addSurfaceLegend :: SurfaceLegendOptions -> ChartTree -> ChartTree Source #

Add a surface legend to a main surface chart.