@fluentui/react-charting 5.24.2 → 5.24.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +79 -1
- package/CHANGELOG.md +28 -2
- package/dist/react-charting.d.ts +204 -38
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +65 -12
- package/lib/ScatterChart.d.ts +1 -0
- package/lib/ScatterChart.js +2 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +4 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +9 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +317 -126
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +22 -3
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.js +95 -37
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +24 -3
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.base.js +482 -0
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.js +10 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js +19 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.d.ts +2 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +27 -6
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +48 -31
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +91 -11
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.d.ts +4 -0
- package/lib/utilities/SVGTooltipText.js +1 -2
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.d.ts +32 -5
- package/lib/utilities/utilities.js +132 -2
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/ScatterChart.d.ts +1 -0
- package/lib-amd/ScatterChart.js +6 -0
- package/lib-amd/ScatterChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +476 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-amd/components/ScatterChart/index.d.ts +2 -0
- package/lib-amd/components/ScatterChart/index.js +7 -0
- package/lib-amd/components/ScatterChart/index.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/index.d.ts +3 -1
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +91 -11
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-amd/utilities/SVGTooltipText.js +1 -2
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +32 -5
- package/lib-amd/utilities/utilities.js +135 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/ScatterChart.d.ts +1 -0
- package/lib-commonjs/ScatterChart.js +5 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +485 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/index.js +6 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +91 -11
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +32 -5
- package/lib-commonjs/utilities/utilities.js +135 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +45 -2
- package/src/components/ScatterChart/ScatterChart.types.ts +67 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyColorAdapter.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/PlotlyColorAdapter.ts"],"names":[],"mappings":";;;;IAaA,IAAM,uBAAuB,GAAG;QAC9B,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,IAAI;KAChB,CAAC;IAEF,IAAM,iCAAiC,GAAG;QACxC,uBAAc,CAAC,MAAM,EAAE,GAAG;QAC1B,uBAAc,CAAC,OAAO,EAAE,GAAG;QAC3B,uBAAc,CA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AA,MAAM,CAAC,OAAO,mCAAI,CAAC,CAAC;IAC1B,CAAC,CAAC;IANW,QAAA,UAAU,cAMrB","sourcesContent":["import * as React from 'react';\nimport { color as d3Color } from 'd3-color';\nimport type { PieColors, Color, PlotData } from '@fluentui/chart-utilities';\nimport { isArrayOrTypedArray } from '@fluentui/chart-utilities';\nimport { areArraysEqual } from '../../utilities/utilities';\nimport { DataVizPalette, getColorFromToken, getNextColor } from '../../utilities/colors';\n\ntype PlotlyColorway = 'plotly' | 'others';\n\n// The color sequences in plotly express are defined here:\n// https://plotly.com/python/discrete-color/#:~:text=Join%20now.-,Color%20Sequences%20in%20Plotly%20Express,-By%20default%2C%20Plotly\nexport type ColorwayType = 'default' | 'builtin' | 'others' | undefined;\n\nconst DEFAULT_PLOTLY_COLORWAY = [\n '#636efa', //1\n '#ef553b', //2\n '#00cc96', //3\n '#ab63fa', //4\n '#ffa15a', //5\n '#19d3f3', //6\n '#ff6692', //7\n '#b6e880', //8\n '#ff97ff', //9\n '#fecb52', //10\n];\n\nconst PLOTLY_FLUENTVIZ_COLORWAY_MAPPING = [\n DataVizPalette.color1, //1\n DataVizPalette.warning, //2\n DataVizPalette.color8, //3\n DataVizPalette.color4, //4\n DataVizPalette.color7, //5\n DataVizPalette.color6, //6\n DataVizPalette.color2, //7\n DataVizPalette.color5, //8\n DataVizPalette.color9, //9\n DataVizPalette.color10, //10\n];\n\nfunction getPlotlyColorway(colorway: string[] | undefined): PlotlyColorway {\n const isPlotlyColorway =\n isArrayOrTypedArray(colorway) &&\n areArraysEqual(\n colorway?.map(c => c.toLowerCase()),\n DEFAULT_PLOTLY_COLORWAY,\n );\n\n return isPlotlyColorway ? 'plotly' : 'others';\n}\n\nfunction tryMapFluentDataViz(hexColor: string, templateColorway: PlotlyColorway, isDarkTheme?: boolean): string {\n if (templateColorway !== 'plotly') {\n return hexColor;\n }\n const index = DEFAULT_PLOTLY_COLORWAY.indexOf(hexColor.toLowerCase());\n if (index !== -1) {\n return getColorFromToken(PLOTLY_FLUENTVIZ_COLORWAY_MAPPING[index], isDarkTheme);\n }\n return hexColor;\n}\n\nexport const getColor = (\n legendLabel: string,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string => {\n if (!colorMap.current.has(legendLabel)) {\n let nextColor: string;\n if (colorMap.current.size < PLOTLY_FLUENTVIZ_COLORWAY_MAPPING.length) {\n // Get first 10 colors from plotly-fluentviz colorway mapping\n nextColor = getColorFromToken(PLOTLY_FLUENTVIZ_COLORWAY_MAPPING[colorMap.current.size], isDarkTheme);\n } else {\n nextColor = getNextColor(colorMap.current.size, 0, isDarkTheme);\n }\n colorMap.current.set(legendLabel, nextColor);\n return nextColor;\n }\n\n return colorMap.current.get(legendLabel) as string;\n};\n\nexport const getSchemaColors = (\n colorway: string[] | undefined,\n colors: PieColors | Color | Color[] | string | null | undefined,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string[] | string | undefined => {\n const hexColors: string[] = [];\n if (!colors) {\n return undefined;\n }\n const templateColorway = getPlotlyColorway(colorway);\n if (isArrayOrTypedArray(colors)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (colors as any[]).forEach((element, index) => {\n const colorString = element?.toString().trim();\n const nextFluentColor = getColor(`Label_${index}`, colorMap, isDarkTheme);\n if (colorString) {\n const parsedColor = d3Color(colorString);\n hexColors.push(\n parsedColor ? tryMapFluentDataViz(parsedColor.formatHex(), templateColorway, isDarkTheme) : nextFluentColor,\n );\n } else {\n hexColors.push(nextFluentColor);\n }\n });\n } else if (typeof colors === 'string') {\n const parsedColor = d3Color(colors);\n return parsedColor\n ? tryMapFluentDataViz(parsedColor.formatHex(), templateColorway, isDarkTheme)\n : getColor('Label_0', colorMap, isDarkTheme);\n }\n return hexColors;\n};\n\nexport const extractColor = (\n colorway: string[] | undefined,\n colorwayType: ColorwayType,\n colors: PieColors | Color | Color[] | string | null | undefined,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string | string[] | undefined => {\n return colorwayType === 'default' && colors ? getSchemaColors(colorway, colors, colorMap, isDarkTheme) : undefined;\n};\n\nexport const resolveColor = (\n extractedColors: string[] | string | null | undefined,\n index: number,\n legend: string,\n colorMap: React.MutableRefObject<Map<string, string>>,\n isDarkTheme?: boolean,\n): string => {\n let color = '';\n if (extractedColors && isArrayOrTypedArray(extractedColors) && extractedColors.length > 0) {\n color = extractedColors[index % extractedColors.length];\n } else if (typeof extractedColors === 'string') {\n color = extractedColors;\n } else {\n color = getColor(legend, colorMap, isDarkTheme);\n }\n return color;\n};\n\nexport const getOpacity = (series: Partial<PlotData>, index: number): number => {\n return series.marker?.opacity\n ? isArrayOrTypedArray(series.marker?.opacity)\n ? (series.marker?.opacity as number[])[index % (series.marker?.opacity as number[]).length]\n : (series.marker?.opacity as number)\n : series.opacity ?? 1;\n};\n"]}
|
|
@@ -10,22 +10,36 @@ import { IGaugeChartProps } from '../GaugeChart/index';
|
|
|
10
10
|
import { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';
|
|
11
11
|
import { IVerticalBarChartProps } from '../VerticalBarChart/index';
|
|
12
12
|
import { IChartTableProps } from '../ChartTable/index';
|
|
13
|
-
import type { Datum, PlotlySchema, PlotData, TypedArray, Color } from '@fluentui/chart-utilities';
|
|
13
|
+
import type { Datum, Layout, PlotlySchema, PlotData, TypedArray, Color } from '@fluentui/chart-utilities';
|
|
14
14
|
import type { ColorwayType } from './PlotlyColorAdapter';
|
|
15
|
-
|
|
15
|
+
import { ILegendsProps } from '../Legends/index';
|
|
16
|
+
export type AxisProperties = {
|
|
17
|
+
xAnnotation?: string;
|
|
18
|
+
yAnnotation?: string;
|
|
19
|
+
row: number;
|
|
20
|
+
column: number;
|
|
21
|
+
};
|
|
22
|
+
export type GridAxisProperties = Record<string, AxisProperties>;
|
|
23
|
+
export type GridProperties = {
|
|
24
|
+
templateRows: string;
|
|
25
|
+
templateColumns: string;
|
|
26
|
+
layout: GridAxisProperties;
|
|
27
|
+
};
|
|
16
28
|
export declare const correctYearMonth: (xValues: Datum[] | Datum[][] | TypedArray) => any[];
|
|
17
29
|
export declare const _getGaugeAxisColor: (colorway: string[] | undefined, colorwayType: ColorwayType, color: Color | undefined, colorMap: React.MutableRefObject<Map<string, string>>, isDarkTheme?: boolean) => string;
|
|
18
30
|
export declare const resolveXAxisPoint: (x: Datum, isXYearCategory: boolean, isXString: boolean, isXDate: boolean, isXNumber: boolean) => string | Date | number;
|
|
19
|
-
export declare const transformPlotlyJsonToDonutProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IDonutChartProps;
|
|
20
|
-
export declare const transformPlotlyJsonToVSBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean, fallbackVSBC?: boolean) => IVerticalStackedBarChartProps;
|
|
21
|
-
export declare const transformPlotlyJsonToGVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IGroupedVerticalBarChartProps;
|
|
22
|
-
export declare const transformPlotlyJsonToVBCProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IVerticalBarChartProps;
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
31
|
+
export declare const transformPlotlyJsonToDonutProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IDonutChartProps;
|
|
32
|
+
export declare const transformPlotlyJsonToVSBCProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean, fallbackVSBC?: boolean) => IVerticalStackedBarChartProps;
|
|
33
|
+
export declare const transformPlotlyJsonToGVBCProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IGroupedVerticalBarChartProps;
|
|
34
|
+
export declare const transformPlotlyJsonToVBCProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IVerticalBarChartProps;
|
|
35
|
+
export declare const transformPlotlyJsonToAreaChartProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IAreaChartProps;
|
|
36
|
+
export declare const transformPlotlyJsonToLineChartProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => ILineChartProps;
|
|
37
|
+
export declare const transformPlotlyJsonToScatterChartProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => ILineChartProps;
|
|
38
|
+
export declare const transformPlotlyJsonToHorizontalBarWithAxisProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IHorizontalBarChartWithAxisProps;
|
|
39
|
+
export declare const transformPlotlyJsonToHeatmapProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IHeatMapChartProps;
|
|
40
|
+
export declare const transformPlotlyJsonToSankeyProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => ISankeyChartProps;
|
|
41
|
+
export declare const transformPlotlyJsonToGaugeProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IGaugeChartProps;
|
|
42
|
+
export declare const transformPlotlyJsonToChartTableProps: (input: PlotlySchema, isMultiPlot: boolean, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => IChartTableProps;
|
|
29
43
|
export declare const projectPolarToCartesian: (input: PlotlySchema) => PlotlySchema;
|
|
30
44
|
/**
|
|
31
45
|
* Interate iteratively through the trace object and find all the array attributes.
|
|
@@ -33,6 +47,7 @@ export declare const projectPolarToCartesian: (input: PlotlySchema) => PlotlySch
|
|
|
33
47
|
* @param trace
|
|
34
48
|
*/
|
|
35
49
|
export declare function findArrayAttributes(trace: any): void;
|
|
36
|
-
export declare const
|
|
50
|
+
export declare const getAllupLegendsProps: (input: PlotlySchema, colorMap: React.MutableRefObject<Map<string, string>>, colorwayType: ColorwayType, isDarkTheme?: boolean) => ILegendsProps;
|
|
37
51
|
export declare const getNumberAtIndexOrDefault: (data: PlotData['z'] | undefined, index: number) => number | undefined;
|
|
38
52
|
export declare const getValidXYRanges: (series: Partial<PlotData>) => [number, number][];
|
|
53
|
+
export declare const getGridProperties: (layout: Partial<Layout> | undefined, isMultiPlot: boolean) => GridProperties;
|