GenericChart Type
The central type that gets created by all Chart constructors is GenericChart, which itself represents either a single chart or a multi chart (as a Discriminate Union type). A GenericChart consists of four top level objects: Trace (multiple of those in the case of a MultiChart), Layout, Config, and DisplayOptions. - `Trace` is in principle the representation of a dataset on a chart, including for example the data itself, color and shape of the visualization, etc. - `Layout` is everything of the chart that is not dataset specific - e.g. the shape and style of axes, the chart title, etc. - `Config` is an object that configures high level properties of the chart like making all chart elements editable or the tool bar on top - `DisplayOptions` is an object that contains meta information about how the html document that contains the chart.
Union cases
Union case | Description |
Full Usage:
Chart(data, layout, config, displayOpts)
Parameters:
Trace
layout : Layout
config : Config
displayOpts : DisplayOptions
|
|
Full Usage:
MultiChart(data, layout, config, displayOpts)
Parameters:
Trace list
layout : Layout
config : Config
displayOpts : DisplayOptions
|
|
Static members
Static member | Description |
Full Usage:
GenericChart.addConfig config gChart
Parameters:
Config
-
the config to add
gChart : GenericChart
-
the input GenericChart to set the config on
Returns: GenericChart
|
|
Full Usage:
GenericChart.addDisplayOptions displayOpts gChart
Parameters:
DisplayOptions
-
the DisplayOptions to add
gChart : GenericChart
-
the input GenericChart to set the DisplayOptions on
Returns: GenericChart
|
|
Full Usage:
GenericChart.addLayout layout gChart
Parameters:
Layout
-
the layout to add
gChart : GenericChart
-
the input GenericChart to set the layout on
Returns: GenericChart
|
|
Full Usage:
GenericChart.combine gCharts
Parameters:
GenericChart seq
-
the input GenericCharts to combine
Returns: GenericChart
|
Combines a collection of GenericCharts, meaning that the traces, layout, config and display options of all elements are combined and returned as a single new GenericChart. Combination occurs step-wise in a `Seq.reduce`, where duplicate properties are overwritten on the accumulator by the current element in the collection. Traces are simply appended to a single list accumulator. Layout, Config, and DisplayOptions can contain properties that themselves are collections. These are combined by appending the values of the second to the first: - Layout: annotations, shapes, selections, images, sliders, hiddenlabels, updatemenus - Config: modeBarButtonsToAdd - DisplayOptions: AdditionalHeadTags, Description
|
Full Usage:
GenericChart.countTrace gChart
Parameters:
GenericChart
-
the input GenericChart
Returns: int
|
|
Full Usage:
GenericChart.existsTrace predicate gChart
Parameters:
Trace -> bool
-
the predicate to check for the trace items
gChart : GenericChart
-
the input GenericChart
Returns: bool
|
|
Full Usage:
GenericChart.fromChartDTO dto
Parameters:
ChartDTO
-
The ChartDTO to convert
Returns: GenericChart
|
|
Full Usage:
GenericChart.fromFigure fig
Parameters:
Figure
-
The Figure DTO to convert
Returns: GenericChart
|
|
Full Usage:
GenericChart.getConfig gChart
Parameters:
GenericChart
-
the input GenericChart to get the config from
Returns: Config
|
|
Full Usage:
GenericChart.getDisplayOptions gChart
Parameters:
GenericChart
-
the input GenericChart to get the DisplayOptions from
Returns: DisplayOptions
|
|
Full Usage:
GenericChart.getLayout gChart
Parameters:
GenericChart
-
the input GenericChart to get the layout from
Returns: Layout
|
|
Full Usage:
GenericChart.getTraceID gChart
Parameters:
GenericChart
-
the input genericChart
Returns: TraceID
|
|
Full Usage:
GenericChart.getTraceIDs gChart
Parameters:
GenericChart
-
the input genericChart
Returns: TraceID list
|
|
Full Usage:
GenericChart.getTraces gChart
Parameters:
GenericChart
-
the input GenericChart to get all traces from
Returns: Trace list
|
|
Full Usage:
GenericChart.mapConfig f gChart
Parameters:
Config -> 'a
-
the function to apply to the config
gChart : GenericChart
-
the input GenericChart
Returns: GenericChart
|
|
Full Usage:
GenericChart.mapDisplayOptions f gChart
Parameters:
DisplayOptions -> 'a
-
the function to apply to the DisplayOptions
gChart : GenericChart
-
the input GenericChart
Returns: GenericChart
|
|
Full Usage:
GenericChart.mapLayout f gChart
Parameters:
Layout -> 'a
-
the function to apply to the layout
gChart : GenericChart
-
the input GenericChart
Returns: GenericChart
|
|
Full Usage:
GenericChart.mapTrace f gChart
Parameters:
Trace -> Trace
-
the function to apply to each trace item
gChart : GenericChart
-
the input GenericChart
Returns: GenericChart
|
|
Full Usage:
GenericChart.mapiTrace f gChart
Parameters:
int -> Trace -> Trace
-
the function to apply to each trace item
gChart : GenericChart
-
the input GenericChart
Returns: GenericChart
|
|
Full Usage:
GenericChart.ofTraceObject useDefaults trace
Parameters:
bool
-
wether or not to set default objects for Layout, Config and DisplayOptions
trace : Trace
Returns: GenericChart
|
|
Full Usage:
GenericChart.ofTraceObjects useDefaults traces
Parameters:
bool
-
wether or not to set default objects for Layout, Config and DisplayOptions
traces : 'a
-
the input Trace collection
Returns: GenericChart
|
|
Full Usage:
GenericChart.setConfig config gChart
Parameters:
Config
-
the config to set
gChart : GenericChart
-
the input GenericChart to set the config on
Returns: GenericChart
|
|
Full Usage:
GenericChart.setDisplayOptions displayOpts gChart
Parameters:
DisplayOptions
-
the DisplayOptions to set
gChart : GenericChart
-
the input GenericChart to set the DisplayOptions on
Returns: GenericChart
|
|
Full Usage:
GenericChart.setLayout layout gChart
Parameters:
Layout
-
the layout to set
gChart : GenericChart
-
the input GenericChart to set the layout on
Returns: GenericChart
|
|
Full Usage:
GenericChart.toChartDTO gChart
Parameters:
GenericChart
-
The GenericChart to convert
Returns: ChartDTO
|
|
Full Usage:
GenericChart.toChartHTML gChart
Parameters:
GenericChart
-
The input GenericChart to return as HTML string
Returns: string
|
|
Full Usage:
GenericChart.toChartHTMLNodes gChart
Parameters:
GenericChart
-
The input GenericCharts to return as HTML nodes
Returns: XmlNode
|
|
Full Usage:
GenericChart.toEmbeddedHTML gChart
Parameters:
GenericChart
-
The input GenericChart to return as HTML string
Returns: string
|
Returns the HTML string representation of a given GenericChart embedded into a full HTML document. The resulting HTML string contains a head tag with references according to the input GenericChart's DisplayOptions, and a body tag containing the chart div, a script tag containing the javascript to create the chart, and a div tag containing the chart description.
|
Full Usage:
GenericChart.toFigure gChart
Parameters:
GenericChart
-
The GenericChart to convert
Returns: Figure
|
|
Full Usage:
GenericChart.toFigureJson gChart
Parameters:
GenericChart
-
the chart to serialize
Returns: string
|
|
Full Usage:
GenericChart.toJson gChart
Parameters:
GenericChart
-
the chart to serialize
Returns: string
|
|
Full Usage:
GenericChart.tryGetLayoutSize gChart
Parameters:
GenericChart
-
the input GenericChart to get the layout size from
Returns: int option * int option
|
|