{-# LANGUAGE OverloadedStrings #-}
module Graphics.Vega.VegaLite.Legend
( LegendType(..)
, LegendOrientation(..)
, LegendLayout(..)
, BaseLegendLayout(..)
, LegendProperty(..)
, LegendValues(..)
, legendProp_
, legendOrientLabel
, legendLayoutSpec
) where
import qualified Data.Aeson as A
import qualified Data.Text as T
import Data.Aeson ((.=), object, toJSON)
import Data.Aeson.Types (Pair)
import Graphics.Vega.VegaLite.Foundation
( APosition
, Bounds
, Color
, CompositionAlignment
, DashStyle
, DashOffset
, FontWeight
, HAlign
, Opacity
, Orientation
, OverlapStrategy
, Side
, Symbol
, VAlign
, VegaExpr
, ZIndex
, anchorLabel
, boundsSpec
, compositionAlignmentSpec
, fontWeightSpec
, hAlignLabel
, orientationSpec
, overlapStrategyLabel
, sideLabel
, symbolLabel
, vAlignLabel
, fromT
, fromColor
, fromDS
, splitOnNewline
)
import Graphics.Vega.VegaLite.Scale
( ScaleNice
, scaleNiceSpec
)
import Graphics.Vega.VegaLite.Specification (VLSpec)
import Graphics.Vega.VegaLite.Time
( DateTime
, dateTimeSpec
)
data LegendType
= GradientLegend
| SymbolLegend
legendLabel :: LegendType -> T.Text
legendLabel :: LegendType -> Text
legendLabel LegendType
GradientLegend = Text
"gradient"
legendLabel LegendType
SymbolLegend = Text
"symbol"
data LegendOrientation
= LONone
| LOLeft
| LORight
| LOTop
| LOBottom
| LOTopLeft
| LOTopRight
| LOBottomLeft
| LOBottomRight
legendOrientLabel :: LegendOrientation -> T.Text
legendOrientLabel :: LegendOrientation -> Text
legendOrientLabel LegendOrientation
LONone = Text
"none"
legendOrientLabel LegendOrientation
LOLeft = Text
"left"
legendOrientLabel LegendOrientation
LORight = Text
"right"
legendOrientLabel LegendOrientation
LOTop = Text
"top"
legendOrientLabel LegendOrientation
LOBottom = Text
"bottom"
legendOrientLabel LegendOrientation
LOTopLeft = Text
"top-left"
legendOrientLabel LegendOrientation
LOTopRight = Text
"top-right"
legendOrientLabel LegendOrientation
LOBottomLeft = Text
"bottom-left"
legendOrientLabel LegendOrientation
LOBottomRight = Text
"bottom-right"
data LegendLayout
= LeLAnchor APosition
| LeLBottom [BaseLegendLayout]
| LeLBottomLeft [BaseLegendLayout]
| LeLBottomRight [BaseLegendLayout]
| LeLBounds Bounds
| LeLCenter Bool
| LeLDirection Orientation
| LeLLeft [BaseLegendLayout]
| LeLMargin Double
| LeLOffset Double
| LeLRight [BaseLegendLayout]
| LeLTop [BaseLegendLayout]
| LeLTopLeft [BaseLegendLayout]
| LeLTopRight [BaseLegendLayout]
legendLayoutSpec :: LegendLayout -> Pair
legendLayoutSpec :: LegendLayout -> Pair
legendLayoutSpec (LeLAnchor APosition
anc) = Key
"anchor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= APosition -> Text
anchorLabel APosition
anc
legendLayoutSpec (LeLBottom [BaseLegendLayout]
bl) = Key
"bottom" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLBottomLeft [BaseLegendLayout]
bl) = Key
"bottom-left" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLBottomRight [BaseLegendLayout]
bl) = Key
"bottom-right" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLBounds Bounds
bnds) = Key
"bounds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bounds -> VLSpec
boundsSpec Bounds
bnds
legendLayoutSpec (LeLCenter Bool
b) = Key
"center" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
b
legendLayoutSpec (LeLDirection Orientation
o) = Key
"direction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Orientation -> VLSpec
orientationSpec Orientation
o
legendLayoutSpec (LeLLeft [BaseLegendLayout]
bl) = Key
"left" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLMargin Double
x) = Key
"margin" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendLayoutSpec (LeLOffset Double
x) = Key
"offset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendLayoutSpec (LeLRight [BaseLegendLayout]
bl) = Key
"right" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLTop [BaseLegendLayout]
bl) = Key
"top" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLTopLeft [BaseLegendLayout]
bl) = Key
"top-left" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
legendLayoutSpec (LeLTopRight [BaseLegendLayout]
bl) = Key
"top-right" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [BaseLegendLayout] -> VLSpec
toBLSpec [BaseLegendLayout]
bl
data BaseLegendLayout
= BLeLAnchor APosition
| BLeLBounds Bounds
| BLeLCenter Bool
| BLeLDirection Orientation
| BLeLMargin Double
| BLeLOffset Double
toBLSpec :: [BaseLegendLayout] -> VLSpec
toBLSpec :: [BaseLegendLayout] -> VLSpec
toBLSpec = [Pair] -> VLSpec
object forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b) -> [a] -> [b]
map BaseLegendLayout -> Pair
baseLegendLayoutSpec
baseLegendLayoutSpec :: BaseLegendLayout -> Pair
baseLegendLayoutSpec :: BaseLegendLayout -> Pair
baseLegendLayoutSpec (BLeLAnchor APosition
anc) = Key
"anchor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= APosition -> Text
anchorLabel APosition
anc
baseLegendLayoutSpec (BLeLBounds Bounds
bnds) = Key
"bounds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bounds -> VLSpec
boundsSpec Bounds
bnds
baseLegendLayoutSpec (BLeLCenter Bool
b) = Key
"center" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
b
baseLegendLayoutSpec (BLeLDirection Orientation
o) = Key
"direction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Orientation -> VLSpec
orientationSpec Orientation
o
baseLegendLayoutSpec (BLeLMargin Double
x) = Key
"margin" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
baseLegendLayoutSpec (BLeLOffset Double
x) = Key
"offset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
data LegendProperty
= LAria Bool
| LAriaDescription T.Text
| LClipHeight Double
| LColumnPadding Double
| LColumns Int
| LCornerRadius Double
| LDirection Orientation
| LFillColor Color
| LFormat T.Text
| LFormatAsNum
| LFormatAsTemporal
| LFormatAsCustom T.Text
| LGradientLength Double
| LGradientOpacity Opacity
| LGradientStrokeColor Color
| LGradientStrokeWidth Double
| LGradientThickness Double
| LGridAlign CompositionAlignment
| LLabelAlign HAlign
| LLabelBaseline VAlign
| LLabelColor Color
| LLabelExpr VegaExpr
| LLabelFont T.Text
| LLabelFontSize Double
| LLabelFontStyle T.Text
| LLabelFontWeight FontWeight
| LLabelLimit Double
| LLabelOffset Double
| LLabelOpacity Opacity
| LLabelOverlap OverlapStrategy
| LLabelPadding Double
| LLabelSeparation Double
| LOffset Double
| LOrient LegendOrientation
| LPadding Double
| LRowPadding Double
| LStrokeColor Color
| LSymbolDash DashStyle
| LSymbolDashOffset DashOffset
| LSymbolFillColor Color
| LSymbolLimit Int
| LSymbolOffset Double
| LSymbolOpacity Opacity
| LSymbolSize Double
| LSymbolStrokeColor Color
| LSymbolStrokeWidth Double
| LSymbolType Symbol
| LTickCount Double
| LTickCountTime ScaleNice
| LTickMinStep Double
| LTitle T.Text
| LNoTitle
| LTitleAlign HAlign
| LTitleAnchor APosition
| LTitleBaseline VAlign
| LTitleColor Color
| LTitleFont T.Text
| LTitleFontSize Double
| LTitleFontStyle T.Text
| LTitleFontWeight FontWeight
| LTitleLimit Double
| LTitleLineHeight Double
| LTitleOpacity Opacity
| LTitleOrient Side
| LTitlePadding Double
| LType LegendType
| LValues LegendValues
| LeX Double
| LeY Double
| LZIndex ZIndex
legendProperty :: LegendProperty -> Pair
legendProperty :: LegendProperty -> Pair
legendProperty (LAria Bool
b) = Key
"aria" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
b
legendProperty (LAriaDescription Text
t) = Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
t
legendProperty (LClipHeight Double
x) = Key
"clipHeight" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LColumnPadding Double
x) = Key
"columnPadding" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LColumns Int
n) = Key
"columns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Int
n
legendProperty (LCornerRadius Double
x) = Key
"cornerRadius" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LDirection Orientation
o) = Key
"direction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Orientation -> VLSpec
orientationSpec Orientation
o
legendProperty (LFillColor Text
s) = Key
"fillColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LFormat Text
s) = Key
"format" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty LegendProperty
LFormatAsNum = Key
"formatType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromT Text
"number"
legendProperty LegendProperty
LFormatAsTemporal = Key
"formatType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromT Text
"time"
legendProperty (LFormatAsCustom Text
c) = Key
"formatType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
c
legendProperty (LGradientLength Double
x) = Key
"gradientLength" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LGradientOpacity Double
x) = Key
"gradientOpacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LGradientStrokeColor Text
s) = Key
"gradientStrokeColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LGradientStrokeWidth Double
x) = Key
"gradientStrokeWidth" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LGradientThickness Double
x) = Key
"gradientThickness" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LGridAlign CompositionAlignment
ga) = Key
"gridAlign" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CompositionAlignment -> VLSpec
compositionAlignmentSpec CompositionAlignment
ga
legendProperty (LLabelAlign HAlign
ha) = Key
"labelAlign" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= HAlign -> Text
hAlignLabel HAlign
ha
legendProperty (LLabelBaseline VAlign
va) = Key
"labelBaseline" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VAlign -> Text
vAlignLabel VAlign
va
legendProperty (LLabelColor Text
s) = Key
"labelColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LLabelExpr Text
s) = Key
"labelExpr" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty (LLabelFont Text
s) = Key
"labelFont" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty (LLabelFontSize Double
x) = Key
"labelFontSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LLabelFontStyle Text
s) = Key
"labelFontStyle" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty (LLabelFontWeight FontWeight
fw) = Key
"labelFontWeight" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= FontWeight -> VLSpec
fontWeightSpec FontWeight
fw
legendProperty (LLabelLimit Double
x) = Key
"labelLimit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LLabelOffset Double
x) = Key
"labelOffset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LLabelOpacity Double
x) = Key
"labelOpacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LLabelOverlap OverlapStrategy
strat) = Key
"labelOverlap" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= OverlapStrategy -> VLSpec
overlapStrategyLabel OverlapStrategy
strat
legendProperty (LLabelPadding Double
x) = Key
"labelPadding" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LLabelSeparation Double
x) = Key
"labelSeparation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LOffset Double
x) = Key
"offset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LOrient LegendOrientation
orl) = Key
"orient" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= LegendOrientation -> Text
legendOrientLabel LegendOrientation
orl
legendProperty (LPadding Double
x) = Key
"padding" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LRowPadding Double
x) = Key
"rowPadding" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LStrokeColor Text
s) = Key
"strokeColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LSymbolDash DashStyle
ds) = Key
"symbolDash" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= DashStyle -> VLSpec
fromDS DashStyle
ds
legendProperty (LSymbolDashOffset Double
x) = Key
"symbolDashOffset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LSymbolFillColor Text
s) = Key
"symbolFillColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LSymbolLimit Int
x) = Key
"symbolLimit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Int
x
legendProperty (LSymbolOffset Double
x) = Key
"symbolOffset" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LSymbolOpacity Double
x) = Key
"symbolOpacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LSymbolSize Double
x) = Key
"symbolSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LSymbolStrokeColor Text
s) = Key
"symbolStrokeColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LSymbolStrokeWidth Double
x) = Key
"symbolStrokeWidth" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LSymbolType Symbol
sym) = Key
"symbolType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Symbol -> Text
symbolLabel Symbol
sym
legendProperty (LTickCount Double
x) = Key
"tickCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTickCountTime ScaleNice
sn) = Key
"tickCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ScaleNice -> VLSpec
scaleNiceSpec ScaleNice
sn
legendProperty (LTickMinStep Double
x) = Key
"tickMinStep" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTitle Text
s) = Key
"title" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
splitOnNewline Text
s
legendProperty LegendProperty
LNoTitle = Key
"title" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VLSpec
A.Null
legendProperty (LTitleAlign HAlign
ha) = Key
"titleAlign" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= HAlign -> Text
hAlignLabel HAlign
ha
legendProperty (LTitleAnchor APosition
anc) = Key
"titleAnchor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= APosition -> Text
anchorLabel APosition
anc
legendProperty (LTitleBaseline VAlign
va) = Key
"titleBaseline" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VAlign -> Text
vAlignLabel VAlign
va
legendProperty (LTitleColor Text
s) = Key
"titleColor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> VLSpec
fromColor Text
s
legendProperty (LTitleFont Text
s) = Key
"titleFont" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty (LTitleFontSize Double
x) = Key
"titleFontSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTitleFontStyle Text
s) = Key
"titleFontStyle" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
s
legendProperty (LTitleFontWeight FontWeight
fw) = Key
"titleFontWeight" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= FontWeight -> VLSpec
fontWeightSpec FontWeight
fw
legendProperty (LTitleLimit Double
x) = Key
"titleLimit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTitleLineHeight Double
x) = Key
"titleLineHeight" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTitleOpacity Double
x) = Key
"titleOpacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LTitleOrient Side
orient) = Key
"titleOrient" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Side -> Text
sideLabel Side
orient
legendProperty (LTitlePadding Double
x) = Key
"titlePadding" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LType LegendType
lType) = Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= LegendType -> Text
legendLabel LegendType
lType
legendProperty (LValues LegendValues
vals) =
let ls :: [VLSpec]
ls = case LegendValues
vals of
LNumbers DashStyle
xs -> forall a b. (a -> b) -> [a] -> [b]
map forall a. ToJSON a => a -> VLSpec
toJSON DashStyle
xs
LDateTimes [[DateTime]]
dts -> forall a b. (a -> b) -> [a] -> [b]
map [DateTime] -> VLSpec
dateTimeSpec [[DateTime]]
dts
LStrings [Text]
ss -> forall a b. (a -> b) -> [a] -> [b]
map forall a. ToJSON a => a -> VLSpec
toJSON [Text]
ss
in Key
"values" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [VLSpec]
ls
legendProperty (LeX Double
x) = Key
"legendX" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LeY Double
x) = Key
"legendY" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Double
x
legendProperty (LZIndex ZIndex
z) = Key
"zindex" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= ZIndex
z
legendProp_ :: [LegendProperty] -> Pair
legendProp_ :: [LegendProperty] -> Pair
legendProp_ [] = Key
"legend" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VLSpec
A.Null
legendProp_ [LegendProperty]
lps = Key
"legend" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Pair] -> VLSpec
object (forall a b. (a -> b) -> [a] -> [b]
map LegendProperty -> Pair
legendProperty [LegendProperty]
lps)
data LegendValues
= LDateTimes [[DateTime]]
| LNumbers [Double]
| LStrings [T.Text]