@fluentui/react-charts 9.3.5 → 9.3.6
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 +23 -2
- package/dist/index.d.ts +223 -44
- package/lib/AnnotationOnlyChart.js +1 -0
- package/lib/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/index.js +2 -0
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/index.js +2 -0
- package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +157 -132
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/index.js +2 -0
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +29 -13
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +39 -19
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +644 -72
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +3 -3
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +1 -1
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +1 -1
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/ChartAnnotation.js +1 -0
- package/lib/types/ChartAnnotation.js.map +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/Common.styles.js +1 -2
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +1 -2
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/image-export-utils.js +108 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +16 -13
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/AnnotationOnlyChart.js +6 -0
- package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +157 -131
- 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/index.js +2 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +32 -21
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +38 -18
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +630 -38
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.js +6 -0
- package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
- package/lib-commonjs/types/index.js +1 -0
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +1 -2
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +108 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +16 -13
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +11 -11
|
@@ -49,6 +49,9 @@ _export(exports, {
|
|
|
49
49
|
resolveXAxisPoint: function() {
|
|
50
50
|
return resolveXAxisPoint;
|
|
51
51
|
},
|
|
52
|
+
transformPlotlyJsonToAnnotationChartProps: function() {
|
|
53
|
+
return transformPlotlyJsonToAnnotationChartProps;
|
|
54
|
+
},
|
|
52
55
|
transformPlotlyJsonToAreaChartProps: function() {
|
|
53
56
|
return transformPlotlyJsonToAreaChartProps;
|
|
54
57
|
},
|
|
@@ -298,6 +301,24 @@ const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNumber)=>{
|
|
|
298
301
|
}
|
|
299
302
|
return x;
|
|
300
303
|
};
|
|
304
|
+
/**
|
|
305
|
+
* Extracts unique X-axis categories from Plotly data traces
|
|
306
|
+
* @param data Array of Plotly data traces
|
|
307
|
+
* @returns Array of unique x values
|
|
308
|
+
*/ const extractXCategories = (data)=>{
|
|
309
|
+
return Array.from(new Set((data !== null && data !== void 0 ? data : []).flatMap((trace)=>{
|
|
310
|
+
const xData = trace.x;
|
|
311
|
+
if (!xData) {
|
|
312
|
+
return [];
|
|
313
|
+
}
|
|
314
|
+
if (Array.isArray(xData)) {
|
|
315
|
+
return xData.flat().map((x)=>{
|
|
316
|
+
return x;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
return [];
|
|
320
|
+
}).filter((x)=>x !== undefined && x !== null)));
|
|
321
|
+
};
|
|
301
322
|
/**
|
|
302
323
|
* Checks if a key should be ignored during normalization
|
|
303
324
|
* @param key The key to check
|
|
@@ -336,6 +357,526 @@ const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNumber)=>{
|
|
|
336
357
|
}
|
|
337
358
|
return flattened;
|
|
338
359
|
};
|
|
360
|
+
const encodeHtmlEntities = (value)=>value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
361
|
+
const toFiniteNumber = (value)=>{
|
|
362
|
+
if (value === undefined || value === null) {
|
|
363
|
+
return undefined;
|
|
364
|
+
}
|
|
365
|
+
const numeric = typeof value === 'number' ? value : Number(value);
|
|
366
|
+
return Number.isFinite(numeric) ? numeric : undefined;
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Normalizes Plotly axis reference strings so equivalent aliases (e.g. `xaxis1`, `x1`) collapse to the base axis id.
|
|
370
|
+
*/ const normalizeAxisRef = (ref, axis)=>{
|
|
371
|
+
if (!ref) {
|
|
372
|
+
return axis;
|
|
373
|
+
}
|
|
374
|
+
const normalized = ref.toLowerCase();
|
|
375
|
+
if (normalized === axis || normalized === `${axis}axis` || normalized === `${axis}axis1` || normalized === `${axis}1`) {
|
|
376
|
+
return axis;
|
|
377
|
+
}
|
|
378
|
+
const match = normalized.match(/^([xy])(axis)?(\d+)$/);
|
|
379
|
+
if (match && match[1] === axis && match[3]) {
|
|
380
|
+
return match[3] === '1' ? axis : `${axis}${match[3]}`;
|
|
381
|
+
}
|
|
382
|
+
return normalized;
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* Scans the data traces bound to a given axis and returns the numeric min/max values plotted on that axis.
|
|
386
|
+
*/ const getAxisNumericRangeFromData = (axis, ref, layout, data)=>{
|
|
387
|
+
if (!data || data.length === 0) {
|
|
388
|
+
return undefined;
|
|
389
|
+
}
|
|
390
|
+
const axisLayout = getAxisLayoutByRef(layout, ref, axis);
|
|
391
|
+
const targetRef = normalizeAxisRef(ref, axis);
|
|
392
|
+
const traceAxisKey = axis === 'x' ? 'xaxis' : 'yaxis';
|
|
393
|
+
let minValue;
|
|
394
|
+
let maxValue;
|
|
395
|
+
data.forEach((trace)=>{
|
|
396
|
+
const plotTrace = trace;
|
|
397
|
+
const traceAxisRef = normalizeAxisRef(plotTrace[traceAxisKey], axis);
|
|
398
|
+
if (traceAxisRef !== targetRef) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const values = axis === 'x' ? plotTrace.x : plotTrace.y;
|
|
402
|
+
if (!(0, _chartutilities.isArrayOrTypedArray)(values)) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
const arrayLike = values;
|
|
406
|
+
for(let index = 0; index < arrayLike.length; index++){
|
|
407
|
+
const value = arrayLike[index];
|
|
408
|
+
const numeric = toNumericValue(convertDataValue(value, axisLayout));
|
|
409
|
+
if (numeric === undefined || Number.isNaN(numeric)) {
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
minValue = minValue === undefined ? numeric : Math.min(minValue, numeric);
|
|
413
|
+
maxValue = maxValue === undefined ? numeric : Math.max(maxValue, numeric);
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
if (minValue === undefined || maxValue === undefined || minValue === maxValue) {
|
|
417
|
+
return undefined;
|
|
418
|
+
}
|
|
419
|
+
return [
|
|
420
|
+
minValue,
|
|
421
|
+
maxValue
|
|
422
|
+
];
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Converts Plotly's bottom-origin relative Y coordinate into the SVG top-origin space used by our overlay.
|
|
426
|
+
*/ const transformRelativeYForChart = (value)=>{
|
|
427
|
+
if (value === undefined) {
|
|
428
|
+
return undefined;
|
|
429
|
+
}
|
|
430
|
+
if (!Number.isFinite(value)) {
|
|
431
|
+
return undefined;
|
|
432
|
+
}
|
|
433
|
+
return 1 - value;
|
|
434
|
+
};
|
|
435
|
+
const mapHorizontalAlign = (anchor)=>{
|
|
436
|
+
switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
|
|
437
|
+
case 'left':
|
|
438
|
+
return 'start';
|
|
439
|
+
case 'center':
|
|
440
|
+
return 'center';
|
|
441
|
+
case 'right':
|
|
442
|
+
return 'end';
|
|
443
|
+
default:
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
const mapVerticalAlign = (anchor)=>{
|
|
448
|
+
switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
|
|
449
|
+
case 'top':
|
|
450
|
+
return 'top';
|
|
451
|
+
case 'middle':
|
|
452
|
+
return 'middle';
|
|
453
|
+
case 'bottom':
|
|
454
|
+
return 'bottom';
|
|
455
|
+
default:
|
|
456
|
+
return undefined;
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const appendPx = (value)=>{
|
|
460
|
+
if (value === undefined || value === null) {
|
|
461
|
+
return undefined;
|
|
462
|
+
}
|
|
463
|
+
if (typeof value === 'string') {
|
|
464
|
+
return value;
|
|
465
|
+
}
|
|
466
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
467
|
+
return `${value}px`;
|
|
468
|
+
}
|
|
469
|
+
return undefined;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Maps Plotly's axis reference string to one of our coordinate interpretation modes (axis, relative, or pixel).
|
|
473
|
+
*/ const resolveRefType = (ref, axis)=>{
|
|
474
|
+
if (!ref) {
|
|
475
|
+
return 'axis';
|
|
476
|
+
}
|
|
477
|
+
const normalized = ref.toLowerCase();
|
|
478
|
+
if (normalized === 'pixel') {
|
|
479
|
+
return 'pixel';
|
|
480
|
+
}
|
|
481
|
+
if (normalized === 'paper') {
|
|
482
|
+
return 'relative';
|
|
483
|
+
}
|
|
484
|
+
if (normalized.endsWith(' domain')) {
|
|
485
|
+
return normalized.startsWith(axis) ? 'relative' : undefined;
|
|
486
|
+
}
|
|
487
|
+
const match = normalized.match(/^([xy])(\d*)$/);
|
|
488
|
+
if (match && match[1] === axis) {
|
|
489
|
+
return 'axis';
|
|
490
|
+
}
|
|
491
|
+
return undefined;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Retrieves the appropriate axis layout section from Plotly's layout given an axis reference alias.
|
|
495
|
+
*/ const getAxisLayoutByRef = (layout, ref, axis)=>{
|
|
496
|
+
if (!layout) {
|
|
497
|
+
return undefined;
|
|
498
|
+
}
|
|
499
|
+
const defaultAxisKey = `${axis}axis`;
|
|
500
|
+
if (!ref) {
|
|
501
|
+
return layout[defaultAxisKey];
|
|
502
|
+
}
|
|
503
|
+
const normalized = ref.toLowerCase();
|
|
504
|
+
if (normalized === 'paper' || normalized === 'pixel' || normalized.endsWith(' domain')) {
|
|
505
|
+
return layout[defaultAxisKey];
|
|
506
|
+
}
|
|
507
|
+
const match = normalized.match(/^([xy])(\d*)$/);
|
|
508
|
+
if (match && match[1] === axis) {
|
|
509
|
+
const index = match[2];
|
|
510
|
+
if (index && index !== '' && index !== '1') {
|
|
511
|
+
const axisKey = `${axis}axis${index}`;
|
|
512
|
+
return layout[axisKey];
|
|
513
|
+
}
|
|
514
|
+
return layout[defaultAxisKey];
|
|
515
|
+
}
|
|
516
|
+
return layout[defaultAxisKey];
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Normalizes raw Plotly data values into canonical number/date/string types based on axis configuration.
|
|
520
|
+
*/ const convertDataValue = (value, axisLayout)=>{
|
|
521
|
+
if (value === undefined || value === null) {
|
|
522
|
+
return undefined;
|
|
523
|
+
}
|
|
524
|
+
if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'date' || (0, _chartutilities.isDate)(value)) {
|
|
525
|
+
const dateValue = value instanceof Date ? value : new Date(value);
|
|
526
|
+
return Number.isNaN(dateValue.getTime()) ? undefined : dateValue;
|
|
527
|
+
}
|
|
528
|
+
if (typeof value === 'number') {
|
|
529
|
+
return value;
|
|
530
|
+
}
|
|
531
|
+
if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'linear' || (axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'log') {
|
|
532
|
+
const numeric = Number(value);
|
|
533
|
+
return Number.isFinite(numeric) ? numeric : undefined;
|
|
534
|
+
}
|
|
535
|
+
if (value instanceof Date) {
|
|
536
|
+
return value;
|
|
537
|
+
}
|
|
538
|
+
return value;
|
|
539
|
+
};
|
|
540
|
+
const toNumericValue = (value)=>{
|
|
541
|
+
if (value instanceof Date) {
|
|
542
|
+
const timestamp = value.getTime();
|
|
543
|
+
return Number.isFinite(timestamp) ? timestamp : undefined;
|
|
544
|
+
}
|
|
545
|
+
if (typeof value === 'number') {
|
|
546
|
+
return Number.isFinite(value) ? value : undefined;
|
|
547
|
+
}
|
|
548
|
+
if (typeof value === 'string') {
|
|
549
|
+
const numeric = Number(value);
|
|
550
|
+
return Number.isFinite(numeric) ? numeric : undefined;
|
|
551
|
+
}
|
|
552
|
+
return undefined;
|
|
553
|
+
};
|
|
554
|
+
const toRelativeCoordinate = (value, axisLayout, fallbackRange)=>{
|
|
555
|
+
const range = Array.isArray(axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.range) ? axisLayout.range : undefined;
|
|
556
|
+
let start = range && range.length >= 2 ? toNumericValue(convertDataValue(range[0], axisLayout)) : undefined;
|
|
557
|
+
let end = range && range.length >= 2 ? toNumericValue(convertDataValue(range[1], axisLayout)) : undefined;
|
|
558
|
+
if ((start === undefined || end === undefined || start === end) && fallbackRange) {
|
|
559
|
+
[start, end] = fallbackRange;
|
|
560
|
+
}
|
|
561
|
+
const current = toNumericValue(convertDataValue(value, axisLayout));
|
|
562
|
+
if (start === undefined || end === undefined || current === undefined || start === end) {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
const relative = (current - start) / (end - start);
|
|
566
|
+
return Number.isFinite(relative) ? relative : undefined;
|
|
567
|
+
};
|
|
568
|
+
const createAnnotationId = (text, index)=>{
|
|
569
|
+
const normalized = text.replace(/\s+/g, ' ').trim();
|
|
570
|
+
if (normalized) {
|
|
571
|
+
const slug = normalized.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 32);
|
|
572
|
+
if (slug) {
|
|
573
|
+
return `annotation-${index}-${slug}`;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return `annotation-${index}`;
|
|
577
|
+
};
|
|
578
|
+
const DEFAULT_ARROW_OFFSET = -40;
|
|
579
|
+
const mapArrowsideToArrow = (annotation)=>{
|
|
580
|
+
let includeStart = false;
|
|
581
|
+
let includeEnd = false;
|
|
582
|
+
const arrowSide = typeof (annotation === null || annotation === void 0 ? void 0 : annotation.arrowside) === 'string' ? annotation === null || annotation === void 0 ? void 0 : annotation.arrowside.toLowerCase() : undefined;
|
|
583
|
+
if (arrowSide) {
|
|
584
|
+
includeStart = arrowSide.includes('start');
|
|
585
|
+
includeEnd = arrowSide.includes('end');
|
|
586
|
+
}
|
|
587
|
+
const endHead = toFiniteNumber(annotation === null || annotation === void 0 ? void 0 : annotation.arrowhead);
|
|
588
|
+
const startHead = toFiniteNumber(annotation.startarrowhead);
|
|
589
|
+
if (endHead !== undefined && endHead > 0) {
|
|
590
|
+
includeEnd = true;
|
|
591
|
+
}
|
|
592
|
+
if (startHead !== undefined && startHead > 0) {
|
|
593
|
+
includeStart = true;
|
|
594
|
+
}
|
|
595
|
+
if (includeStart && includeEnd) {
|
|
596
|
+
return 'both';
|
|
597
|
+
}
|
|
598
|
+
if (includeStart) {
|
|
599
|
+
return 'start';
|
|
600
|
+
}
|
|
601
|
+
if (includeEnd) {
|
|
602
|
+
return 'end';
|
|
603
|
+
}
|
|
604
|
+
return 'none';
|
|
605
|
+
};
|
|
606
|
+
const mapArrowDashToPattern = (value)=>{
|
|
607
|
+
if (!value) {
|
|
608
|
+
return undefined;
|
|
609
|
+
}
|
|
610
|
+
const normalized = value.trim().toLowerCase();
|
|
611
|
+
switch(normalized){
|
|
612
|
+
case 'solid':
|
|
613
|
+
return undefined;
|
|
614
|
+
case 'dot':
|
|
615
|
+
return '1, 5';
|
|
616
|
+
case 'dash':
|
|
617
|
+
return '5, 5';
|
|
618
|
+
case 'longdash':
|
|
619
|
+
return '10, 5';
|
|
620
|
+
case 'dashdot':
|
|
621
|
+
return '5, 5, 1, 5';
|
|
622
|
+
case 'longdashdot':
|
|
623
|
+
return '10, 5, 1, 5';
|
|
624
|
+
default:
|
|
625
|
+
if (/^\d+(\s|,)*\d*$/.test(normalized.replace(/\s+/g, ' '))) {
|
|
626
|
+
return normalized.replace(/\s+/g, ' ');
|
|
627
|
+
}
|
|
628
|
+
return value;
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
/**
|
|
632
|
+
* Converts a Plotly annotation definition into the internal `ChartAnnotation` format, translating coordinates,
|
|
633
|
+
* layout alignment, styling, and connector metadata while skipping unsupported configurations.
|
|
634
|
+
*/ const convertPlotlyAnnotation = (annotation, layout, data, index)=>{
|
|
635
|
+
if (!annotation || annotation.visible === false) {
|
|
636
|
+
return undefined;
|
|
637
|
+
}
|
|
638
|
+
const xRefType = resolveRefType(annotation.xref, 'x');
|
|
639
|
+
const yRefType = resolveRefType(annotation.yref, 'y');
|
|
640
|
+
if (!xRefType || !yRefType) {
|
|
641
|
+
return undefined;
|
|
642
|
+
}
|
|
643
|
+
let coordinates;
|
|
644
|
+
if (xRefType === 'axis' && yRefType === 'axis') {
|
|
645
|
+
const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
|
|
646
|
+
const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
|
|
647
|
+
const xValue = convertDataValue(annotation.x, xAxisLayout);
|
|
648
|
+
const yValue = convertDataValue(annotation.y, yAxisLayout);
|
|
649
|
+
if (xValue === undefined || yValue === undefined) {
|
|
650
|
+
return undefined;
|
|
651
|
+
}
|
|
652
|
+
const yRefNormalized = typeof annotation.yref === 'string' ? annotation.yref.toLowerCase() : undefined;
|
|
653
|
+
coordinates = {
|
|
654
|
+
type: 'data',
|
|
655
|
+
x: xValue,
|
|
656
|
+
y: yValue,
|
|
657
|
+
...yRefNormalized === 'y2' ? {
|
|
658
|
+
yAxis: 'secondary'
|
|
659
|
+
} : {}
|
|
660
|
+
};
|
|
661
|
+
} else if (xRefType === 'relative' && yRefType === 'relative') {
|
|
662
|
+
const xValue = toFiniteNumber(annotation.x);
|
|
663
|
+
const yValue = toFiniteNumber(annotation.y);
|
|
664
|
+
const chartRelativeY = transformRelativeYForChart(yValue);
|
|
665
|
+
if (xValue === undefined || chartRelativeY === undefined) {
|
|
666
|
+
return undefined;
|
|
667
|
+
}
|
|
668
|
+
coordinates = {
|
|
669
|
+
type: 'relative',
|
|
670
|
+
x: xValue,
|
|
671
|
+
y: chartRelativeY
|
|
672
|
+
};
|
|
673
|
+
} else if (xRefType === 'relative' && yRefType === 'axis') {
|
|
674
|
+
const xValue = toFiniteNumber(annotation.x);
|
|
675
|
+
const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
|
|
676
|
+
const yFallbackRange = getAxisNumericRangeFromData('y', annotation.yref, layout, data);
|
|
677
|
+
const yRelative = toRelativeCoordinate(annotation.y, yAxisLayout, yFallbackRange);
|
|
678
|
+
const chartRelativeY = transformRelativeYForChart(yRelative);
|
|
679
|
+
if (xValue === undefined || chartRelativeY === undefined) {
|
|
680
|
+
return undefined;
|
|
681
|
+
}
|
|
682
|
+
coordinates = {
|
|
683
|
+
type: 'relative',
|
|
684
|
+
x: xValue,
|
|
685
|
+
y: chartRelativeY
|
|
686
|
+
};
|
|
687
|
+
} else if (xRefType === 'axis' && yRefType === 'relative') {
|
|
688
|
+
const yValue = toFiniteNumber(annotation.y);
|
|
689
|
+
const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
|
|
690
|
+
const xFallbackRange = getAxisNumericRangeFromData('x', annotation.xref, layout, data);
|
|
691
|
+
const xRelative = toRelativeCoordinate(annotation.x, xAxisLayout, xFallbackRange);
|
|
692
|
+
const chartRelativeY = transformRelativeYForChart(yValue);
|
|
693
|
+
if (xRelative === undefined || chartRelativeY === undefined) {
|
|
694
|
+
return undefined;
|
|
695
|
+
}
|
|
696
|
+
coordinates = {
|
|
697
|
+
type: 'relative',
|
|
698
|
+
x: xRelative,
|
|
699
|
+
y: chartRelativeY
|
|
700
|
+
};
|
|
701
|
+
} else if (xRefType === 'pixel' && yRefType === 'pixel') {
|
|
702
|
+
const xValue = toFiniteNumber(annotation.x);
|
|
703
|
+
const yValue = toFiniteNumber(annotation.y);
|
|
704
|
+
if (xValue === undefined || yValue === undefined) {
|
|
705
|
+
return undefined;
|
|
706
|
+
}
|
|
707
|
+
coordinates = {
|
|
708
|
+
type: 'pixel',
|
|
709
|
+
x: xValue,
|
|
710
|
+
y: yValue
|
|
711
|
+
};
|
|
712
|
+
} else {
|
|
713
|
+
return undefined;
|
|
714
|
+
}
|
|
715
|
+
const textValue = annotation.text;
|
|
716
|
+
const rawText = textValue === undefined || textValue === null ? '' : String(textValue);
|
|
717
|
+
const encodedText = encodeHtmlEntities(rawText);
|
|
718
|
+
const chartAnnotation = {
|
|
719
|
+
id: createAnnotationId(encodedText, index),
|
|
720
|
+
text: encodedText,
|
|
721
|
+
coordinates
|
|
722
|
+
};
|
|
723
|
+
const layoutProps = {};
|
|
724
|
+
const styleProps = {};
|
|
725
|
+
const showArrow = annotation.showarrow === undefined ? false : !!annotation.showarrow;
|
|
726
|
+
const clipOnAxis = annotation.cliponaxis;
|
|
727
|
+
if (clipOnAxis !== undefined) {
|
|
728
|
+
layoutProps.clipToBounds = !!clipOnAxis;
|
|
729
|
+
} else if (coordinates.type === 'data') {
|
|
730
|
+
layoutProps.clipToBounds = true;
|
|
731
|
+
}
|
|
732
|
+
const horizontalAlign = mapHorizontalAlign(annotation.xanchor);
|
|
733
|
+
if (horizontalAlign) {
|
|
734
|
+
layoutProps.align = horizontalAlign;
|
|
735
|
+
}
|
|
736
|
+
if (!layoutProps.align) {
|
|
737
|
+
const alignProp = mapHorizontalAlign(annotation.align);
|
|
738
|
+
if (alignProp) {
|
|
739
|
+
layoutProps.align = alignProp;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
const verticalAlign = mapVerticalAlign(annotation.yanchor);
|
|
743
|
+
if (verticalAlign) {
|
|
744
|
+
layoutProps.verticalAlign = verticalAlign;
|
|
745
|
+
}
|
|
746
|
+
if (!layoutProps.verticalAlign) {
|
|
747
|
+
const valignProp = mapVerticalAlign(annotation.valign);
|
|
748
|
+
if (valignProp) {
|
|
749
|
+
layoutProps.verticalAlign = valignProp;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
const offsetXComponents = [];
|
|
753
|
+
let hasExplicitOffset = false;
|
|
754
|
+
const ax = toFiniteNumber(annotation.ax);
|
|
755
|
+
const axRef = typeof annotation.axref === 'string' ? annotation.axref.toLowerCase() : undefined;
|
|
756
|
+
if (ax !== undefined && (axRef === undefined || axRef === 'pixel')) {
|
|
757
|
+
offsetXComponents.push(ax);
|
|
758
|
+
hasExplicitOffset = true;
|
|
759
|
+
}
|
|
760
|
+
const xShift = toFiniteNumber(annotation.xshift);
|
|
761
|
+
if (xShift !== undefined) {
|
|
762
|
+
offsetXComponents.push(xShift);
|
|
763
|
+
hasExplicitOffset = true;
|
|
764
|
+
}
|
|
765
|
+
if (offsetXComponents.length > 0) {
|
|
766
|
+
const offsetX = offsetXComponents.reduce((sum, value)=>sum + value, 0);
|
|
767
|
+
if (offsetX !== 0) {
|
|
768
|
+
layoutProps.offsetX = offsetX;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
const offsetYComponents = [];
|
|
772
|
+
const ay = toFiniteNumber(annotation.ay);
|
|
773
|
+
const ayRef = typeof annotation.ayref === 'string' ? annotation.ayref.toLowerCase() : undefined;
|
|
774
|
+
if (ay !== undefined && (ayRef === undefined || ayRef === 'pixel')) {
|
|
775
|
+
offsetYComponents.push(ay);
|
|
776
|
+
hasExplicitOffset = true;
|
|
777
|
+
}
|
|
778
|
+
const yShift = toFiniteNumber(annotation.yshift);
|
|
779
|
+
if (yShift !== undefined) {
|
|
780
|
+
offsetYComponents.push(yShift);
|
|
781
|
+
hasExplicitOffset = true;
|
|
782
|
+
}
|
|
783
|
+
if (offsetYComponents.length > 0) {
|
|
784
|
+
const offsetY = offsetYComponents.reduce((sum, value)=>sum + value, 0);
|
|
785
|
+
if (offsetY !== 0) {
|
|
786
|
+
layoutProps.offsetY = offsetY;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if (showArrow && !hasExplicitOffset && layoutProps.offsetY === undefined) {
|
|
790
|
+
layoutProps.offsetY = DEFAULT_ARROW_OFFSET;
|
|
791
|
+
}
|
|
792
|
+
const maxWidth = toFiniteNumber(annotation.width);
|
|
793
|
+
if (maxWidth !== undefined) {
|
|
794
|
+
layoutProps.maxWidth = maxWidth;
|
|
795
|
+
}
|
|
796
|
+
if (annotation.bgcolor) {
|
|
797
|
+
styleProps.backgroundColor = annotation.bgcolor;
|
|
798
|
+
}
|
|
799
|
+
if (annotation.bordercolor) {
|
|
800
|
+
styleProps.borderColor = annotation.bordercolor;
|
|
801
|
+
}
|
|
802
|
+
const borderWidth = toFiniteNumber(annotation.borderwidth);
|
|
803
|
+
if (borderWidth !== undefined) {
|
|
804
|
+
styleProps.borderWidth = borderWidth;
|
|
805
|
+
}
|
|
806
|
+
const borderPad = appendPx(annotation.borderpad);
|
|
807
|
+
if (borderPad) {
|
|
808
|
+
styleProps.padding = borderPad;
|
|
809
|
+
}
|
|
810
|
+
const opacity = toFiniteNumber(annotation.opacity);
|
|
811
|
+
if (opacity !== undefined) {
|
|
812
|
+
styleProps.opacity = opacity;
|
|
813
|
+
}
|
|
814
|
+
if (annotation.font) {
|
|
815
|
+
const font = annotation.font;
|
|
816
|
+
if (font === null || font === void 0 ? void 0 : font.color) {
|
|
817
|
+
styleProps.textColor = font.color;
|
|
818
|
+
}
|
|
819
|
+
const fontSize = appendPx(font === null || font === void 0 ? void 0 : font.size);
|
|
820
|
+
if (fontSize) {
|
|
821
|
+
styleProps.fontSize = fontSize;
|
|
822
|
+
}
|
|
823
|
+
if (font === null || font === void 0 ? void 0 : font.weight) {
|
|
824
|
+
styleProps.fontWeight = font.weight;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
const textAngle = annotation === null || annotation === void 0 ? void 0 : annotation.textangle;
|
|
828
|
+
if (typeof textAngle === 'number' && !Number.isNaN(textAngle)) {
|
|
829
|
+
styleProps.rotation = textAngle;
|
|
830
|
+
} else if (typeof textAngle === 'string' && textAngle.toLowerCase() !== 'auto') {
|
|
831
|
+
const parsedAngle = Number(textAngle);
|
|
832
|
+
if (!Number.isNaN(parsedAngle)) {
|
|
833
|
+
styleProps.rotation = parsedAngle;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
if (Object.keys(layoutProps).length > 0) {
|
|
837
|
+
chartAnnotation.layout = layoutProps;
|
|
838
|
+
}
|
|
839
|
+
if (Object.keys(styleProps).length > 0) {
|
|
840
|
+
chartAnnotation.style = styleProps;
|
|
841
|
+
}
|
|
842
|
+
if (showArrow) {
|
|
843
|
+
var _annotation_arrowcolor;
|
|
844
|
+
const arrowColor = (_annotation_arrowcolor = annotation.arrowcolor) !== null && _annotation_arrowcolor !== void 0 ? _annotation_arrowcolor : styleProps.textColor;
|
|
845
|
+
const arrowWidth = toFiniteNumber(annotation.arrowwidth);
|
|
846
|
+
const endPadding = toFiniteNumber(annotation.standoff);
|
|
847
|
+
const startPadding = toFiniteNumber(annotation.startstandoff);
|
|
848
|
+
const dashPattern = mapArrowDashToPattern(annotation.arrowdash);
|
|
849
|
+
chartAnnotation.connector = {
|
|
850
|
+
...arrowColor ? {
|
|
851
|
+
strokeColor: arrowColor
|
|
852
|
+
} : {},
|
|
853
|
+
...arrowWidth !== undefined ? {
|
|
854
|
+
strokeWidth: arrowWidth
|
|
855
|
+
} : {},
|
|
856
|
+
...endPadding !== undefined ? {
|
|
857
|
+
endPadding: Math.max(endPadding, 0)
|
|
858
|
+
} : {},
|
|
859
|
+
...startPadding !== undefined ? {
|
|
860
|
+
startPadding: Math.max(startPadding, 0)
|
|
861
|
+
} : {},
|
|
862
|
+
...dashPattern ? {
|
|
863
|
+
dashArray: dashPattern
|
|
864
|
+
} : {},
|
|
865
|
+
arrow: mapArrowsideToArrow(annotation)
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
return chartAnnotation;
|
|
869
|
+
};
|
|
870
|
+
const getChartAnnotationsFromLayout = (layout, data, isMultiPlot)=>{
|
|
871
|
+
if (isMultiPlot || !(layout === null || layout === void 0 ? void 0 : layout.annotations)) {
|
|
872
|
+
return undefined;
|
|
873
|
+
}
|
|
874
|
+
const annotationsArray = Array.isArray(layout.annotations) ? layout.annotations : [
|
|
875
|
+
layout.annotations
|
|
876
|
+
];
|
|
877
|
+
const converted = annotationsArray.map((annotation, index)=>convertPlotlyAnnotation(annotation, layout, data, index)).filter((annotation)=>annotation !== undefined);
|
|
878
|
+
return converted.length > 0 ? converted : undefined;
|
|
879
|
+
};
|
|
339
880
|
const normalizeObjectArrayForGVBC = (data, xLabels)=>{
|
|
340
881
|
if (!data || data.length === 0) {
|
|
341
882
|
return {
|
|
@@ -407,6 +948,34 @@ const normalizeObjectArrayForGVBC = (data, xLabels)=>{
|
|
|
407
948
|
x
|
|
408
949
|
};
|
|
409
950
|
};
|
|
951
|
+
const transformPlotlyJsonToAnnotationChartProps = (input, isMultiPlot, _colorMap, _colorwayType, _isDarkTheme)=>{
|
|
952
|
+
var _layoutWithMeta_meta, _input_layout, _input_layout1, _input_layout2, _input_layout3, _input_layout_font, _input_layout4, _input_layout_font1, _input_layout5, _input_layout6;
|
|
953
|
+
var _getChartAnnotationsFromLayout;
|
|
954
|
+
const annotations = (_getChartAnnotationsFromLayout = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot)) !== null && _getChartAnnotationsFromLayout !== void 0 ? _getChartAnnotationsFromLayout : [];
|
|
955
|
+
const titles = getTitles(input.layout);
|
|
956
|
+
const layoutTitle = titles.chartTitle || undefined;
|
|
957
|
+
const layoutWithMeta = input.layout;
|
|
958
|
+
const description = typeof (layoutWithMeta === null || layoutWithMeta === void 0 ? void 0 : (_layoutWithMeta_meta = layoutWithMeta.meta) === null || _layoutWithMeta_meta === void 0 ? void 0 : _layoutWithMeta_meta.description) === 'string' ? layoutWithMeta.meta.description : undefined;
|
|
959
|
+
const width = typeof ((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.width) === 'number' ? input.layout.width : undefined;
|
|
960
|
+
const height = typeof ((_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.height) === 'number' ? input.layout.height : undefined;
|
|
961
|
+
const paperBackgroundColor = typeof ((_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.paper_bgcolor) === 'string' ? input.layout.paper_bgcolor : undefined;
|
|
962
|
+
const plotBackgroundColor = typeof ((_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : _input_layout3.plot_bgcolor) === 'string' ? input.layout.plot_bgcolor : undefined;
|
|
963
|
+
const fontColor = typeof ((_input_layout4 = input.layout) === null || _input_layout4 === void 0 ? void 0 : (_input_layout_font = _input_layout4.font) === null || _input_layout_font === void 0 ? void 0 : _input_layout_font.color) === 'string' ? input.layout.font.color : undefined;
|
|
964
|
+
const fontFamily = typeof ((_input_layout5 = input.layout) === null || _input_layout5 === void 0 ? void 0 : (_input_layout_font1 = _input_layout5.font) === null || _input_layout_font1 === void 0 ? void 0 : _input_layout_font1.family) === 'string' ? input.layout.font.family : undefined;
|
|
965
|
+
const margin = (_input_layout6 = input.layout) === null || _input_layout6 === void 0 ? void 0 : _input_layout6.margin;
|
|
966
|
+
return {
|
|
967
|
+
annotations,
|
|
968
|
+
chartTitle: layoutTitle,
|
|
969
|
+
description,
|
|
970
|
+
width,
|
|
971
|
+
height,
|
|
972
|
+
paperBackgroundColor,
|
|
973
|
+
plotBackgroundColor,
|
|
974
|
+
fontColor,
|
|
975
|
+
fontFamily,
|
|
976
|
+
margin
|
|
977
|
+
};
|
|
978
|
+
};
|
|
410
979
|
const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
411
980
|
var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _firstData_marker, _input_layout3, _input_layout4, _input_layout5, _input_layout6;
|
|
412
981
|
const firstData = input.data[0];
|
|
@@ -574,19 +1143,7 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
574
1143
|
});
|
|
575
1144
|
});
|
|
576
1145
|
});
|
|
577
|
-
|
|
578
|
-
const xCategories = Array.from(new Set(((_input_data = input.data) !== null && _input_data !== void 0 ? _input_data : []).flatMap((trace)=>{
|
|
579
|
-
const xData = trace.x;
|
|
580
|
-
if (!xData) {
|
|
581
|
-
return [];
|
|
582
|
-
}
|
|
583
|
-
if (Array.isArray(xData)) {
|
|
584
|
-
return xData.flat().map((x)=>{
|
|
585
|
-
return x;
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
return [];
|
|
589
|
-
}).filter((x)=>x !== undefined && x !== null)));
|
|
1146
|
+
const xCategories = extractXCategories(input.data);
|
|
590
1147
|
var _input_layout_shapes;
|
|
591
1148
|
((_input_layout_shapes = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.shapes) !== null && _input_layout_shapes !== void 0 ? _input_layout_shapes : []).filter((shape)=>shape.type === 'line').forEach((shape, shapeIdx)=>{
|
|
592
1149
|
var _shape_line;
|
|
@@ -628,24 +1185,29 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
628
1185
|
};
|
|
629
1186
|
const y0Val = resolveY(shape.y0);
|
|
630
1187
|
const y1Val = resolveY(shape.y1);
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
1188
|
+
if (mapXToDataPoints[x0Key]) {
|
|
1189
|
+
var _rgb_formatHex8;
|
|
1190
|
+
mapXToDataPoints[x0Key].lineData.push({
|
|
1191
|
+
legend: `Reference_${shapeIdx}`,
|
|
1192
|
+
y: y0Val,
|
|
1193
|
+
color: (_rgb_formatHex8 = (0, _d3color.rgb)(lineColor).formatHex8()) !== null && _rgb_formatHex8 !== void 0 ? _rgb_formatHex8 : lineColor,
|
|
1194
|
+
lineOptions: getLineOptions(shape.line),
|
|
1195
|
+
useSecondaryYScale: false
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
if (mapXToDataPoints[x1Key]) {
|
|
1199
|
+
var _rgb_formatHex81;
|
|
1200
|
+
mapXToDataPoints[x1Key].lineData.push({
|
|
1201
|
+
legend: `Reference_${shapeIdx}`,
|
|
1202
|
+
y: y1Val,
|
|
1203
|
+
color: (_rgb_formatHex81 = (0, _d3color.rgb)(lineColor).formatHex8()) !== null && _rgb_formatHex81 !== void 0 ? _rgb_formatHex81 : lineColor,
|
|
1204
|
+
lineOptions: getLineOptions(shape.line),
|
|
1205
|
+
useSecondaryYScale: false
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
647
1208
|
});
|
|
648
1209
|
const vsbcData = Object.values(mapXToDataPoints);
|
|
1210
|
+
const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
649
1211
|
var _input_layout_height;
|
|
650
1212
|
return {
|
|
651
1213
|
data: vsbcData,
|
|
@@ -670,7 +1232,10 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
670
1232
|
...getAxisCategoryOrderProps(input.data, input.layout),
|
|
671
1233
|
...getBarProps(input.data, input.layout),
|
|
672
1234
|
...getYMinMaxValues(input.data[0], input.layout),
|
|
673
|
-
...getAxisTickProps(input.data, input.layout)
|
|
1235
|
+
...getAxisTickProps(input.data, input.layout),
|
|
1236
|
+
...annotations ? {
|
|
1237
|
+
annotations
|
|
1238
|
+
} : {}
|
|
674
1239
|
};
|
|
675
1240
|
};
|
|
676
1241
|
const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
@@ -777,6 +1342,7 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
777
1342
|
});
|
|
778
1343
|
}
|
|
779
1344
|
});
|
|
1345
|
+
const annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
|
|
780
1346
|
var _processedInput_layout_height;
|
|
781
1347
|
return {
|
|
782
1348
|
dataV2: gvbcDataV2,
|
|
@@ -789,13 +1355,17 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
|
|
|
789
1355
|
wrapXAxisLables: true,
|
|
790
1356
|
hideLegend,
|
|
791
1357
|
roundCorners: true,
|
|
1358
|
+
showYAxisLables: true,
|
|
792
1359
|
...getTitles(processedInput.layout),
|
|
793
1360
|
...getAxisCategoryOrderProps(processedInput.data, processedInput.layout),
|
|
794
1361
|
...getYMinMaxValues(processedInput.data[0], processedInput.layout),
|
|
795
1362
|
...getXAxisTickFormat(processedInput.data[0], processedInput.layout),
|
|
796
1363
|
...yAxisTickFormat,
|
|
797
1364
|
...getBarProps(processedInput.data, processedInput.layout),
|
|
798
|
-
...getAxisTickProps(processedInput.data, processedInput.layout)
|
|
1365
|
+
...getAxisTickProps(processedInput.data, processedInput.layout),
|
|
1366
|
+
...annotations ? {
|
|
1367
|
+
annotations
|
|
1368
|
+
} : {}
|
|
799
1369
|
};
|
|
800
1370
|
};
|
|
801
1371
|
const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
@@ -860,6 +1430,7 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
|
|
|
860
1430
|
});
|
|
861
1431
|
});
|
|
862
1432
|
});
|
|
1433
|
+
const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
863
1434
|
var _input_layout_height;
|
|
864
1435
|
return {
|
|
865
1436
|
data: vbcData,
|
|
@@ -871,9 +1442,13 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
|
|
|
871
1442
|
maxBarWidth: 50,
|
|
872
1443
|
hideLegend,
|
|
873
1444
|
roundCorners: true,
|
|
1445
|
+
showYAxisLables: true,
|
|
874
1446
|
...getTitles(input.layout),
|
|
875
1447
|
...getYMinMaxValues(input.data[0], input.layout),
|
|
876
|
-
...getAxisCategoryOrderProps(input.data, input.layout)
|
|
1448
|
+
...getAxisCategoryOrderProps(input.data, input.layout),
|
|
1449
|
+
...annotations ? {
|
|
1450
|
+
annotations
|
|
1451
|
+
} : {}
|
|
877
1452
|
};
|
|
878
1453
|
};
|
|
879
1454
|
const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
@@ -996,11 +1571,19 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
996
1571
|
const xMaxValue = (_chartData_1 = chartData[0]) === null || _chartData_1 === void 0 ? void 0 : (_chartData__data_1 = _chartData_1.data[chartData[0].data.length - 1]) === null || _chartData__data_1 === void 0 ? void 0 : _chartData__data_1.x;
|
|
997
1572
|
const yMinValue = (_chartData_2 = chartData[0]) === null || _chartData_2 === void 0 ? void 0 : (_chartData__data_2 = _chartData_2.data[0]) === null || _chartData__data_2 === void 0 ? void 0 : _chartData__data_2.y;
|
|
998
1573
|
const yMaxValue = (_chartData_3 = chartData[0]) === null || _chartData_3 === void 0 ? void 0 : (_chartData__data_3 = _chartData_3.data[chartData[0].data.length - 1]) === null || _chartData__data_3 === void 0 ? void 0 : _chartData__data_3.y;
|
|
1574
|
+
const xCategories = extractXCategories(input.data);
|
|
999
1575
|
var _input_layout_shapes;
|
|
1000
1576
|
const lineShape = ((_input_layout_shapes = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.shapes) !== null && _input_layout_shapes !== void 0 ? _input_layout_shapes : []).filter((shape)=>shape.type === 'line').map((shape, shapeIdx)=>{
|
|
1001
1577
|
var _shape_line;
|
|
1002
1578
|
const lineColor = (_shape_line = shape.line) === null || _shape_line === void 0 ? void 0 : _shape_line.color;
|
|
1003
1579
|
const resolveX = (val)=>{
|
|
1580
|
+
if (typeof val === 'number' && Array.isArray(xCategories)) {
|
|
1581
|
+
if (xCategories[val] !== undefined) {
|
|
1582
|
+
return xCategories[val];
|
|
1583
|
+
} else {
|
|
1584
|
+
return xCategories[shapeIdx];
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1004
1587
|
if (shape.xref === 'paper') {
|
|
1005
1588
|
if (val === 0) {
|
|
1006
1589
|
return xMinValue;
|
|
@@ -1035,11 +1618,11 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1035
1618
|
legend: `Reference_${shapeIdx}`,
|
|
1036
1619
|
data: [
|
|
1037
1620
|
{
|
|
1038
|
-
x: resolveX(shape.x0),
|
|
1621
|
+
x: resolveXValue(resolveX(shape.x0)),
|
|
1039
1622
|
y: resolveY(shape.y0)
|
|
1040
1623
|
},
|
|
1041
1624
|
{
|
|
1042
|
-
x: resolveX(shape.x1),
|
|
1625
|
+
x: resolveXValue(resolveX(shape.x1)),
|
|
1043
1626
|
y: resolveY(shape.y1)
|
|
1044
1627
|
}
|
|
1045
1628
|
],
|
|
@@ -1062,8 +1645,12 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1062
1645
|
]
|
|
1063
1646
|
};
|
|
1064
1647
|
const scatterChartProps = {
|
|
1065
|
-
scatterChartData:
|
|
1648
|
+
scatterChartData: [
|
|
1649
|
+
...chartData,
|
|
1650
|
+
...lineShape
|
|
1651
|
+
]
|
|
1066
1652
|
};
|
|
1653
|
+
const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
1067
1654
|
var _input_layout_height;
|
|
1068
1655
|
const commonProps = {
|
|
1069
1656
|
supportNegativeData: true,
|
|
@@ -1073,13 +1660,17 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
1073
1660
|
hideTickOverlap: true,
|
|
1074
1661
|
hideLegend,
|
|
1075
1662
|
useUTC: false,
|
|
1076
|
-
|
|
1663
|
+
wrapXAxisLabels: shouldWrapLabels,
|
|
1077
1664
|
optimizeLargeData: numDataPoints > 1000,
|
|
1665
|
+
showYAxisLables: true,
|
|
1078
1666
|
...getTitles(input.layout),
|
|
1079
1667
|
...getXAxisTickFormat(input.data[0], input.layout),
|
|
1080
1668
|
...yAxisTickFormat,
|
|
1081
1669
|
...getAxisScaleTypeProps(input.data, input.layout),
|
|
1082
|
-
...getAxisTickProps(input.data, input.layout)
|
|
1670
|
+
...getAxisTickProps(input.data, input.layout),
|
|
1671
|
+
...annotations ? {
|
|
1672
|
+
annotations
|
|
1673
|
+
} : {}
|
|
1083
1674
|
};
|
|
1084
1675
|
if (isAreaChart) {
|
|
1085
1676
|
return {
|
|
@@ -2210,7 +2801,8 @@ const isNonPlotType = (chartType)=>{
|
|
|
2210
2801
|
return [
|
|
2211
2802
|
'donut',
|
|
2212
2803
|
'sankey',
|
|
2213
|
-
'pie'
|
|
2804
|
+
'pie',
|
|
2805
|
+
'annotation'
|
|
2214
2806
|
].includes(chartType);
|
|
2215
2807
|
};
|
|
2216
2808
|
const getGridProperties = (schema, isMultiPlot, validTracesInfo)=>{
|