export declare interface Annotations extends Label {
/** Determines whether or not this annotation is visible. */
visible: boolean;
/**
* Sets the text associated with this annotation.
* Plotly uses a subset of HTML tags to do things like
* newline (
), bold (), italics (),
* hyperlinks (). Tags , ,
* are also supported.
*/
text: string;
/** Sets the angle at which the `text` is drawn with respect to the horizontal. */
textangle: string | number;
/**
* Sets an explicit width for the text box. null (default) lets the
* text set the box width. Wider text will be clipped.
* There is no automatic wrapping; use
to start a new line.
*/
width: number;
/**
* Sets an explicit height for the text box. null (default) lets the
* text set the box height. Taller text will be clipped.
*/
height: number;
/** Sets the opacity of the annotation (text + arrow). */
opacity: number;
/**
* Sets the horizontal alignment of the `text` within the box.
* Has an effect only if `text` spans more two or more lines
* (i.e. `text` contains one or more
HTML tags) or if an
* explicit width is set to override the text width.
*/
align: 'left' | 'center' | 'right';
/**
* Sets the vertical alignment of the `text` within the box.
* Has an effect only if an explicit height is set to override the text height.
*/
valign: 'top' | 'middle' | 'bottom';
/** Sets the padding (in px) between the `text` and the enclosing border. */
borderpad: number;
/** Sets the width (in px) of the border enclosing the annotation `text`. */
borderwidth: number;
/**
* Determines whether or not the annotation is drawn with an arrow.
* If *true*, `text` is placed near the arrow's tail.
* If *false*, `text` lines up with the `x` and `y` provided.
*/
showarrow: boolean;
/** Sets the color of the annotation arrow. */
arrowcolor: string;
/** Sets the end annotation arrow head style. */
arrowhead: number;
/** Sets the start annotation arrow head style. */
startarrowhead: number;
/** Sets the annotation arrow head position. */
arrowside: 'end' | 'start';
/**
* Sets the size of the end annotation arrow head, relative to `arrowwidth`.
* A value of 1 (default) gives a head about 3x as wide as the line.
*/
arrowsize: number;
/**
* Sets the size of the start annotation arrow head, relative to `arrowwidth`.
* A value of 1 (default) gives a head about 3x as wide as the line.
*/
startarrowsize: number;
/** Sets the width (in px) of annotation arrow line. */
arrowwidth: number;
/**
* Sets a distance, in pixels, to move the end arrowhead away from the
* position it is pointing at, for example to point at the edge of
* a marker independent of zoom. Note that this shortens the arrow
* from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`
* which moves everything by this amount.
*/
standoff: number;
/**
* Sets a distance, in pixels, to move the start arrowhead away from the
* position it is pointing at, for example to point at the edge of
* a marker independent of zoom. Note that this shortens the arrow
* from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`
* which moves everything by this amount.
*/
startstandoff: number;
/**
* Sets the x component of the arrow tail about the arrow head.
* If `axref` is `pixel`, a positive (negative)
* component corresponds to an arrow pointing
* from right to left (left to right).
* If `axref` is an axis, this is an absolute value on that axis,
* like `x`, NOT a relative value.
*/
ax: number;
/**
* Sets the y component of the arrow tail about the arrow head.
* If `ayref` is `pixel`, a positive (negative)
* component corresponds to an arrow pointing
* from bottom to top (top to bottom).
* If `ayref` is an axis, this is an absolute value on that axis,
* like `y`, NOT a relative value.
*/
ay: number;
/**
* Indicates in what terms the tail of the annotation (ax,ay)
* is specified. If `pixel`, `ax` is a relative offset in pixels
* from `x`. If set to an x axis id (e.g. *x* or *x2*), `ax` is
* specified in the same terms as that axis. This is useful
* for trendline annotations which should continue to indicate
* the correct trend when zoomed.
*/
axref: 'pixel' | XAxisName;
/**
* Indicates in what terms the tail of the annotation (ax,ay)
* is specified. If `pixel`, `ay` is a relative offset in pixels
* from `y`. If set to a y axis id (e.g. *y* or *y2*), `ay` is
* specified in the same terms as that axis. This is useful
* for trendline annotations which should continue to indicate
* the correct trend when zoomed.
*/
ayref: 'pixel' | YAxisName;
/**
* Sets the annotation's x coordinate axis.
* If set to an x axis id (e.g. *x* or *x2*), the `x` position refers to an x coordinate
* If set to *paper*, the `x` position refers to the distance from
* the left side of the plotting area in normalized coordinates
* where 0 (1) corresponds to the left (right) side.
*/
xref: 'paper' | XAxisName;
/**
* Sets the annotation's x position.
* If the axis `type` is *log*, then you must take the log of your desired range.
* If the axis `type` is *date*, it should be date strings, like date data,
* though Date objects and unix milliseconds will be accepted and converted to strings.
* If the axis `type` is *category*, it should be numbers, using the scale where each
* category is assigned a serial number from zero in the order it appears.
*/
x: number | string;
/**
* Sets the text box's horizontal position anchor
* This anchor binds the `x` position to the *left*, *center* or *right* of the annotation.
* For example, if `x` is set to 1, `xref` to *paper* and `xanchor` to *right* then the
* right-most portion of the annotation lines up with the right-most edge of the plotting area.
* If *auto*, the anchor is equivalent to *center* for data-referenced annotations or if there
* is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side.
*/
xanchor: 'auto' | 'left' | 'center' | 'right';
/**
* Shifts the position of the whole annotation and arrow to the
* right (positive) or left (negative) by this many pixels.
*/
xshift: number;
/**
* Sets the annotation's y coordinate axis.
* If set to an y axis id (e.g. *y* or *y2*), the `y` position refers to an y coordinate
* If set to *paper*, the `y` position refers to the distance from
* the bottom of the plotting area in normalized coordinates
* where 0 (1) corresponds to the bottom (top).
*/
yref: 'paper' | YAxisName;
/**
* Sets the annotation's y position.
* If the axis `type` is *log*, then you must take the log of your desired range.
* If the axis `type` is *date*, it should be date strings, like date data,
* though Date objects and unix milliseconds will be accepted and converted to strings.
* If the axis `type` is *category*, it should be numbers, using the scale where each
* category is assigned a serial number from zero in the order it appears.
*/
y: number | string;
/**
* Sets the text box's vertical position anchor
* This anchor binds the `y` position to the *top*, *middle* or *bottom* of the annotation.
* For example, if `y` is set to 1, `yref` to *paper* and `yanchor` to *top* then the
* top-most portion of the annotation lines up with the top-most edge of the plotting area.
* If *auto*, the anchor is equivalent to *middle* for data-referenced annotations or if
* there is an arrow, whereas for paper-referenced with no arrow, the anchor picked
* corresponds to the closest side.
*/
yanchor: 'auto' | 'top' | 'middle' | 'bottom';
/**
* Shifts the position of the whole annotation and arrow up
* (positive) or down (negative) by this many pixels.
*/
yshift: number;
/**
* Makes this annotation respond to clicks on the plot.
* If you click a data point that exactly matches the `x` and `y` values of this annotation,
* and it is hidden (visible: false), it will appear. In *onoff* mode, you must click the same
* point again to make it disappear, so if you click multiple points, you can show multiple
* annotations. In *onout* mode, a click anywhere else in the plot (on another data point or not)
* will hide this annotation. If you need to show/hide this annotation in response to different
* `x` or `y` values, you can set `xclick` and/or `yclick`. This is useful for example to label
* the side of a bar. To label markers though, `standoff` is preferred over `xclick` and `yclick`.
*/
clicktoshow: false | 'onoff' | 'onout';
/**
* Toggle this annotation when clicking a data point whose `x` value
* is `xclick` rather than the annotation's `x` value.
*/
xclick: any;
/**
* Toggle this annotation when clicking a data point whose `y` value
* is `yclick` rather than the annotation's `y` value.
*/
yclick: any;
/**
* Sets text to appear when hovering over this annotation.
* If omitted or blank, no hover label will appear.
*/
hovertext: string;
hoverlabel: Partial;
/**
* Determines whether the annotation text box captures mouse move and click events,
* or allows those events to pass through to data points in the plot that may be
* behind the annotation. By default `captureevents` is *false* unless `hovertext`
* is provided. If you use the event `plotly_clickannotation` without `hovertext`
* you must explicitly enable `captureevents`.
*/
captureevents: boolean;
}
export declare interface AutoRangeOptions {
clipmax: DTickValue;
clipmin: DTickValue;
include: DTickValue;
maxallowed: DTickValue;
minallowed: DTickValue;
}
export declare interface Axis {
/**
* A single toggle to hide the axis while preserving interaction like dragging.
* Default is true when a cheater plot is present on the axis, otherwise
* false
*/
visible: boolean;
/**
* Sets default for all colors associated with this axis
* all at once: line, font, tick, and grid colors.
* Grid color is lightened by blending this with the plot background
* Individual pieces can override this.
*/
color: Color;
title: string | Partial;
/**
* Former `titlefont` is now the sub-attribute `font` of `title`.
* To customize title font properties, please use `title.font` now.
*/
titlefont: Partial;
type: AxisType;
autorange: true | false | 'reversed' | 'min reversed' | 'max reversed' | 'min' | 'max';
autorangeoptions: Partial;
/**
* 'If *normal*, the range is computed in relation to the extrema
* of the input data.
* If `*tozero*`, the range extends to 0,
* regardless of the input data
* If *nonnegative*, the range is non-negative,
* regardless of the input data.
* Applies only to linear axes.
*/
rangemode: 'normal' | 'tozero' | 'nonnegative';
range: any[];
/**
* Determines whether or not this axis is zoom-able.
* If true, then zoom is disabled.
*/
fixedrange: boolean;
/**
* Ticks
*/
tickmode: 'auto' | 'linear' | 'array';
nticks: number;
tick0: number | string;
dtick: DTickValue;
tickvals: any[];
ticktext: string[];
ticks: 'outside' | 'inside' | '';
mirror: true | 'ticks' | false | 'all' | 'allticks';
ticklen: number;
tickwidth: number;
tickcolor: Color;
showticklabels: boolean;
showspikes: boolean;
spikecolor: Color;
spikethickness: number;
/**
* 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.
*/
categoryorder: 'trace' | 'category ascending' | 'category descending' | 'array' | 'total ascending' | 'total descending' | 'min ascending' | 'min descending' | 'max ascending' | 'max descending' | 'sum ascending' | 'sum descending' | 'mean ascending' | 'mean descending' | 'median ascending' | 'median descending';
categoryarray: any[];
tickfont: Partial;
tickangle: 'auto' | number;
tickprefix: string;
/**
* If `all`, all tick labels are displayed with a prefix.
* If `first`, only the first tick is displayed with a prefix.
* If `last`, only the last tick is displayed with a suffix.
* If `none`, tick prefixes are hidden.
*/
showtickprefix: 'all' | 'first' | 'last' | 'none';
/**
* Sets a tick label suffix.
*/
ticksuffix: string;
/**
* Same as `showtickprefix` but for tick suffixes.
*/
showticksuffix: 'all' | 'first' | 'last' | 'none';
/**
* If `all`, all exponents are shown besides their significands.
* If `first`, only the exponent of the first tick is shown.
* If `last`, only the exponent of the last tick is shown.
* If `none`, no exponents appear.
*/
showexponent: 'all' | 'first' | 'last' | 'none';
/**
* Determines a formatting rule for the tick exponents.
* For example, consider the number 1,000,000,000.
* If `none`, it appears as *1,000,000,000*.
* If `e`, *1e+9*.
* If `E`, *1E+9*.
* If `power`, *1x10^9* (with 9 in a super script).
* If `SI`, *1G*.
* If `B`, *1B*.
*/
exponentformat: 'none' | 'e' | 'E' | 'power' | 'SI' | 'B';
/**
* Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B".
*/
minexponent: number;
/**
* 'If `true`, even 4-digit integers are separated
*/
separatethousands: boolean;
/**
* Sets the tick label formatting rule using d3 formatting mini-languages
* which are very similar to those in Python.
* For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format
* And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format
* We add one item to d3's date formatter: `%{n}f` for fractional seconds with n digits.
* For example, `"2016-10-13 09:15:23.456"` with tickformat `"%H~%M~%S.%2f"` would display `"09~15~23.46"`
*/
tickformat: string;
/**
* Sets the hover text formatting rule using d3 formatting mini-languages
* which are very similar to those in Python.
* For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format
* And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format
* We add one item to d3's date formatter: `%{n}f` for fractional seconds with n digits.
* For example, `"2016-10-13 09:15:23.456"` with tickformat `"%H~%M~%S.%2f"` would display "09~15~23.46"
*/
hoverformat: string;
calendar: Calendar;
/**
* Array of `Partial` objects.
*/
tickformatstops: Array>;
spikedash: string;
/**
* Determines the drawing mode for the spike line.
* If `toaxis`, the line is drawn from the data point to the axis the
* series is plotted on.
* If `across`, the line is drawn across the entire plot area, and
* supercedes *toaxis*.
* If `marker`, then a marker dot is drawn on the axis the series is
* plotted on
*/
spikemode: 'toaxis' | 'across' | 'marker' | 'toaxis+across' | 'toaxis+across+marker' | 'across+marker' | 'toaxis+marker';
/**
* Determines whether spikelines are stuck to the cursor or to the closest datapoints.
*/
spikesnap: 'data' | 'cursor' | 'hovered data';
/**
* Lines and Grids
*/
/**
* Determines whether or not a line bounding this axis is drawn.
*/
showline: boolean;
/**
* Sets the axis line color
*/
linecolor: Color;
/**
* Sets the width (in px) of the axis line.
*/
linewidth: number;
/**
* Determines whether or not grid lines are drawn.
* If `true`, the grid lines are drawn at every tick mark.
*/
showgrid: boolean;
/**
* Sets the color of the grid lines.
*/
gridcolor: Color;
/**
* Sets the width (in px) of the grid lines.
*/
gridwidth: number;
/**
* 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.
*/
zeroline: boolean;
/**
* Sets the line color of the zero line.
*/
zerolinecolor: Color;
/**
* Sets the width (in px) of the zero line.
*/
zerolinewidth: number;
/**
* Determines whether or not a dividers are drawn
* between the category levels of this axis.
* Only has an effect on *multicategory* axes.
*/
showdividers: boolean;
/**
* Sets the color of the dividers
* Only has an effect on *multicategory* axes.
*/
dividercolor: Color;
/**
* Sets the width (in px) of the dividers
* Only has an effect on *multicategory* axes.
*/
dividerwidth: number;
autotypenumbers: 'convert types' | 'strict';
labelalias: DTickValue;
maxallowed: DTickValue;
minallowed: DTickValue;
}
export declare type AxisName = XAxisName | YAxisName;
export declare type AxisType = '-' | 'linear' | 'log' | 'date' | 'category' | 'multicategory';
export declare type Calendar = 'gregorian' | 'chinese' | 'coptic' | 'discworld' | 'ethiopian' | 'hebrew' | 'islamic' | 'julian' | 'mayan' | 'nanakshahi' | 'nepali' | 'persian' | 'jalali' | 'taiwan' | 'thai' | 'ummalqura';
export declare type Color = string | number | Array | Array>;
export declare interface ColorAxis {
colorscale?: Array<[number, string]>;
cmin?: number;
cmax?: number;
colorbar?: {
title?: string | {
text: string;
};
thickness?: number;
len?: number;
outlinewidth?: number;
};
reversescale?: boolean;
showscale?: boolean;
}
export declare interface ColorBar {
thicknessmode: 'fraction' | 'pixels';
thickness: number;
lenmode: 'fraction' | 'pixels';
len: number;
x: number;
xanchor: 'left' | 'center' | 'right';
xpad: number;
y: number;
yanchor: 'top' | 'middle' | 'bottom';
ypad: number;
outlinecolor: Color;
outlinewidth: number;
bordercolor: Color;
borderwidth: Color;
bgcolor: Color;
tickmode: 'auto' | 'linear' | 'array';
nticks: number;
tick0: number | string;
dtick: DTickValue;
tickvals: Datum[] | Datum[][] | Datum[][][] | TypedArray;
ticktext: Datum[] | Datum[][] | Datum[][][] | TypedArray;
ticks: 'outside' | 'inside' | '';
ticklen: number;
tickwidth: number;
tickcolor: Color;
showticklabels: boolean;
tickfont: Font;
tickangle: 'auto' | number;
tickformat: string;
tickformatstops: Array>;
tickprefix: string;
showtickprefix: 'all' | 'first' | 'last' | 'none';
ticksuffix: string;
showticksuffix: 'all' | 'first' | 'last' | 'none';
separatethousands: boolean;
exponentformat: 'none' | 'e' | 'E' | 'power' | 'SI' | 'B';
showexponent: 'all' | 'first' | 'last' | 'none';
minexponent: number;
title: string;
titlefont: Font;
titleside: 'right' | 'top' | 'bottom';
tickvalssrc: any;
ticktextsrc: any;
}
export declare type ColorScale = string | string[] | Array<[number, string]>;
export declare interface Config {
/**
* Determines whether math should be typeset or not,
* when MathJax (either v2 or v3) is present on the page.
*/
typesetMath: boolean;
/** DO autosize once regardless of layout.autosize (use default width or height values otherwise) */
autosizable: boolean;
/** set the length of the undo/redo queue */
queueLength: number;
/** if we DO autosize, do we fill the container or the screen? */
fillFrame: boolean;
/** if we DO autosize, set the frame margins in percents of plot size */
frameMargins: number;
/** Set global transform to be applied to all traces with no specification needed */
globalTransforms: any[];
/** Which localization should we use? Should be a string like 'en' or 'en-US' */
locale: string;
/**
* Localization definitions
* Locales can be provided either here (specific to one chart) or globally
* by registering them as modules.
* Should be an object of objects \{locale: \{dictionary: \{...\}, format: \{...\}\}\}
* \{
* da: \{
* dictionary: \{'Reset axes': 'Nulstil aksler', ...\},
* format: \{months: [...], shortMonths: [...]\}
* \},
* ...
* \}
* All parts are optional. When looking for translation or format fields, we
* look first for an exact match in a config locale, then in a registered
* module. If those fail, we strip off any regionalization ('en-US' -\> 'en')
* and try each (config, registry) again. The final fallback for translation
* is untranslated (which is US English) and for formats is the base English
* (the only consequence being the last fallback date format %x is DD/MM/YYYY
* instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored
* for our automatic number formatting, but can be used in custom formats.
*/
locales: {};
/** Make the chart responsive to window size */
responsive: boolean;
}
export declare type Dash = 'solid' | 'dot' | 'dash' | 'longdash' | 'dashdot' | 'longdashdot';
export declare type Data = Partial | Partial | Partial;
export declare interface DataTitle {
text: string;
font: Partial;
standoff: number;
position: 'top left' | 'top center' | 'top right' | 'middle center' | 'bottom left' | 'bottom center' | 'bottom right';
}
export declare type DataTransform = Partial;
export declare type Datum = string | number | Date | null;
export declare function decodeBase64Fields(plotlySchema: PlotlySchema): PlotlySchema;
export declare interface Delta {
reference: number;
position: 'top' | 'bottom' | 'left' | 'right';
relative: boolean;
valueformat: string;
increasing: {
symbol: string;
color: Color;
};
decreasing: {
symbol: string;
color: Color;
};
}
export declare interface Domain {
x: number[];
y: number[];
row: number;
column: number;
}
export declare type DTickValue = number | string;
export declare type ErrorBar = Partial & ({
type: 'constant' | 'percent';
value: number;
valueminus?: number | undefined;
} | {
type: 'data';
array: Datum[];
arrayminus?: Datum[] | undefined;
});
export declare interface ErrorOptions {
visible: boolean;
symmetric: boolean;
color: Color;
thickness: number;
width: number;
opacity: number;
}
export declare type FluentChart = 'annotation' | 'area' | 'composite' | 'donut' | 'fallback' | 'gauge' | 'groupedverticalbar' | 'heatmap' | 'horizontalbar' | 'line' | 'scatter' | 'scatterpolar' | 'sankey' | 'table' | 'verticalstackedbar' | 'gantt';
export declare interface Font {
color: Color;
/**
* HTML font family - the typeface that will be applied by the web browser.
* The web browser will only be able to apply a font if it is available on the system
* which it operates. Provide multiple font families, separated by commas, to indicate
* the preference in which to apply fonts if they aren't available on the system.
* The plotly service (at https://plot.ly or on-premise) generates images on a server,
* where only a select number of fonts are installed and supported.
* These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*,
* *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,
* *PT Sans Narrow*, *Raleway*, *Times New Roman*.
* @default "Arial, sans-serif"
*/
family: string;
/**
* Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
* @default "none"
*/
shadow: string;
/**
* number greater than or equal to 1
* @default 13
*/
size: number;
/**
* Sets the weight (or boldness) of the font.
* number between or equal to 1 and 1000
* @default normal
*/
weight: number;
}
/**
* Formats a Date object to a locale-specific string representation.
* If the date is invalid, it returns an empty string.
* If the culture is not provided, it defaults to the browser's locale.
* If useUtc is true, it formats the date in UTC.
* If showTZname is true, it includes the time zone name in the formatted string.
*
* @param date - The Date object to format.
* @param culture - Optional culture code for formatting (e.g., 'en-US').
* @param useUtc - Optional flag to indicate if the date should be formatted in UTC.
* @param showTZname - Optional flag to include time zone name in the formatted string.
* @param options - Optional Intl.DateTimeFormatOptions for additional formatting options.
* @returns The formatted date string or an empty string if the date is invalid.
*/
export declare const formatDateToLocaleString: (date: Date, culture?: string, useUtc?: boolean, showTZname?: boolean, options?: Intl.DateTimeFormatOptions) => string;
/**
* Formats a number, string, or date to a locale-specific string representation.
* If the input is a number or a numeric string, it will be formatted with appropriate grouping.
* If the input is a Date object, it will be formatted to a locale string based on the culture and UTC preference.
* If the input is undefined, null, an empty string, or NaN, it will return the input as is.
*
* @param data - The data to format (number, string, Date, or undefined).
* @param culture - Optional culture code for formatting (e.g., 'en-US').
* @param useUtc - Optional flag to indicate if the date should be formatted in UTC.
* @returns The formatted string or the original data if no formatting is applied.
*/
export declare const formatToLocaleString: (data: LocaleStringDataProps, culture?: string, useUtc?: boolean | string) => LocaleStringDataProps;
export declare interface Gauge {
shape: 'angular' | 'bullet';
bar: Partial;
bgcolor: Color;
bordercolor: Color;
borderwidth: number;
axis: Partial;
steps: Array<{
range: number[];
color: Color;
}>;
threshold: Partial;
}
export declare interface GaugeBar {
color: Color;
line: Partial;
thickness: number;
}
export declare interface GaugeLine {
color: Color;
width: number;
}
export declare const getAxisIds: (data: Partial) => {
x: number;
y: number;
};
export declare const getAxisKey: (axLetter: "x" | "y", axId: number) => keyof Layout;
/**
* This function returns a multilevel formatter for a given date range.
* It determines the appropriate date format to accommodate each tick value.
* The goal is to represent the date label in the smallest possible format without loss of information.
* There is an exhaustive map of all possible date/time units and their respective formats.
* Based on the range of formatting granularity levels, a date time format spanning the range is returned.
* Refer https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
* to see explanation about each format specifier
* @param startLevel - The starting level of the date format.
* @param endLevel - The ending level of the date format.
* @param useUTC - Optional flag to indicate if the date should be formatted in UTC.
* @returns - An Intl.DateTimeFormatOptions object that can be used to format date/time values.
*/
export declare function getMultiLevelDateTimeFormatOptions(startLevel?: number, endLevel?: number): Intl.DateTimeFormatOptions;
export declare const getValidSchema: (input: any) => PlotlySchema;
/**
* This function checks if the number is very close to an integer (within a small epsilon value).
* If it is, it rounds the number to the nearest integer; otherwise, it returns the original number.
* This is useful to avoid issues with floating point precision errors in calculations.
* Refer 'https://docs.python.org/release/2.5.1/tut/node16.html' for more details.
* @param num - The number to check for floating point precision error.
* @returns The number after resolving floating point precision errors.
*/
export declare function handleFloatingPointPrecisionError(num: number): number;
export declare interface HoverLabel extends Label {
/**
* Sets the horizontal alignment of the text content within hover label box.
* @default "auto"
*/
align: 'left' | 'right' | 'auto';
/**
* Sets the default length (in number of characters) of the trace name
* in the hover labels for all traces.
* -1 shows the whole name regardless of length.
* @default 15
*/
namelength: number;
}
export declare interface Icon {
height?: number | undefined;
width?: number | undefined;
ascent?: number | undefined;
descent?: number | undefined;
name?: string | undefined;
path?: string | undefined;
svg?: string | undefined;
transform?: string | undefined;
}
export declare const isArrayOfType: (plotCoordinates: Datum[] | Datum[][] | TypedArray | undefined, typeCheck: (datum: any, ...args: any[]) => boolean, ...args: any[]) => boolean;
export declare function isArrayOrTypedArray(a: any): boolean;
export declare const isDate: (value: any) => boolean;
export declare const isDateArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
export declare const isInvalidValue: (value: any) => boolean;
export declare const isMonth: (possiblyMonthValue: any) => boolean;
export declare const isMonthArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
export declare const isNumber: (value: any) => boolean;
export declare const isNumberArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
export declare const isObjectArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
/**
* Checks if a URL is safe by validating its protocol against a whitelist of allowed protocols.
*
* @param href - The URL to validate.
* @returns True if the URL is considered safe, false otherwise.
*/
export declare function isSafeUrl(href: string): boolean;
export declare const isScatterAreaChart: (data: Partial) => boolean;
export declare const isStringArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
export declare function isTypedArray(a: any): boolean;
export declare const isYearArray: (data: Datum[] | Datum[][] | TypedArray | undefined) => boolean;
export declare interface Label {
/** Sets the background color of all hover labels on graph. */
bgcolor: string;
/** Sets the border color of all hover labels on graph. */
bordercolor: string;
/** Sets the default hover label font used by all traces on the graph. */
font: Partial;
}
export declare interface Layout {
colorway: string[];
piecolorway: string[];
title: string | Partial<{
text: string;
font: Partial;
xref: 'container' | 'paper';
yref: 'container' | 'paper';
x: number;
y: number;
xanchor: 'auto' | 'left' | 'center' | 'right';
yanchor: 'auto' | 'top' | 'middle' | 'bottom';
pad: Partial;
}>;
titlefont: Partial;
autosize: boolean;
showlegend: boolean;
paper_bgcolor: Color;
plot_bgcolor: Color;
separators: string;
hidesources: boolean;
xaxis: Partial;
xaxis2: Partial;
xaxis3: Partial;
xaxis4: Partial;
xaxis5: Partial;
xaxis6: Partial;
xaxis7: Partial;
xaxis8: Partial;
xaxis9: Partial;
yaxis: Partial;
yaxis2: Partial;
yaxis3: Partial;
yaxis4: Partial;
yaxis5: Partial;
yaxis6: Partial;
yaxis7: Partial;
yaxis8: Partial;
yaxis9: Partial;
margin: Partial;
height: number;
width: number;
hovermode: 'closest' | 'x' | 'y' | 'x unified' | 'y unified' | false;
hoverdistance: number;
hoverlabel: Partial;
calendar: Calendar;
'xaxis.range': [Datum, Datum];
'xaxis.range[0]': Datum;
'xaxis.range[1]': Datum;
'yaxis.range': [Datum, Datum];
'yaxis.range[0]': Datum;
'yaxis.range[1]': Datum;
'yaxis.type': AxisType;
'xaxis.type': AxisType;
'xaxis.autorange': boolean;
'yaxis.autorange': boolean;
'xaxis.title': string;
'yaxis.title': string;
ternary: any;
geo: any;
mapbox: any;
subplot: string;
radialaxis: Partial;
angularaxis: {};
dragmode: 'zoom' | 'pan' | 'select' | 'lasso' | 'drawclosedpath' | 'drawopenpath' | 'drawline' | 'drawrect' | 'drawcircle' | 'orbit' | 'turntable' | false;
orientation: number;
annotations: Array>;
shapes: Array>;
legend: Partial