@fluentui/react-charts 0.0.0-nightly-20251215-0407.1 → 0.0.0-nightly-20251217-0407.1
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.md +13 -13
- package/dist/index.d.ts +25 -1
- package/lib/components/AreaChart/AreaChart.js +1 -28
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +41 -31
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +5 -5
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -3
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +177 -29
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +17 -17
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/Legends/Legends.js +3 -4
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +1 -23
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +1 -23
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +8 -78
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +14 -26
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/Common.styles.js +0 -1
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +0 -1
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/image-export-utils.js +4 -4
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +200 -67
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +0 -26
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -2
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +40 -30
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +3 -4
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +3 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +177 -28
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -15
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +3 -4
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +0 -22
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -2
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -2
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -22
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -2
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +7 -77
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +13 -25
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +0 -1
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +0 -1
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +3 -3
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +212 -70
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +12 -12
- package/lib/components/DeclarativeChart/imageExporter.js +0 -223
- package/lib/components/DeclarativeChart/imageExporter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +0 -233
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCartesianChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector, useRtl } from '../../utilities/utilities';\nimport { getAxisTitleStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const cartesianchartClassNames = {\n root: 'fui-cart__root',\n chartWrapper: 'fui-cart__chartWrapper',\n plotContainer: 'fui-cart__plotContainer',\n axisTitle: 'fui-cart__axisTitle',\n xAxis: 'fui-cart__xAxis',\n yAxis: 'fui-cart__yAxis',\n opacityChangeOnHover: 'fui-cart__opacityChangeOnHover',\n legendContainer: 'fui-cart__legendContainer',\n svgTooltip: 'fui-cart_svgTooltip',\n shapeStyles: 'fui-cart__shapeStyles',\n descriptionMessage: 'fui-cart__descriptionMessage',\n hover: 'fui-cart__hover',\n tooltip: 'fui-cart__tooltip',\n axisAnnotation: 'fui-cart__axisAnnotation',\n chartTitle: 'fui-cart__chartTitle',\n chart: 'fui-cart__chart',\n annotationLayer: 'fui-cart__annotationLayer'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n textAlign: 'left'\n },\n chartWrapper: {\n position: 'relative'\n },\n chartWrapperMinWidth: {\n overflow: 'auto'\n },\n plotContainer: {\n position: 'relative',\n width: '100%',\n height: '100%'\n },\n axisTitle: getAxisTitleStyle(),\n axisAnnotation: getAxisTitleStyle(),\n xAxis: {\n '& text': {\n fill: tokens.colorNeutralForeground1,\n ...typographyStyles.caption2Strong,\n forcedColorAdjust: 'auto'\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n width: '1px',\n forcedColorAdjust: 'auto'\n },\n '& path': {\n display: 'none'\n }\n },\n yAxis: {\n '& text': {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n '& path': {\n display: 'none'\n }\n },\n rtl: {\n '& g': {\n textAnchor: 'end'\n }\n },\n ltr: {},\n opacityChangeOnHover: {\n opacity: '0.1',\n cursor: 'default'\n },\n legendContainer: {\n marginTop: tokens.spacingVerticalS,\n marginLeft: tokens.spacingHorizontalXL\n },\n svgTooltip: {\n fill: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n annotationLayer: {\n pointerEvents: 'none'\n },\n tooltip: getTooltipStyle()\n});\n/**\n *\n * Apply styling to the Carousel slots based on the state\n */ export const useCartesianChartStyles = (props)=>{\n var _props_styles, _props_reflowProps, _props_styles1, _props_styles2, _props_styles3;\n const _useRtl = useRtl();\n const baseStyles = useStyles();\n return {\n root: mergeClasses(cartesianchartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chartWrapper: mergeClasses(cartesianchartClassNames.chartWrapper, baseStyles.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapperMinWidth : undefined, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),\n plotContainer: mergeClasses(cartesianchartClassNames.plotContainer, baseStyles.plotContainer /*props.styles?.plotContainer*/ ),\n axisTitle: mergeClasses(cartesianchartClassNames.axisTitle, baseStyles.axisTitle /*props.styles?.axisTitle*/ ),\n xAxis: mergeClasses(cartesianchartClassNames.xAxis, baseStyles.xAxis /*props.styles?.xAxis*/ ),\n yAxis: mergeClasses(cartesianchartClassNames.yAxis, baseStyles.yAxis, _useRtl ? baseStyles.rtl : baseStyles.ltr /*props.styles?.yAxis*/ ),\n opacityChangeOnHover: mergeClasses(cartesianchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n legendContainer: mergeClasses(cartesianchartClassNames.legendContainer, baseStyles.legendContainer /*props.styles?.legendContainer*/ ),\n svgTooltip: mergeClasses(cartesianchartClassNames.svgTooltip, baseStyles.svgTooltip, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.svgTooltip),\n annotationLayer: mergeClasses(cartesianchartClassNames.annotationLayer, baseStyles.annotationLayer /*props.styles?.annotationLayer*/ ),\n tooltip: mergeClasses(cartesianchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n axisAnnotation: mergeClasses(cartesianchartClassNames.axisAnnotation, baseStyles.axisAnnotation),\n chart: mergeClasses(cartesianchartClassNames.chart, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chart)\n };\n};\n"],"names":["__styles","mergeClasses","tokens","typographyStyles","HighContrastSelector","useRtl","getAxisTitleStyle","getTooltipStyle","cartesianchartClassNames","root","chartWrapper","plotContainer","axisTitle","xAxis","yAxis","opacityChangeOnHover","legendContainer","svgTooltip","shapeStyles","descriptionMessage","hover","tooltip","axisAnnotation","chartTitle","chart","annotationLayer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","fsow6f","qhf8xq","chartWrapperMinWidth","B80ckks","sj55zd","Bkfmm31","Bxms50k","Bifops1","lr70ht","D01gh","vxuu72","lclgl4","zp1vxd","jxu3ei","B3i31d3","Bhcy8il","z3m6do","se2xxg","rtl","Bkw34lo","ltr","abs64n","Bceei9c","B6of3ja","Frg6f3","Bkecrkj","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","d","p","m","useCartesianChartStyles","props","_props_styles","_props_reflowProps","_props_styles1","_props_styles2","_props_styles3","_useRtl","baseStyles","styles","reflowProps","mode","undefined"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKQ,wBAAwB;;;2BAuGD;eAAvBuE;;;uBA7GwB,gBAAgB;2BAEZ,2BAA2B;AAI7D,iCAAiC;IACxCtE,IAAI,EAAE,gBAAgB;IACtBC,YAAY,EAAE,wBAAwB;IACtCC,aAAa,EAAE,yBAAyB;IACxCC,SAAS,EAAE,qBAAqB;IAChCC,KAAK,EAAE,iBAAiB;IACxBC,KAAK,EAAE,iBAAiB;IACxBC,oBAAoB,EAAE,gCAAgC;IACtDC,eAAe,EAAE,2BAA2B;IAC5CC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K,CAAC,GAAGA,cAAc,CAACnE,UAAU,CAAC;QAChMQ,eAAe,MAAExB,mBAAY,EAACO,wBAAwB,CAACiB,eAAe,EAAE8D,UAAU,CAAC9D,eAAe,CAAC,+BAAA,EAAkC,CAAC;QACtIJ,OAAO,MAAEpB,mBAAY,EAACO,wBAAwB,CAACa,OAAO,EAAEkE,UAAU,CAAClE,OAAO,CAAC,uBAAA,EAA0B,CAAC;QACtGC,cAAc,EAAErB,uBAAY,EAACO,wBAAwB,CAACc,cAAc,EAAEiE,UAAU,CAACjE,cAAc,CAAC;QAChGE,KAAK,MAAEvB,mBAAY,EAACO,wBAAwB,CAACgB,KAAK,EAAE,CAAC6D,cAAc,GAAGL,KAAK,CAACQ,MAAAA,AAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAC7D,KAAK;IAC7J,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"sources":["useCartesianChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { CARTESIAN_XAXIS_CLASSNAME, HighContrastSelector, useRtl } from '../../utilities/utilities';\nimport { getAxisTitleStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const cartesianchartClassNames = {\n root: 'fui-cart__root',\n chartWrapper: 'fui-cart__chartWrapper',\n plotContainer: 'fui-cart__plotContainer',\n axisTitle: 'fui-cart__axisTitle',\n xAxis: CARTESIAN_XAXIS_CLASSNAME,\n yAxis: 'fui-cart__yAxis',\n opacityChangeOnHover: 'fui-cart__opacityChangeOnHover',\n legendContainer: 'fui-cart__legendContainer',\n svgTooltip: 'fui-cart_svgTooltip',\n shapeStyles: 'fui-cart__shapeStyles',\n descriptionMessage: 'fui-cart__descriptionMessage',\n hover: 'fui-cart__hover',\n tooltip: 'fui-cart__tooltip',\n axisAnnotation: 'fui-cart__axisAnnotation',\n chartTitle: 'fui-cart__chartTitle',\n chart: 'fui-cart__chart',\n annotationLayer: 'fui-cart__annotationLayer'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n textAlign: 'left',\n position: 'relative'\n },\n chartWrapper: {\n position: 'relative'\n },\n chartWrapperMinWidth: {\n overflow: 'auto'\n },\n plotContainer: {\n position: 'relative',\n width: '100%',\n height: '100%'\n },\n axisTitle: getAxisTitleStyle(),\n axisAnnotation: getAxisTitleStyle(),\n xAxis: {\n '& text': {\n fill: tokens.colorNeutralForeground1,\n ...typographyStyles.caption2Strong,\n forcedColorAdjust: 'auto'\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n width: '1px',\n forcedColorAdjust: 'auto'\n },\n '& path': {\n display: 'none'\n }\n },\n yAxis: {\n '& text': {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n '& path': {\n display: 'none'\n }\n },\n rtl: {\n '& g': {\n textAnchor: 'end'\n }\n },\n ltr: {},\n opacityChangeOnHover: {\n opacity: '0.1',\n cursor: 'default'\n },\n legendContainer: {\n marginTop: tokens.spacingVerticalS,\n marginLeft: tokens.spacingHorizontalXL\n },\n svgTooltip: {\n fill: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n fill: 'Canvas'\n }\n },\n annotationLayer: {\n pointerEvents: 'none'\n },\n tooltip: getTooltipStyle()\n});\n/**\n *\n * Apply styling to the Carousel slots based on the state\n */ export const useCartesianChartStyles = (props)=>{\n var _props_styles, _props_reflowProps, _props_styles1, _props_styles2, _props_styles3;\n const _useRtl = useRtl();\n const baseStyles = useStyles();\n return {\n root: mergeClasses(cartesianchartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chartWrapper: mergeClasses(cartesianchartClassNames.chartWrapper, baseStyles.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapperMinWidth : undefined, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),\n plotContainer: mergeClasses(cartesianchartClassNames.plotContainer, baseStyles.plotContainer /*props.styles?.plotContainer*/ ),\n axisTitle: mergeClasses(cartesianchartClassNames.axisTitle, baseStyles.axisTitle /*props.styles?.axisTitle*/ ),\n xAxis: mergeClasses(cartesianchartClassNames.xAxis, baseStyles.xAxis /*props.styles?.xAxis*/ ),\n yAxis: mergeClasses(cartesianchartClassNames.yAxis, baseStyles.yAxis, _useRtl ? baseStyles.rtl : baseStyles.ltr /*props.styles?.yAxis*/ ),\n opacityChangeOnHover: mergeClasses(cartesianchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n legendContainer: mergeClasses(cartesianchartClassNames.legendContainer, baseStyles.legendContainer /*props.styles?.legendContainer*/ ),\n svgTooltip: mergeClasses(cartesianchartClassNames.svgTooltip, baseStyles.svgTooltip, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.svgTooltip),\n annotationLayer: mergeClasses(cartesianchartClassNames.annotationLayer, baseStyles.annotationLayer /*props.styles?.annotationLayer*/ ),\n tooltip: mergeClasses(cartesianchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n axisAnnotation: mergeClasses(cartesianchartClassNames.axisAnnotation, baseStyles.axisAnnotation),\n chart: mergeClasses(cartesianchartClassNames.chart, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chart)\n };\n};\n"],"names":["__styles","mergeClasses","tokens","typographyStyles","CARTESIAN_XAXIS_CLASSNAME","HighContrastSelector","useRtl","getAxisTitleStyle","getTooltipStyle","cartesianchartClassNames","root","chartWrapper","plotContainer","axisTitle","xAxis","yAxis","opacityChangeOnHover","legendContainer","svgTooltip","shapeStyles","descriptionMessage","hover","tooltip","axisAnnotation","chartTitle","chart","annotationLayer","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","fsow6f","qhf8xq","chartWrapperMinWidth","B80ckks","sj55zd","Bkfmm31","Bxms50k","Bifops1","lr70ht","D01gh","vxuu72","lclgl4","zp1vxd","jxu3ei","B3i31d3","Bhcy8il","z3m6do","se2xxg","rtl","Bkw34lo","ltr","abs64n","Bceei9c","B6of3ja","Frg6f3","Bkecrkj","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","d","p","m","useCartesianChartStyles","props","_props_styles","_props_reflowProps","_props_styles1","_props_styles2","_props_styles3","_useRtl","baseStyles","styles","reflowProps","mode","undefined"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKS,wBAAwB;;;2BAwGD;eAAvBsE;;;uBA9GwB,gBAAgB;2BAEe,2BAA2B;AAIxF,iCAAiC;IACxCrE,IAAI,EAAE,gBAAgB;IACtBC,YAAY,EAAE,wBAAwB;IACtCC,aAAa,EAAE,yBAAyB;IACxCC,SAAS,EAAE,qBAAqB;IAChCC,KAAK,EAAEV,oCAAyB;IAChCW,KAAK,EAAE,iBAAiB;IACxBC,oBAAoB,EAAE,gCAAgC;IACtDC,eAAe,EAAE,2BAA2B;IAC5CC,UAAU,EAAE,qBAAqB;IACjCC,WAAW,EAAE,uBAAuB;IACpCC,kBAAkB,EAAE,8BAA8B;IAClDC,KAAK,EAAE,iBAAiB;IACxBC,OAAO,EAAE,mBAAmB;IAC5BC,cAAc,EAAE,0BAA0B;IAC1CC,UAAU,EAAE,sBAAsB;IAClCC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AwB,CAACa,OAAO,EAAEiE,UAAU,CAACjE,OAAO,CAAC,uBAAA,EAA0B,CAAC;QACtGC,cAAc,EAAEtB,uBAAY,EAACQ,wBAAwB,CAACc,cAAc,EAAEgE,UAAU,CAAChE,cAAc,CAAC;QAChGE,KAAK,MAAExB,mBAAY,EAACQ,wBAAwB,CAACgB,KAAK,EAAE,CAAC4D,cAAc,GAAGL,KAAK,CAACQ,MAAAA,AAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAC5D,KAAK;IAC7J,CAAC;AACL,CAAC"}
|
|
@@ -26,7 +26,7 @@ const cartesianchartClassNames = {
|
|
|
26
26
|
chartWrapper: 'fui-cart__chartWrapper',
|
|
27
27
|
plotContainer: 'fui-cart__plotContainer',
|
|
28
28
|
axisTitle: 'fui-cart__axisTitle',
|
|
29
|
-
xAxis:
|
|
29
|
+
xAxis: _utilities.CARTESIAN_XAXIS_CLASSNAME,
|
|
30
30
|
yAxis: 'fui-cart__yAxis',
|
|
31
31
|
opacityChangeOnHover: 'fui-cart__opacityChangeOnHover',
|
|
32
32
|
legendContainer: 'fui-cart__legendContainer',
|
|
@@ -50,7 +50,8 @@ const cartesianchartClassNames = {
|
|
|
50
50
|
height: '100%',
|
|
51
51
|
flexDirection: 'column',
|
|
52
52
|
overflow: 'hidden',
|
|
53
|
-
textAlign: 'left'
|
|
53
|
+
textAlign: 'left',
|
|
54
|
+
position: 'relative'
|
|
54
55
|
},
|
|
55
56
|
chartWrapper: {
|
|
56
57
|
position: 'relative'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/useCartesianChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { CartesianChartProps, CartesianChartStyles } from './CartesianChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector, useRtl } from '../../utilities/utilities';\nimport { getAxisTitleStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const cartesianchartClassNames: SlotClassNames<CartesianChartStyles> = {\n root: 'fui-cart__root',\n chartWrapper: 'fui-cart__chartWrapper',\n plotContainer: 'fui-cart__plotContainer',\n axisTitle: 'fui-cart__axisTitle',\n xAxis:
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/useCartesianChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { CartesianChartProps, CartesianChartStyles } from './CartesianChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { CARTESIAN_XAXIS_CLASSNAME, HighContrastSelector, useRtl } from '../../utilities/utilities';\nimport { getAxisTitleStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const cartesianchartClassNames: SlotClassNames<CartesianChartStyles> = {\n root: 'fui-cart__root',\n chartWrapper: 'fui-cart__chartWrapper',\n plotContainer: 'fui-cart__plotContainer',\n axisTitle: 'fui-cart__axisTitle',\n xAxis: CARTESIAN_XAXIS_CLASSNAME,\n yAxis: 'fui-cart__yAxis',\n opacityChangeOnHover: 'fui-cart__opacityChangeOnHover',\n legendContainer: 'fui-cart__legendContainer',\n svgTooltip: 'fui-cart_svgTooltip',\n shapeStyles: 'fui-cart__shapeStyles',\n descriptionMessage: 'fui-cart__descriptionMessage',\n hover: 'fui-cart__hover',\n tooltip: 'fui-cart__tooltip',\n axisAnnotation: 'fui-cart__axisAnnotation',\n chartTitle: 'fui-cart__chartTitle',\n chart: 'fui-cart__chart',\n annotationLayer: 'fui-cart__annotationLayer',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n textAlign: 'left',\n position: 'relative',\n },\n chartWrapper: {\n position: 'relative',\n },\n chartWrapperMinWidth: {\n overflow: 'auto',\n },\n plotContainer: {\n position: 'relative',\n width: '100%',\n height: '100%',\n },\n axisTitle: getAxisTitleStyle() as GriffelStyle,\n axisAnnotation: getAxisTitleStyle() as GriffelStyle,\n xAxis: {\n '& text': {\n fill: tokens.colorNeutralForeground1,\n ...typographyStyles.caption2Strong,\n forcedColorAdjust: 'auto',\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n width: '1px',\n forcedColorAdjust: 'auto',\n },\n '& path': {\n display: 'none',\n },\n },\n yAxis: {\n '& text': {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n '& path': {\n display: 'none',\n },\n },\n rtl: {\n '& g': {\n textAnchor: 'end',\n },\n },\n ltr: {},\n opacityChangeOnHover: {\n opacity: '0.1', //supports custom opacity ??\n cursor: 'default', //supports custom cursor ??\n },\n legendContainer: {\n marginTop: tokens.spacingVerticalS,\n marginLeft: tokens.spacingHorizontalXL,\n },\n svgTooltip: {\n fill: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n annotationLayer: {\n pointerEvents: 'none',\n },\n tooltip: getTooltipStyle() as GriffelStyle,\n});\n/**\n *\n * Apply styling to the Carousel slots based on the state\n */\nexport const useCartesianChartStyles = (props: CartesianChartProps): CartesianChartStyles => {\n const _useRtl = useRtl();\n const baseStyles = useStyles();\n return {\n root: mergeClasses(cartesianchartClassNames.root, baseStyles.root, props.styles?.root),\n chartWrapper: mergeClasses(\n cartesianchartClassNames.chartWrapper,\n baseStyles.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapperMinWidth : undefined,\n props.styles?.chartWrapper,\n ),\n plotContainer: mergeClasses(\n cartesianchartClassNames.plotContainer,\n baseStyles.plotContainer /*props.styles?.plotContainer*/,\n ),\n axisTitle: mergeClasses(cartesianchartClassNames.axisTitle, baseStyles.axisTitle /*props.styles?.axisTitle*/),\n xAxis: mergeClasses(cartesianchartClassNames.xAxis, baseStyles.xAxis /*props.styles?.xAxis*/),\n yAxis: mergeClasses(\n cartesianchartClassNames.yAxis,\n baseStyles.yAxis,\n _useRtl ? baseStyles.rtl : baseStyles.ltr /*props.styles?.yAxis*/,\n ),\n opacityChangeOnHover: mergeClasses(\n cartesianchartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n legendContainer: mergeClasses(\n cartesianchartClassNames.legendContainer,\n baseStyles.legendContainer /*props.styles?.legendContainer*/,\n ),\n svgTooltip: mergeClasses(cartesianchartClassNames.svgTooltip, baseStyles.svgTooltip, props.styles?.svgTooltip),\n annotationLayer: mergeClasses(\n cartesianchartClassNames.annotationLayer,\n baseStyles.annotationLayer /*props.styles?.annotationLayer*/,\n ),\n tooltip: mergeClasses(cartesianchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n axisAnnotation: mergeClasses(\n cartesianchartClassNames.axisAnnotation,\n baseStyles.axisAnnotation,\n /*props.styles?.axisAnnotation,*/\n ),\n chart: mergeClasses(cartesianchartClassNames.chart, props.styles?.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","CARTESIAN_XAXIS_CLASSNAME","HighContrastSelector","useRtl","getAxisTitleStyle","getTooltipStyle","cartesianchartClassNames","root","chartWrapper","plotContainer","axisTitle","xAxis","yAxis","opacityChangeOnHover","legendContainer","svgTooltip","shapeStyles","descriptionMessage","hover","tooltip","axisAnnotation","chartTitle","chart","annotationLayer","useStyles","body1","display","width","height","flexDirection","overflow","textAlign","position","chartWrapperMinWidth","fill","colorNeutralForeground1","caption2Strong","forcedColorAdjust","opacity","stroke","rtl","textAnchor","ltr","cursor","marginTop","spacingVerticalS","marginLeft","spacingHorizontalXL","colorNeutralBackground1","pointerEvents","useCartesianChartStyles","props","_useRtl","baseStyles","styles","reflowProps","mode","undefined"],"mappings":"AAAA;;;;;;;;;;;;IAYaS,wBAAAA;;;IA2GA4C,uBAAAA;;;;uBArH0C,iBAAiB;4BAG/B,wBAAwB;2BACO,4BAA4B;uBACjD,wBAAwB;AAKpE,iCAAuE;IAC5E3C,MAAM;IACNC,cAAc;IACdC,eAAe;IACfC,WAAW;IACXC,OAAOV,oCAAAA;IACPW,OAAO;IACPC,sBAAsB;IACtBC,iBAAiB;IACjBC,YAAY;IACZC,aAAa;IACbC,oBAAoB;IACpBC,OAAO;IACPC,SAAS;IACTC,gBAAgB;IAChBC,YAAY;IACZC,OAAO;IACPC,iBAAiB;AACnB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAY3B,qBAAAA,EAAW;IAC3BU,MAAM;QACJ,GAAGP,4BAAAA,CAAiByB,KAAK;QACzBC,SAAS;QACTC,OAAO;QACPC,QAAQ;QACRC,eAAe;QACfC,UAAU;QACVC,WAAW;QACXC,UAAU;IACZ;IACAxB,cAAc;QACZwB,UAAU;IACZ;IACAC,sBAAsB;QACpBH,UAAU;IACZ;IACArB,eAAe;QACbuB,UAAU;QACVL,OAAO;QACPC,QAAQ;IACV;IACAlB,eAAWN,wBAAAA;IACXgB,gBAAgBhB,4BAAAA;IAChBO,OAAO;QACL,UAAU;YACRuB,MAAMnC,kBAAAA,CAAOoC,uBAAuB;YACpC,GAAGnC,4BAAAA,CAAiBoC,cAAc;YAClCC,mBAAmB;QACrB;QACA,UAAU;YACRC,SAAS;YACTC,QAAQxC,kBAAAA,CAAOoC,uBAAuB;YACtCR,OAAO;YACPU,mBAAmB;QACrB;QACA,UAAU;YACRX,SAAS;QACX;IACF;IACAd,OAAO;QACL,UAAU;YACR,GAAGZ,4BAAAA,CAAiBoC,cAAc;YAClCF,MAAMnC,kBAAAA,CAAOoC,uBAAuB;YACpCE,mBAA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
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Formats text values according to the texttemplate specification
|
|
318
|
+
* Supports D3 format specifiers within %{text:format} patterns
|
|
319
|
+
* @param textValue The raw text value to format
|
|
320
|
+
* @param textTemplate The template string (e.g., "%{text:.1f}%", "%{text:.2%}", "%{text:,.0f}")
|
|
321
|
+
* @param index Optional index for array-based templates
|
|
322
|
+
* @returns Formatted text string
|
|
323
|
+
*
|
|
324
|
+
* Examples:
|
|
325
|
+
* - "%{text:.1f}%" → Formats number with 1 decimal place and adds % suffix
|
|
326
|
+
* - "%{text:.2%}" → Formats as percentage with 2 decimal places
|
|
327
|
+
* - "%{text:,.0f}" → Formats with thousands separator and no decimals
|
|
328
|
+
* - "%{text:$,.2f}" → Formats as currency with thousands separator and 2 decimals
|
|
329
|
+
*/ const formatTextWithTemplate = (textValue, textTemplate, index)=>{
|
|
330
|
+
if (!textTemplate) {
|
|
331
|
+
return String(textValue);
|
|
332
|
+
}
|
|
333
|
+
const numVal = typeof textValue === 'number' ? textValue : parseFloat(String(textValue));
|
|
334
|
+
if (isNaN(numVal)) {
|
|
335
|
+
return String(textValue);
|
|
336
|
+
}
|
|
337
|
+
const template = typeof textTemplate === 'string' ? textTemplate : textTemplate[index || 0] || '';
|
|
338
|
+
// Match Plotly's texttemplate pattern: %{text:format} or %{text}
|
|
339
|
+
// Can be followed by any literal text like %, $, etc.
|
|
340
|
+
const plotlyPattern = /%\{text(?::([^}]+))?\}(.*)$/;
|
|
341
|
+
const match = template.match(plotlyPattern);
|
|
342
|
+
if (match) {
|
|
343
|
+
const formatSpec = match[1]; // The format specifier (e.g., ".1f", ".2%", ",.0f") or undefined
|
|
344
|
+
const suffix = match[2]; // Any text after the closing brace (e.g., "%", " units")
|
|
345
|
+
// If no format specifier is provided (e.g., %{text}%), try to infer from suffix
|
|
346
|
+
if (!formatSpec) {
|
|
347
|
+
// Check if suffix starts with % - assume simple percentage with 1 decimal
|
|
348
|
+
if (suffix.startsWith('%')) {
|
|
349
|
+
return `${numVal.toFixed(1)}${suffix}`;
|
|
350
|
+
}
|
|
351
|
+
// No format specifier, just return the number with the suffix
|
|
352
|
+
return `${numVal}${suffix}`;
|
|
353
|
+
}
|
|
354
|
+
try {
|
|
355
|
+
// Use D3 format function to apply the format specifier
|
|
356
|
+
const formatter = (0, _d3format.format)(formatSpec);
|
|
357
|
+
const formattedValue = formatter(numVal);
|
|
358
|
+
return `${formattedValue}${suffix}`;
|
|
359
|
+
} catch (error) {
|
|
360
|
+
// Try to extract precision for basic fallback
|
|
361
|
+
const precisionMatch = formatSpec.match(/\.(\d+)[f%]/);
|
|
362
|
+
const precision = precisionMatch ? parseInt(precisionMatch[1], 10) : 2;
|
|
363
|
+
// Check if it's a percentage format
|
|
364
|
+
if (formatSpec.includes('%')) {
|
|
365
|
+
return `${(numVal * 100).toFixed(precision)}%${suffix}`;
|
|
366
|
+
}
|
|
367
|
+
return `${numVal.toFixed(precision)}${suffix}`;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return String(textValue);
|
|
371
|
+
};
|
|
316
372
|
/**
|
|
317
373
|
* Extracts unique X-axis categories from Plotly data traces
|
|
318
374
|
* @param data Array of Plotly data traces
|
|
@@ -964,7 +1020,8 @@ const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, colorwayT
|
|
|
964
1020
|
const hideLabels = firstData.textinfo ? ![
|
|
965
1021
|
'value',
|
|
966
1022
|
'percent',
|
|
967
|
-
'label+percent'
|
|
1023
|
+
'label+percent',
|
|
1024
|
+
'percent+label'
|
|
968
1025
|
].includes(firstData.textinfo) : false;
|
|
969
1026
|
const donutMarginHorizontal = hideLabels ? 0 : 80;
|
|
970
1027
|
const donutMarginVertical = 40 + (hideLabels ? 0 : 40);
|
|
@@ -997,14 +1054,15 @@ const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, colorwayT
|
|
|
997
1054
|
hideLabels,
|
|
998
1055
|
showLabelsInPercent: firstData.textinfo ? [
|
|
999
1056
|
'percent',
|
|
1000
|
-
'label+percent'
|
|
1057
|
+
'label+percent',
|
|
1058
|
+
'percent+label'
|
|
1001
1059
|
].includes(firstData.textinfo) : true,
|
|
1002
1060
|
roundCorners: true,
|
|
1003
1061
|
order: 'sorted'
|
|
1004
1062
|
};
|
|
1005
1063
|
};
|
|
1006
1064
|
const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
|
|
1007
|
-
var _input_layout, _input_layout1, _input_layout2
|
|
1065
|
+
var _input_layout, _input_layout1, _input_layout2;
|
|
1008
1066
|
const mapXToDataPoints = {};
|
|
1009
1067
|
let yMaxValue = 0;
|
|
1010
1068
|
let yMinValue = 0;
|
|
@@ -1024,6 +1082,7 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1024
1082
|
validXYRanges.forEach(([rangeStart, rangeEnd], rangeIdx)=>{
|
|
1025
1083
|
const rangeXValues = series.x.slice(rangeStart, rangeEnd);
|
|
1026
1084
|
const rangeYValues = series.y.slice(rangeStart, rangeEnd);
|
|
1085
|
+
const textValues = Array.isArray(series.text) ? series.text.slice(rangeStart, rangeEnd) : typeof series.text === 'string' ? series.text : undefined;
|
|
1027
1086
|
rangeXValues.forEach((x, index2)=>{
|
|
1028
1087
|
var _series_marker, _series_marker1, _series_marker_color, _series_marker2, _input_layout_template_layout, _input_layout_template, _input_layout;
|
|
1029
1088
|
if (!mapXToDataPoints[x]) {
|
|
@@ -1039,6 +1098,11 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1039
1098
|
const opacity = (0, _PlotlyColorAdapter.getOpacity)(series, index2);
|
|
1040
1099
|
const yVal = rangeYValues[index2];
|
|
1041
1100
|
const yAxisCalloutData = getFormattedCalloutYData(yVal, yAxisTickFormat);
|
|
1101
|
+
let barLabel = Array.isArray(textValues) ? textValues[index2] : textValues;
|
|
1102
|
+
// Apply texttemplate formatting if specified
|
|
1103
|
+
if (barLabel && series.texttemplate) {
|
|
1104
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, index2);
|
|
1105
|
+
}
|
|
1042
1106
|
if (series.type === 'bar') {
|
|
1043
1107
|
var _rgb_copy_formatHex8;
|
|
1044
1108
|
mapXToDataPoints[x].chartData.push({
|
|
@@ -1047,7 +1111,10 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1047
1111
|
color: (_rgb_copy_formatHex8 = (0, _d3color.rgb)(color).copy({
|
|
1048
1112
|
opacity
|
|
1049
1113
|
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color,
|
|
1050
|
-
yAxisCalloutData
|
|
1114
|
+
yAxisCalloutData,
|
|
1115
|
+
...barLabel ? {
|
|
1116
|
+
barLabel: String(barLabel)
|
|
1117
|
+
} : {}
|
|
1051
1118
|
});
|
|
1052
1119
|
if (typeof yVal === 'number') {
|
|
1053
1120
|
yMaxValue = Math.max(yMaxValue, yVal);
|
|
@@ -1156,7 +1223,6 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1156
1223
|
yMinValue,
|
|
1157
1224
|
mode: 'plotly',
|
|
1158
1225
|
...secondaryYAxisValues,
|
|
1159
|
-
wrapXAxisLables: typeof ((_vsbcData_ = vsbcData[0]) === null || _vsbcData_ === void 0 ? void 0 : _vsbcData_.xAxisPoint) === 'string',
|
|
1160
1226
|
hideTickOverlap: true,
|
|
1161
1227
|
barGapMax: 2,
|
|
1162
1228
|
hideLegend,
|
|
@@ -1234,6 +1300,12 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1234
1300
|
const color = colorScale ? colorScale((0, _chartutilities.isArrayOrTypedArray)((_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color) ? (_series_marker2 = series.marker) === null || _series_marker2 === void 0 ? void 0 : (_series_marker_color = _series_marker2.color) === null || _series_marker_color === void 0 ? void 0 : _series_marker_color[xIndex % ((_series_marker1 = series.marker) === null || _series_marker1 === void 0 ? void 0 : _series_marker1.color).length] : 0) : (0, _PlotlyColorAdapter.resolveColor)(extractedBarColors, xIndex, legend, colorMap, (_processedInput_layout = processedInput.layout) === null || _processedInput_layout === void 0 ? void 0 : (_processedInput_layout_template = _processedInput_layout.template) === null || _processedInput_layout_template === void 0 ? void 0 : (_processedInput_layout_template_layout = _processedInput_layout_template.layout) === null || _processedInput_layout_template_layout === void 0 ? void 0 : _processedInput_layout_template_layout.colorway, isDarkTheme);
|
|
1235
1301
|
const opacity = (0, _PlotlyColorAdapter.getOpacity)(series, xIndex);
|
|
1236
1302
|
const yVal = series.y[xIndex];
|
|
1303
|
+
// Extract text value for barLabel
|
|
1304
|
+
let barLabel = Array.isArray(series.text) ? series.text[xIndex] : series.text;
|
|
1305
|
+
// Apply texttemplate formatting if specified
|
|
1306
|
+
if (barLabel && series.texttemplate) {
|
|
1307
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, xIndex);
|
|
1308
|
+
}
|
|
1237
1309
|
var _rgb_copy_formatHex8;
|
|
1238
1310
|
return {
|
|
1239
1311
|
x: x.toString(),
|
|
@@ -1241,7 +1313,10 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1241
1313
|
yAxisCalloutData: getFormattedCalloutYData(yVal, yAxisTickFormat),
|
|
1242
1314
|
color: (_rgb_copy_formatHex8 = (0, _d3color.rgb)(color).copy({
|
|
1243
1315
|
opacity
|
|
1244
|
-
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color
|
|
1316
|
+
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color,
|
|
1317
|
+
...barLabel ? {
|
|
1318
|
+
barLabel: String(barLabel)
|
|
1319
|
+
} : {}
|
|
1245
1320
|
};
|
|
1246
1321
|
}).filter((item)=>typeof item !== 'undefined'),
|
|
1247
1322
|
useSecondaryYScale: usesSecondaryYScale(series, processedInput.layout)
|
|
@@ -1292,7 +1367,6 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1292
1367
|
mode: 'plotly',
|
|
1293
1368
|
...secondaryYAxisValues,
|
|
1294
1369
|
hideTickOverlap: true,
|
|
1295
|
-
wrapXAxisLables: true,
|
|
1296
1370
|
hideLegend,
|
|
1297
1371
|
roundCorners: true,
|
|
1298
1372
|
showYAxisLables: true,
|
|
@@ -1311,7 +1385,7 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
1311
1385
|
};
|
|
1312
1386
|
};
|
|
1313
1387
|
const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
1314
|
-
var _input_layout, _input_layout1
|
|
1388
|
+
var _input_layout, _input_layout1;
|
|
1315
1389
|
const vbcData = [];
|
|
1316
1390
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
1317
1391
|
let colorScale = undefined;
|
|
@@ -1358,6 +1432,11 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
|
|
|
1358
1432
|
const color = colorScale ? colorScale((0, _chartutilities.isArrayOrTypedArray)((_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color) ? (_series_marker2 = series.marker) === null || _series_marker2 === void 0 ? void 0 : (_series_marker_color = _series_marker2.color) === null || _series_marker_color === void 0 ? void 0 : _series_marker_color[index % ((_series_marker1 = series.marker) === null || _series_marker1 === void 0 ? void 0 : _series_marker1.color).length] : 0) : (0, _PlotlyColorAdapter.resolveColor)(extractedColors, index, legend, colorMap, (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_layout = _input_layout_template.layout) === null || _input_layout_template_layout === void 0 ? void 0 : _input_layout_template_layout.colorway, isDarkTheme);
|
|
1359
1433
|
const opacity = (0, _PlotlyColorAdapter.getOpacity)(series, index);
|
|
1360
1434
|
const yVal = calculateHistNorm(series.histnorm, y[index], total, isXString ? bin.length : getBinSize(bin));
|
|
1435
|
+
// Handle text values and texttemplate formatting for histogram bins
|
|
1436
|
+
let barLabel = Array.isArray(series.text) ? series.text[index] : series.text;
|
|
1437
|
+
if (barLabel && series.texttemplate) {
|
|
1438
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, index);
|
|
1439
|
+
}
|
|
1361
1440
|
var _rgb_copy_formatHex8;
|
|
1362
1441
|
vbcData.push({
|
|
1363
1442
|
x: isXString ? bin.join(', ') : getBinCenter(bin),
|
|
@@ -1368,7 +1447,10 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
|
|
|
1368
1447
|
}).formatHex8()) !== null && _rgb_copy_formatHex8 !== void 0 ? _rgb_copy_formatHex8 : color,
|
|
1369
1448
|
...isXString ? {} : {
|
|
1370
1449
|
xAxisCalloutData: `[${bin.x0} - ${bin.x1})`
|
|
1371
|
-
}
|
|
1450
|
+
},
|
|
1451
|
+
...barLabel ? {
|
|
1452
|
+
barLabel: String(barLabel)
|
|
1453
|
+
} : {}
|
|
1372
1454
|
});
|
|
1373
1455
|
});
|
|
1374
1456
|
});
|
|
@@ -1380,7 +1462,6 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
|
|
|
1380
1462
|
height: (_input_layout_height = (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 350,
|
|
1381
1463
|
mode: 'histogram',
|
|
1382
1464
|
hideTickOverlap: true,
|
|
1383
|
-
wrapXAxisLables: typeof ((_vbcData_ = vbcData[0]) === null || _vbcData_ === void 0 ? void 0 : _vbcData_.x) === 'string',
|
|
1384
1465
|
maxBarWidth: 50,
|
|
1385
1466
|
hideLegend,
|
|
1386
1467
|
roundCorners: true,
|
|
@@ -1443,9 +1524,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1443
1524
|
let mode = 'tonexty';
|
|
1444
1525
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
1445
1526
|
const yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
|
|
1446
|
-
const
|
|
1447
|
-
const resolveXValue = getAxisValueResolver(xAxisType);
|
|
1448
|
-
const shouldWrapLabels = xAxisType === 'category';
|
|
1527
|
+
const resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
|
|
1449
1528
|
const chartData = input.data.map((series, index)=>{
|
|
1450
1529
|
var _series_mode, _series_line, _series_marker, _series_line1, _input_layout_template_layout, _input_layout_template, _input_layout, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _series_mode1;
|
|
1451
1530
|
const colors = isScatterMarkers ? (series === null || series === void 0 ? void 0 : (_series_mode = series.mode) === null || _series_mode === void 0 ? void 0 : _series_mode.includes('line')) ? (_series_line = series.line) === null || _series_line === void 0 ? void 0 : _series_line.color : (_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color : (_series_line1 = series.line) === null || _series_line1 === void 0 ? void 0 : _series_line1.color;
|
|
@@ -1604,7 +1683,6 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1604
1683
|
hideTickOverlap: true,
|
|
1605
1684
|
hideLegend,
|
|
1606
1685
|
useUTC: false,
|
|
1607
|
-
wrapXAxisLabels: shouldWrapLabels,
|
|
1608
1686
|
optimizeLargeData: numDataPoints > 1000,
|
|
1609
1687
|
showYAxisLables: true,
|
|
1610
1688
|
roundedTicks: true,
|
|
@@ -1785,11 +1863,53 @@ const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot, colorMap, colo
|
|
|
1785
1863
|
};
|
|
1786
1864
|
};
|
|
1787
1865
|
const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
1788
|
-
var _input_layout, _input_layout_coloraxis,
|
|
1866
|
+
var _input_layout, _input_layout1, _input_layout_coloraxis, _input_layout2, _input_layout_template_layout, _input_layout_template, _input_layout3, _input_layout_template_data_histogram2d_, _input_layout_template_data_histogram2d, _input_layout_template_data, _input_layout_template1, _input_layout4, _input_layout_template_data_heatmap_, _input_layout_template_data_heatmap, _input_layout_template_data1, _input_layout_template2, _input_layout5, _input_layout6, _input_layout7;
|
|
1789
1867
|
const firstData = input.data[0];
|
|
1790
1868
|
const heatmapDataPoints = [];
|
|
1791
1869
|
let zMin = Number.POSITIVE_INFINITY;
|
|
1792
1870
|
let zMax = Number.NEGATIVE_INFINITY;
|
|
1871
|
+
// Build a 2D array of annotations based on their grid position
|
|
1872
|
+
const annotationGrid = [];
|
|
1873
|
+
const rawAnnotations = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.annotations;
|
|
1874
|
+
if (rawAnnotations) {
|
|
1875
|
+
const annotationsArray = Array.isArray(rawAnnotations) ? rawAnnotations : [
|
|
1876
|
+
rawAnnotations
|
|
1877
|
+
];
|
|
1878
|
+
// Collect all unique x and y values from valid annotations
|
|
1879
|
+
const xSet = new Set();
|
|
1880
|
+
const ySet = new Set();
|
|
1881
|
+
const validAnnotations = [];
|
|
1882
|
+
annotationsArray.forEach((a)=>{
|
|
1883
|
+
if (a && typeof a.x === 'number' && typeof a.y === 'number' && typeof a.text === 'string' && (a.xref === 'x' || a.xref === undefined) && (a.yref === 'y' || a.yref === undefined)) {
|
|
1884
|
+
xSet.add(a.x);
|
|
1885
|
+
ySet.add(a.y);
|
|
1886
|
+
validAnnotations.push({
|
|
1887
|
+
x: a.x,
|
|
1888
|
+
y: a.y,
|
|
1889
|
+
text: cleanText(a.text)
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
if (validAnnotations.length > 0) {
|
|
1894
|
+
// Get sorted unique x and y values
|
|
1895
|
+
const xValues = Array.from(xSet).sort((a, b)=>a - b);
|
|
1896
|
+
const yValues = Array.from(ySet).sort((a, b)=>a - b);
|
|
1897
|
+
// Initialize 2D grid and populate
|
|
1898
|
+
validAnnotations.forEach((annotation)=>{
|
|
1899
|
+
const xIdx = xValues.indexOf(annotation.x);
|
|
1900
|
+
const yIdx = yValues.indexOf(annotation.y);
|
|
1901
|
+
if (!annotationGrid[yIdx]) {
|
|
1902
|
+
annotationGrid[yIdx] = [];
|
|
1903
|
+
}
|
|
1904
|
+
annotationGrid[yIdx][xIdx] = annotation.text;
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
// Helper function to get annotation from 2D grid by index
|
|
1909
|
+
const getAnnotationByIndex = (xIdx, yIdx)=>{
|
|
1910
|
+
var _annotationGrid_yIdx;
|
|
1911
|
+
return (_annotationGrid_yIdx = annotationGrid[yIdx]) === null || _annotationGrid_yIdx === void 0 ? void 0 : _annotationGrid_yIdx[xIdx];
|
|
1912
|
+
};
|
|
1793
1913
|
if (firstData.type === 'histogram2d') {
|
|
1794
1914
|
var _firstData_x, _firstData_xbins, _firstData_xbins1, _firstData_xbins2, _firstData_ybins, _firstData_ybins1, _firstData_ybins2;
|
|
1795
1915
|
const xValues = [];
|
|
@@ -1829,11 +1949,12 @@ const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwa
|
|
|
1829
1949
|
xBins.forEach((xBin, xIdx)=>{
|
|
1830
1950
|
yBins.forEach((yBin, yIdx)=>{
|
|
1831
1951
|
const zVal = calculateHistNorm(firstData.histnorm, z[yIdx][xIdx], total, isXString ? xBin.length : getBinSize(xBin), isYString ? yBin.length : getBinSize(yBin));
|
|
1952
|
+
const annotationText = getAnnotationByIndex(xIdx, yIdx);
|
|
1832
1953
|
heatmapDataPoints.push({
|
|
1833
1954
|
x: isXString ? xBin.join(', ') : getBinCenter(xBin),
|
|
1834
1955
|
y: isYString ? yBin.join(', ') : getBinCenter(yBin),
|
|
1835
1956
|
value: zVal,
|
|
1836
|
-
rectText: zVal
|
|
1957
|
+
rectText: annotationText || zVal
|
|
1837
1958
|
});
|
|
1838
1959
|
if (typeof zVal === 'number') {
|
|
1839
1960
|
zMin = Math.min(zMin, zVal);
|
|
@@ -1842,17 +1963,34 @@ const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwa
|
|
|
1842
1963
|
});
|
|
1843
1964
|
});
|
|
1844
1965
|
} else {
|
|
1845
|
-
var
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1966
|
+
var _zArray_;
|
|
1967
|
+
// If x and y are not provided, generate indices based on z dimensions
|
|
1968
|
+
const zArray = firstData.z;
|
|
1969
|
+
const xValues = firstData.x;
|
|
1970
|
+
const yValues = firstData.y;
|
|
1971
|
+
var _zArray_length;
|
|
1972
|
+
// Determine the dimensions from z array
|
|
1973
|
+
const yLength = (_zArray_length = zArray === null || zArray === void 0 ? void 0 : zArray.length) !== null && _zArray_length !== void 0 ? _zArray_length : 0;
|
|
1974
|
+
var _zArray__length;
|
|
1975
|
+
const xLength = (_zArray__length = zArray === null || zArray === void 0 ? void 0 : (_zArray_ = zArray[0]) === null || _zArray_ === void 0 ? void 0 : _zArray_.length) !== null && _zArray__length !== void 0 ? _zArray__length : 0;
|
|
1976
|
+
// Use provided x/y values or generate indices
|
|
1977
|
+
const xData = xValues !== null && xValues !== void 0 ? xValues : Array.from({
|
|
1978
|
+
length: xLength
|
|
1979
|
+
}, (_, i)=>i);
|
|
1980
|
+
const yData = yValues !== null && yValues !== void 0 ? yValues : Array.from({
|
|
1981
|
+
length: yLength
|
|
1982
|
+
}, (_, i)=>yLength - 1 - i);
|
|
1983
|
+
xData.forEach((xVal, xIdx)=>{
|
|
1984
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1985
|
+
yData.forEach((yVal, yIdx)=>{
|
|
1986
|
+
var _zArray_yIdx, _input_layout_xaxis, _input_layout, _input_layout_yaxis, _input_layout1;
|
|
1987
|
+
const zVal = zArray === null || zArray === void 0 ? void 0 : (_zArray_yIdx = zArray[yIdx]) === null || _zArray_yIdx === void 0 ? void 0 : _zArray_yIdx[xIdx];
|
|
1988
|
+
const annotationText = getAnnotationByIndex(xIdx, yIdx);
|
|
1851
1989
|
heatmapDataPoints.push({
|
|
1852
1990
|
x: ((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_xaxis = _input_layout.xaxis) === null || _input_layout_xaxis === void 0 ? void 0 : _input_layout_xaxis.type) === 'date' ? xVal : xVal !== null && xVal !== void 0 ? xVal : 0,
|
|
1853
1991
|
y: ((_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : (_input_layout_yaxis = _input_layout1.yaxis) === null || _input_layout_yaxis === void 0 ? void 0 : _input_layout_yaxis.type) === 'date' ? yVal : yVal,
|
|
1854
1992
|
value: zVal,
|
|
1855
|
-
rectText: zVal
|
|
1993
|
+
rectText: annotationText || zVal
|
|
1856
1994
|
});
|
|
1857
1995
|
if (typeof zVal === 'number') {
|
|
1858
1996
|
zMin = Math.min(zMin, zVal);
|
|
@@ -1879,7 +2017,7 @@ const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwa
|
|
|
1879
2017
|
(0, _colors.getColorFromToken)(_colors.DataVizPalette.color3)
|
|
1880
2018
|
];
|
|
1881
2019
|
var _firstData_colorscale, _ref, _ref1, _ref2, _ref3;
|
|
1882
|
-
let colorscale = (_ref3 = (_ref2 = (_ref1 = (_ref = (_firstData_colorscale = firstData === null || firstData === void 0 ? void 0 : firstData.colorscale) !== null && _firstData_colorscale !== void 0 ? _firstData_colorscale : (
|
|
2020
|
+
let colorscale = (_ref3 = (_ref2 = (_ref1 = (_ref = (_firstData_colorscale = firstData === null || firstData === void 0 ? void 0 : firstData.colorscale) !== null && _firstData_colorscale !== void 0 ? _firstData_colorscale : (_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.colorscale) !== null && _ref !== void 0 ? _ref : (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : (_input_layout_coloraxis = _input_layout2.coloraxis) === null || _input_layout_coloraxis === void 0 ? void 0 : _input_layout_coloraxis.colorscale) !== null && _ref1 !== void 0 ? _ref1 : (_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : (_input_layout_template = _input_layout3.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_layout = _input_layout_template.layout) === null || _input_layout_template_layout === void 0 ? void 0 : _input_layout_template_layout.colorscale) !== null && _ref2 !== void 0 ? _ref2 : firstData.type === 'histogram2d' && ((_input_layout4 = input.layout) === null || _input_layout4 === void 0 ? void 0 : (_input_layout_template1 = _input_layout4.template) === null || _input_layout_template1 === void 0 ? void 0 : (_input_layout_template_data = _input_layout_template1.data) === null || _input_layout_template_data === void 0 ? void 0 : (_input_layout_template_data_histogram2d = _input_layout_template_data.histogram2d) === null || _input_layout_template_data_histogram2d === void 0 ? void 0 : (_input_layout_template_data_histogram2d_ = _input_layout_template_data_histogram2d[0]) === null || _input_layout_template_data_histogram2d_ === void 0 ? void 0 : _input_layout_template_data_histogram2d_.colorscale)) !== null && _ref3 !== void 0 ? _ref3 : (_input_layout5 = input.layout) === null || _input_layout5 === void 0 ? void 0 : (_input_layout_template2 = _input_layout5.template) === null || _input_layout_template2 === void 0 ? void 0 : (_input_layout_template_data1 = _input_layout_template2.data) === null || _input_layout_template_data1 === void 0 ? void 0 : (_input_layout_template_data_heatmap = _input_layout_template_data1.heatmap) === null || _input_layout_template_data_heatmap === void 0 ? void 0 : (_input_layout_template_data_heatmap_ = _input_layout_template_data_heatmap[0]) === null || _input_layout_template_data_heatmap_ === void 0 ? void 0 : _input_layout_template_data_heatmap_.colorscale;
|
|
1883
2021
|
// determine if the types diverging, sequential or sequentialminus are present in colorscale
|
|
1884
2022
|
if (colorscale && typeof colorscale === 'object' && ('diverging' in colorscale || 'sequential' in colorscale || 'sequentialminus' in colorscale)) {
|
|
1885
2023
|
const isDivergent = zMin < 0 && zMax > 0; // Data spans both positive and negative values
|
|
@@ -1905,12 +2043,11 @@ const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwa
|
|
|
1905
2043
|
hideLegend: true,
|
|
1906
2044
|
showYAxisLables: true,
|
|
1907
2045
|
sortOrder: 'none',
|
|
1908
|
-
width: (
|
|
1909
|
-
height: (_input_layout_height = (
|
|
2046
|
+
width: (_input_layout6 = input.layout) === null || _input_layout6 === void 0 ? void 0 : _input_layout6.width,
|
|
2047
|
+
height: (_input_layout_height = (_input_layout7 = input.layout) === null || _input_layout7 === void 0 ? void 0 : _input_layout7.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 350,
|
|
1910
2048
|
hideTickOverlap: true,
|
|
1911
2049
|
noOfCharsToTruncate: 20,
|
|
1912
2050
|
showYAxisLablesTooltip: true,
|
|
1913
|
-
wrapXAxisLables: true,
|
|
1914
2051
|
...getTitles(input.layout),
|
|
1915
2052
|
...getAxisCategoryOrderProps([
|
|
1916
2053
|
firstData
|
|
@@ -2755,7 +2892,10 @@ const isNonPlotType = (chartType)=>{
|
|
|
2755
2892
|
'donut',
|
|
2756
2893
|
'sankey',
|
|
2757
2894
|
'pie',
|
|
2758
|
-
'annotation'
|
|
2895
|
+
'annotation',
|
|
2896
|
+
'table',
|
|
2897
|
+
'gauge',
|
|
2898
|
+
'funnel'
|
|
2759
2899
|
].includes(chartType);
|
|
2760
2900
|
};
|
|
2761
2901
|
const getGridProperties = (schema, isMultiPlot, validTracesInfo)=>{
|
|
@@ -3018,16 +3158,23 @@ const getAxisScaleTypeProps = (data, layout)=>{
|
|
|
3018
3158
|
return;
|
|
3019
3159
|
}
|
|
3020
3160
|
const axType = getAxisType(data, ax);
|
|
3161
|
+
if (axId === 'x' && axType === 'category') {
|
|
3162
|
+
props.xAxis = {
|
|
3163
|
+
tickLayout: 'auto'
|
|
3164
|
+
};
|
|
3165
|
+
}
|
|
3021
3166
|
if ((!ax.tickmode || ax.tickmode === 'array') && (0, _chartutilities.isArrayOrTypedArray)(ax.tickvals)) {
|
|
3022
3167
|
const tickValues = axType === 'date' ? ax.tickvals.map((v)=>new Date(v)) : ax.tickvals;
|
|
3023
3168
|
if (axId === 'x') {
|
|
3024
3169
|
props.tickValues = tickValues;
|
|
3025
3170
|
props.xAxis = {
|
|
3171
|
+
...props.xAxis,
|
|
3026
3172
|
tickText: ax.ticktext
|
|
3027
3173
|
};
|
|
3028
3174
|
} else if (axId === 'y') {
|
|
3029
3175
|
props.yAxisTickValues = tickValues;
|
|
3030
3176
|
props.yAxis = {
|
|
3177
|
+
...props.yAxis,
|
|
3031
3178
|
tickText: ax.ticktext
|
|
3032
3179
|
};
|
|
3033
3180
|
}
|
|
@@ -3038,11 +3185,13 @@ const getAxisScaleTypeProps = (data, layout)=>{
|
|
|
3038
3185
|
const tick0 = plotlyTick0(ax.tick0, axType, dtick);
|
|
3039
3186
|
if (axId === 'x') {
|
|
3040
3187
|
props.xAxis = {
|
|
3188
|
+
...props.xAxis,
|
|
3041
3189
|
tickStep: dtick,
|
|
3042
3190
|
tick0
|
|
3043
3191
|
};
|
|
3044
3192
|
} else if (axId === 'y') {
|
|
3045
3193
|
props.yAxis = {
|
|
3194
|
+
...props.yAxis,
|
|
3046
3195
|
tickStep: dtick,
|
|
3047
3196
|
tick0
|
|
3048
3197
|
};
|