Header menu logo Plotly.NET

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

Chart(data, layout, config, displayOpts)

Full Usage: Chart(data, layout, config, displayOpts)

Parameters:
data : Trace
layout : Layout
config : Config
displayOpts : DisplayOptions

MultiChart(data, layout, config, displayOpts)

Full Usage: MultiChart(data, layout, config, displayOpts)

Parameters:
data : Trace list
layout : Layout
config : Config
displayOpts : DisplayOptions

Static members

Static member Description

GenericChart.addConfig config gChart

Full Usage: GenericChart.addConfig config gChart

Parameters:
    config : Config - the config to add
    gChart : GenericChart - the input GenericChart to set the config on

Returns: GenericChart

Returns a new GenericChart with the given config combined with the given GenericChart's existing config.

config : Config

the config to add

gChart : GenericChart

the input GenericChart to set the config on

Returns: GenericChart

GenericChart.addDisplayOptions displayOpts gChart

Full Usage: GenericChart.addDisplayOptions displayOpts gChart

Parameters:
    displayOpts : DisplayOptions - the DisplayOptions to add
    gChart : GenericChart - the input GenericChart to set the DisplayOptions on

Returns: GenericChart

Returns a new GenericChart with the given DisplayOptions combined with the given GenericChart's existing DisplayOptions.

displayOpts : DisplayOptions

the DisplayOptions to add

gChart : GenericChart

the input GenericChart to set the DisplayOptions on

Returns: GenericChart

GenericChart.addLayout layout gChart

Full Usage: GenericChart.addLayout layout gChart

Parameters:
    layout : Layout - the layout to add
    gChart : GenericChart - the input GenericChart to set the layout on

Returns: GenericChart

Returns a new GenericChart with the given layout combined with the given GenericChart's existing layout.

layout : Layout

the layout to add

gChart : GenericChart

the input GenericChart to set the layout on

Returns: GenericChart

GenericChart.combine gCharts

Full Usage: GenericChart.combine gCharts

Parameters:
    gCharts : 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

gCharts : GenericChart seq

the input GenericCharts to combine

Returns: GenericChart

GenericChart.countTrace gChart

Full Usage: GenericChart.countTrace gChart

Parameters:
Returns: int

Returns the number of traces in the given GenericChart.

gChart : GenericChart

the input GenericChart

Returns: int

GenericChart.existsTrace predicate gChart

Full Usage: GenericChart.existsTrace predicate gChart

Parameters:
    predicate : Trace -> bool - the predicate to check for the trace items
    gChart : GenericChart - the input GenericChart

Returns: bool

Returns true if the given chart contains a trace for which the predicate function returns true

predicate : Trace -> bool

the predicate to check for the trace items

gChart : GenericChart

the input GenericChart

Returns: bool

GenericChart.fromChartDTO dto

Full Usage: GenericChart.fromChartDTO dto

Parameters:
    dto : ChartDTO - The ChartDTO to convert

Returns: GenericChart

Creates a GenericChart from the given ChartDTO.

dto : ChartDTO

The ChartDTO to convert

Returns: GenericChart

GenericChart.fromFigure fig

Full Usage: GenericChart.fromFigure fig

Parameters:
    fig : Figure - The Figure DTO to convert

Returns: GenericChart

Creates a GenericChart from the given Figure DTO.

fig : Figure

The Figure DTO to convert

Returns: GenericChart

GenericChart.getConfig gChart

Full Usage: GenericChart.getConfig gChart

Parameters:
    gChart : GenericChart - the input GenericChart to get the config from

Returns: Config

Returns the config of a given GenericChart.

gChart : GenericChart

the input GenericChart to get the config from

Returns: Config

GenericChart.getDisplayOptions gChart

Full Usage: GenericChart.getDisplayOptions gChart

Parameters:
    gChart : GenericChart - the input GenericChart to get the DisplayOptions from

Returns: DisplayOptions

Returns the DisplayOptions of a given GenericChart.

gChart : GenericChart

the input GenericChart to get the DisplayOptions from

Returns: DisplayOptions

GenericChart.getLayout gChart

Full Usage: GenericChart.getLayout gChart

Parameters:
    gChart : GenericChart - the input GenericChart to get the layout from

Returns: Layout

Returns the layout of a given GenericChart.

gChart : GenericChart

the input GenericChart to get the layout from

Returns: Layout

GenericChart.getTraceID gChart

Full Usage: GenericChart.getTraceID gChart

Parameters:
Returns: TraceID

returns a single TraceID (when all traces of the charts are of the same type), or traceID.Multi if the chart contains traces of multiple different types

gChart : GenericChart

the input genericChart

Returns: TraceID

GenericChart.getTraceIDs gChart

Full Usage: GenericChart.getTraceIDs gChart

Parameters:
Returns: TraceID list

returns a list of TraceIDs representing the types of all traces contained in the chart.

gChart : GenericChart

the input genericChart

Returns: TraceID list

GenericChart.getTraces gChart

Full Usage: GenericChart.getTraces gChart

Parameters:
    gChart : GenericChart - the input GenericChart to get all traces from

Returns: Trace list

Returns all traces of a given GenericChart.

gChart : GenericChart

the input GenericChart to get all traces from

Returns: Trace list

GenericChart.mapConfig f gChart

Full Usage: GenericChart.mapConfig f gChart

Parameters:
    f : Config -> 'a - the function to apply to the config
    gChart : GenericChart - the input GenericChart

Returns: GenericChart

Creates a new GenericChart whose config is the results of applying the given function to the config of the input GenericChart.

f : Config -> 'a

the function to apply to the config

gChart : GenericChart

the input GenericChart

Returns: GenericChart

GenericChart.mapDisplayOptions f gChart

Full Usage: GenericChart.mapDisplayOptions f gChart

Parameters:
Returns: GenericChart

Creates a new GenericChart whose DisplayOptions is the results of applying the given function to the DisplayOptions of the input GenericChart.

f : DisplayOptions -> 'a

the function to apply to the DisplayOptions

gChart : GenericChart

the input GenericChart

Returns: GenericChart

GenericChart.mapLayout f gChart

Full Usage: GenericChart.mapLayout f gChart

Parameters:
    f : Layout -> 'a - the function to apply to the layout
    gChart : GenericChart - the input GenericChart

Returns: GenericChart

Creates a new GenericChart whose layout is the results of applying the given function to the layout of the input GenericChart.

f : Layout -> 'a

the function to apply to the layout

gChart : GenericChart

the input GenericChart

Returns: GenericChart

GenericChart.mapTrace f gChart

Full Usage: GenericChart.mapTrace f gChart

Parameters:
    f : Trace -> Trace - the function to apply to each trace item
    gChart : GenericChart - the input GenericChart

Returns: GenericChart

Creates a new GenericChart whose traces are the results of applying the given function to each trace item of the input GenericChart.

f : Trace -> Trace

the function to apply to each trace item

gChart : GenericChart

the input GenericChart

Returns: GenericChart

GenericChart.mapiTrace f gChart

Full Usage: GenericChart.mapiTrace f gChart

Parameters:
    f : int -> Trace -> Trace - the function to apply to each trace item
    gChart : GenericChart - the input GenericChart

Returns: GenericChart

Creates a new GenericChart whose traces are the results of applying the given function to each trace item of the input GenericChart. The integer index passed to the function indicates the index (from 0) of element being transformed.

f : int -> Trace -> Trace

the function to apply to each trace item

gChart : GenericChart

the input GenericChart

Returns: GenericChart

GenericChart.ofTraceObject useDefaults trace

Full Usage: GenericChart.ofTraceObject useDefaults trace

Parameters:
    useDefaults : bool - wether or not to set default objects for Layout, Config and DisplayOptions
    trace : Trace

Returns: GenericChart

Creates a GenericChart from a trace object. The objects set for the Layout, Config and DisplayOptions depend on `useDefaults`: If true, the default objects found in `Defaults` are used. If false, empty objects are used.

useDefaults : bool

wether or not to set default objects for Layout, Config and DisplayOptions

trace : Trace
Returns: GenericChart

GenericChart.ofTraceObjects useDefaults traces

Full Usage: GenericChart.ofTraceObjects useDefaults traces

Parameters:
    useDefaults : bool - wether or not to set default objects for Layout, Config and DisplayOptions
    traces : 'a - the input Trace collection

Returns: GenericChart

Creates a GenericChart from a list of trace objects. The objects set for the Layout, Config and DisplayOptions depend on `useDefaults`: If true, the default objects found in `Defaults` are used. If false, empty objects are used.

useDefaults : bool

wether or not to set default objects for Layout, Config and DisplayOptions

traces : 'a

the input Trace collection

Returns: GenericChart

GenericChart.setConfig config gChart

Full Usage: GenericChart.setConfig config gChart

Parameters:
    config : Config - the config to set
    gChart : GenericChart - the input GenericChart to set the config on

Returns: GenericChart

Returns a new GenericChart with the given config.

config : Config

the config to set

gChart : GenericChart

the input GenericChart to set the config on

Returns: GenericChart

GenericChart.setDisplayOptions displayOpts gChart

Full Usage: GenericChart.setDisplayOptions displayOpts gChart

Parameters:
    displayOpts : DisplayOptions - the DisplayOptions to set
    gChart : GenericChart - the input GenericChart to set the DisplayOptions on

Returns: GenericChart

Returns a new GenericChart with the given DisplayOptions.

displayOpts : DisplayOptions

the DisplayOptions to set

gChart : GenericChart

the input GenericChart to set the DisplayOptions on

Returns: GenericChart

GenericChart.setLayout layout gChart

Full Usage: GenericChart.setLayout layout gChart

Parameters:
    layout : Layout - the layout to set
    gChart : GenericChart - the input GenericChart to set the layout on

Returns: GenericChart

Returns a new GenericChart with the given layout.

layout : Layout

the layout to set

gChart : GenericChart

the input GenericChart to set the layout on

Returns: GenericChart

GenericChart.toChartDTO gChart

Full Usage: GenericChart.toChartDTO gChart

Parameters:
Returns: ChartDTO

Creates a ChartDTO from the given GenericChart.

gChart : GenericChart

The GenericChart to convert

Returns: ChartDTO

GenericChart.toChartHTML gChart

Full Usage: GenericChart.toChartHTML gChart

Parameters:
    gChart : GenericChart - The input GenericChart to return as HTML string

Returns: string

Returns the HTML string representation of a given GenericChart. The resulting HTML string contains a a div tag containing the chart, and a script tag containing the javascript to create it. Note that no references to the necessary scripts are included, so these must be added separately.

gChart : GenericChart

The input GenericChart to return as HTML string

Returns: string

GenericChart.toChartHTMLNodes gChart

Full Usage: GenericChart.toChartHTMLNodes gChart

Parameters:
    gChart : GenericChart - The input GenericCharts to return as HTML nodes

Returns: XmlNode

Returns the HTML node representation of a given GenericChart. The resulting HTML node contains a a div tag containing the chart, and a script tag containing the javascript to create it. Note that no references to the necessary scripts are included, so these must be added separately.

gChart : GenericChart

The input GenericCharts to return as HTML nodes

Returns: XmlNode

GenericChart.toEmbeddedHTML gChart

Full Usage: GenericChart.toEmbeddedHTML gChart

Parameters:
    gChart : 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.

gChart : GenericChart

The input GenericChart to return as HTML string

Returns: string

GenericChart.toFigure gChart

Full Usage: GenericChart.toFigure gChart

Parameters:
Returns: Figure

Creates a Figure DTO from the given GenericChart.

gChart : GenericChart

The GenericChart to convert

Returns: Figure

GenericChart.toFigureJson gChart

Full Usage: GenericChart.toFigureJson gChart

Parameters:
Returns: string

Serializes a GenericChart to a JSON string, representing the data and layout of the GenericChart, together with an empty frame array (not supported): { "data": [ -serialized traces array- ] , "layout": { -serialized layout object- } , "frames": [ -empty array, not supported yet- ] }

gChart : GenericChart

the chart to serialize

Returns: string

GenericChart.toJson gChart

Full Usage: GenericChart.toJson gChart

Parameters:
Returns: string

Serializes a GenericChart to a JSON string, representing the data, layout and config of the GenericChart: { "data": [ -serialized traces array- ] , "layout": { -serialized layout object- } , "config": { -serialized config object- } }

gChart : GenericChart

the chart to serialize

Returns: string

GenericChart.tryGetLayoutSize gChart

Full Usage: GenericChart.tryGetLayoutSize gChart

Parameters:
    gChart : GenericChart - the input GenericChart to get the layout size from

Returns: int option * int option

Returns a tuple containing the width and height of a GenericChart's layout if the property is set, otherwise None.

gChart : GenericChart

the input GenericChart to get the layout size from

Returns: int option * int option

Type something to start searching.