Extension methods for fluid-style chart styling and creation API.
Static member | Description |
Full Usage:
GenericChartExtensions.GetLayout(gChart)
Parameters:
GenericChart
-
The chart of which to get the layout
Returns: Layout
|
Returns the layout of the given chart
|
Full Usage:
GenericChartExtensions.GetTraces(gChart)
Parameters:
GenericChart
-
The chart of which to get all traces
Returns: Trace[]
|
Returns all traces of the given chart as an array
|
Full Usage:
GenericChartExtensions.SaveHtml(gChart, path, ?OpenInBrowser)
Parameters:
GenericChart
-
The chart to save as html file.
path : string
-
The path to save the chart html at.
?OpenInBrowser : bool
-
Wether or not to open the generated file in the browser (default: false)
|
Saves the given Chart as html file at the given path (.html file extension is added if not present). Optionally opens the generated file in the browser.
|
Full Usage:
GenericChartExtensions.Show(gChart)
Parameters:
GenericChart
-
The chart to show in the browser
|
Saves the given chart as a temporary html file and opens it in the browser.
|
Full Usage:
GenericChartExtensions.WithMabox(gChart, mapbox, ?Id)
Parameters:
GenericChart
-
The chart in which to change the mapbox
mapbox : Mapbox
-
The Mapbox to set on the chart's layout
?Id : int
-
The target mapbox id on which the Mapbox should be set. Default is 1.
Returns: GenericChart
|
Sets the Mapbox for the chart's layout If there is already a Mapbox set, the objects are combined.
|
Full Usage:
GenericChartExtensions.WithMaboxStyle(gChart, ?Domain, ?AccessToken, ?Style, ?Center, ?Zoom, ?Bearing, ?Pitch, ?Layers, ?Id)
Parameters:
GenericChart
-
The chart in which to change the mapbox style
?Domain : Domain
-
Sets the domain of the Mapbox subplot
?AccessToken : string
-
Sets the mapbox access token to be used for this mapbox map. Alternatively, the mapbox access token can be set in the configuration options under `mapboxAccessToken`. Note that accessToken are only required when `style` (e.g with values : basic, streets, outdoors, light, dark, satellite, satellite-streets ) and/or a layout layer references the Mapbox server.
?Style : MapboxStyle
-
Defines the map layers that are rendered by default below the trace layers defined in `data`, which are themselves by default rendered below the layers defined in `layout.mapbox.layers`. These layers can be defined either explicitly as a Mapbox Style object which can contain multiple layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS) or implicitly by using one of the built-in style objects which use WMSes which do not require any access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of which require a Mapbox access token Note that Mapbox access token can be set in the `accesstoken` attribute or in the `mapboxAccessToken` config option. Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at https://docs.mapbox.com/mapbox-gl-js/style-spec The built-in plotly.js styles objects are: carto-darkmatter, carto-positron, open-street-map, stamen-terrain, stamen-toner, stamen-watercolor, white-bg The built-in Mapbox styles are: basic, streets, outdoors, light, dark, satellite, satellite-streets Mapbox style URLs are of the form: mapbox://mapbox.mapbox/name/version
?Center : float * float
-
Sets the (lon,lat) coordinates of the center of the map view
?Zoom : float
-
Sets the zoom level of the map (mapbox.zoom).
?Bearing : float
-
Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing).
?Pitch : float
-
Sets the pitch angle of the map (in degrees, where "0" means perpendicular to the surface of the map) (mapbox.pitch).
?Layers : IEnumerable<MapboxLayer>
-
Sets the layers of this Mapbox
?Id : int
-
The target mapbox id
Returns: GenericChart
|
Sets the given Mapbox styles on the target Mapbox object on the input chart's layout. If there is already a Mapbox set, the styles are applied to it. If there is no Mapbox present, a new Mapbox object with the given styles will be set.
|
Full Usage:
GenericChartExtensions.WithSize(gChart, ?Width, ?Height)
Parameters:
GenericChart
?Width : int
?Height : int
Returns: GenericChart
|
Sets the size of a Chart (in pixels)
|
Full Usage:
GenericChartExtensions.WithTraceInfo(gChart, ?Name, ?Visible, ?ShowLegend, ?LegendRank, ?LegendGroup, ?LegendGroupTitle)
Parameters:
GenericChart
-
The chart in which to change the trace info
?Name : string
-
Sets the name of the chart's trace(s). When the chart is a multichart (it contains multiple traces), the name is suffixed by '_%i' where %i is the index of the trace.
?Visible : Visible
-
Wether or not the chart's traces are visible
?ShowLegend : bool
-
Determines whether or not item(s) corresponding to this chart's trace(s) is/are shown in the legend.
?LegendRank : int
-
Sets the legend rank for the chart's trace(s). Items and groups with smaller ranks are presented on top/left side while with `"reversed" `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.
?LegendGroup : string
-
Sets the legend group for the chart's trace(s). Traces part of the same legend group hide/show at the same time when toggling legend items.
?LegendGroupTitle : Title
-
Sets the title for the chart's trace legend group
Returns: GenericChart
|
Sets trace information on the given chart.
|
Full Usage:
GenericChartExtensions.WithXAxisRangeSlider(gChart, rangeSlider, ?Id)
Parameters:
GenericChart
-
The chart for which to set the x axis range slider
rangeSlider : RangeSlider
-
The rangeslider to set
?Id : SubPlotId
-
The id of the respective x axis
Returns: GenericChart
|
Sets the range slider for the xAxis
|
Full Usage:
GenericChartExtensions.WithXAxisStyle(gChart, ?TitleText, ?TitleFont, ?TitleStandoff, ?Title, ?Color, ?AxisType, ?MinMax, ?Mirror, ?ShowSpikes, ?SpikeColor, ?SpikeThickness, ?ShowLine, ?LineColor, ?ShowGrid, ?GridColor, ?ZeroLine, ?ZeroLineColor, ?Anchor, ?Side, ?Overlaying, ?Domain, ?Position, ?CategoryOrder, ?CategoryArray, ?RangeSlider, ?RangeSelector, ?BackgroundColor, ?ShowBackground, ?Id)
Parameters:
GenericChart
-
The chart in which to change the X axis style
?TitleText : string
-
Sets the text of the axis title.
?TitleFont : Font
-
Sets the font of the axis title.
?TitleStandoff : int
-
Sets the standoff distance (in px) between the axis labels and the title text.
?Title : Title
-
Sets the Title (use this for more finegrained control than the other title-associated arguments)
?Color : Color
-
Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors.
?AxisType : AxisType
-
Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.
?MinMax : 'MinType * 'MaxType
-
Tuple of (Min*Max value). Sets the range of this axis (the axis will go from Min to Max). If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2).
?Mirror : Mirror
-
Determines if and how the axis lines or/and ticks are mirrored to the opposite side of the plotting area.
?ShowSpikes : bool
-
Determines whether or not spikes (aka droplines) are drawn for this axis.
?SpikeColor : Color
-
Sets the spike color. If not set, will use the series color
?SpikeThickness : int
-
Sets the width (in px) of the zero line.
?ShowLine : bool
-
Determines whether or not a line bounding this axis is drawn.
?LineColor : Color
-
Sets the axis line color.
?ShowGrid : bool
-
Determines whether or not grid lines are drawn. If "true", the grid lines are drawn at every tick mark.
?GridColor : Color
-
Sets the color of the grid lines.
?ZeroLine : bool
-
Determines whether or not a line is drawn at along the 0 value of this axis. If "true", the zero line is drawn on top of the grid lines.
?ZeroLineColor : Color
-
Sets the line color of the zero line.
?Anchor : LinearAxisId
-
If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding opposite-letter axis. If set to "free", this axis' position is determined by `position`.
?Side : Side
-
Determines whether a x (y) axis is positioned at the "bottom" ("left") or "top" ("right") of the plotting area.
?Overlaying : LinearAxisId
-
If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis, with traces and axes visible for both axes. If "false", this axis does not overlay any same-letter axes. In this case, for axes with overlapping domains only the highest-numbered axis will be visible.
?Domain : float * float
-
Tuple of (X*Y fractions). Sets the domain of this axis (in plot fraction).
?Position : float
-
Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to "free".
?CategoryOrder : CategoryOrder
-
Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to "category ascending" or "category descending" if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to "total ascending" or "total descending" if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean or median of all the values.
?CategoryArray : IEnumerable<'CategoryArrayType>
-
Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`.
?RangeSlider : RangeSlider
-
Sets a range slider for this axis
?RangeSelector : RangeSelector
-
Sets a range selector for this axis. This object contains toggable presets for the rangeslider.
?BackgroundColor : Color
-
Sets the background color of this axis' wall. (Only has an effect on 3D scenes)
?ShowBackground : bool
-
Sets whether or not this axis' wall has a background color. (Only has an effect on 3D scenes)
?Id : SubPlotId
-
The target axis id on which the styles should be applied. Default is 1.
Returns: GenericChart
|
Sets the given x axis styles on the input chart's layout. If there is already an axis set at the given id, the styles are applied to it. If there is no axis present, a new LinearAxis object with the given styles will be set.
|
Full Usage:
GenericChartExtensions.WithYAxisStyle(gChart, ?TitleText, ?TitleFont, ?TitleStandoff, ?Title, ?Color, ?AxisType, ?MinMax, ?Mirror, ?ShowSpikes, ?SpikeColor, ?SpikeThickness, ?ShowLine, ?LineColor, ?ShowGrid, ?GridColor, ?ZeroLine, ?ZeroLineColor, ?Anchor, ?Side, ?Overlaying, ?Domain, ?Position, ?CategoryOrder, ?CategoryArray, ?RangeSlider, ?RangeSelector, ?BackgroundColor, ?ShowBackground, ?Id)
Parameters:
GenericChart
-
The chart in which to change the Y axis style
?TitleText : string
-
Sets the text of the axis title.
?TitleFont : Font
-
Sets the font of the axis title.
?TitleStandoff : int
-
Sets the standoff distance (in px) between the axis labels and the title text.
?Title : Title
-
Sets the Title (use this for more finegrained control than the other title-associated arguments)
?Color : Color
-
Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors.
?AxisType : AxisType
-
Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.
?MinMax : 'MinType * 'MaxType
-
Tuple of (Min*Max value). Sets the range of this axis (the axis will go from Min to Max). If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2).
?Mirror : Mirror
-
Determines if and how the axis lines or/and ticks are mirrored to the opposite side of the plotting area.
?ShowSpikes : bool
-
Determines whether or not spikes (aka droplines) are drawn for this axis.
?SpikeColor : Color
-
Sets the spike color. If not set, will use the series color
?SpikeThickness : int
-
Sets the width (in px) of the zero line.
?ShowLine : bool
-
Determines whether or not a line bounding this axis is drawn.
?LineColor : Color
-
Sets the axis line color.
?ShowGrid : bool
-
Determines whether or not grid lines are drawn. If "true", the grid lines are drawn at every tick mark.
?GridColor : Color
-
Sets the color of the grid lines.
?ZeroLine : bool
-
Determines whether or not a line is drawn at along the 0 value of this axis. If "true", the zero line is drawn on top of the grid lines.
?ZeroLineColor : Color
-
Sets the line color of the zero line.
?Anchor : LinearAxisId
-
If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding opposite-letter axis. If set to "free", this axis' position is determined by `position`.
?Side : Side
-
Determines whether a x (y) axis is positioned at the "bottom" ("left") or "top" ("right") of the plotting area.
?Overlaying : LinearAxisId
-
If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis, with traces and axes visible for both axes. If "false", this axis does not overlay any same-letter axes. In this case, for axes with overlapping domains only the highest-numbered axis will be visible.
?Domain : float * float
-
Tuple of (X*Y fractions). Sets the domain of this axis (in plot fraction).
?Position : float
-
Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to "free".
?CategoryOrder : CategoryOrder
-
Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to "category ascending" or "category descending" if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to "total ascending" or "total descending" if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean or median of all the values.
?CategoryArray : IEnumerable<'CategoryArrayType>
-
Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`.
?RangeSlider : RangeSlider
-
Sets a range slider for this axis
?RangeSelector : RangeSelector
-
Sets a range selector for this axis. This object contains toggable presets for the rangeslider.
?BackgroundColor : Color
-
Sets the background color of this axis' wall. (Only has an effect on 3D scenes)
?ShowBackground : bool
-
Sets whether or not this axis' wall has a background color. (Only has an effect on 3D scenes)
?Id : SubPlotId
-
The target axis id on which the styles should be applied. Default is 1.
Returns: GenericChart
|
Sets the given y axis styles on the input chart's layout. If there is already an axis set at the given id, the styles are applied to it. If there is no axis present, a new LinearAxis object with the given styles will be set.
|