@fluentui/react-charts 9.3.21 → 9.74.3-experimental.esm.20260709-49ee7a20cf.0
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 +20 -2
- package/package.json +15 -17
- package/dist/index.d.ts +0 -5724
- package/lib/AnnotationOnlyChart.js +0 -1
- package/lib/AnnotationOnlyChart.js.map +0 -1
- package/lib/AreaChart.js +0 -1
- package/lib/AreaChart.js.map +0 -1
- package/lib/CartesianChart.js +0 -1
- package/lib/CartesianChart.js.map +0 -1
- package/lib/ChartTable.js +0 -1
- package/lib/ChartTable.js.map +0 -1
- package/lib/DeclarativeChart.js +0 -1
- package/lib/DeclarativeChart.js.map +0 -1
- package/lib/DonutChart.js +0 -1
- package/lib/DonutChart.js.map +0 -1
- package/lib/FunnelChart.js +0 -1
- package/lib/FunnelChart.js.map +0 -1
- package/lib/GanttChart.js +0 -1
- package/lib/GanttChart.js.map +0 -1
- package/lib/GaugeChart.js +0 -1
- package/lib/GaugeChart.js.map +0 -1
- package/lib/GroupedVerticalBarChart.js +0 -1
- package/lib/GroupedVerticalBarChart.js.map +0 -1
- package/lib/HeatMapChart.js +0 -1
- package/lib/HeatMapChart.js.map +0 -1
- package/lib/HorizontalBarChart.js +0 -1
- package/lib/HorizontalBarChart.js.map +0 -1
- package/lib/HorizontalBarChartWithAxis.js +0 -1
- package/lib/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib/Legends.js +0 -1
- package/lib/Legends.js.map +0 -1
- package/lib/LineChart.js +0 -1
- package/lib/LineChart.js.map +0 -1
- package/lib/PolarChart.js +0 -1
- package/lib/PolarChart.js.map +0 -1
- package/lib/Popover.js +0 -1
- package/lib/Popover.js.map +0 -1
- package/lib/ResponsiveContainer.js +0 -1
- package/lib/ResponsiveContainer.js.map +0 -1
- package/lib/SankeyChart.js +0 -1
- package/lib/SankeyChart.js.map +0 -1
- package/lib/ScatterChart.js +0 -1
- package/lib/ScatterChart.js.map +0 -1
- package/lib/Sparkline.js +0 -1
- package/lib/Sparkline.js.map +0 -1
- package/lib/VegaDeclarativeChart.js +0 -1
- package/lib/VegaDeclarativeChart.js.map +0 -1
- package/lib/VerticalBarChart.js +0 -1
- package/lib/VerticalBarChart.js.map +0 -1
- package/lib/VerticalStackedBarChart.js +0 -1
- package/lib/VerticalStackedBarChart.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -196
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -3
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/index.js +0 -2
- package/lib/components/AnnotationOnlyChart/index.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -33
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -24
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
- package/lib/components/AreaChart/AreaChart.js +0 -932
- package/lib/components/AreaChart/AreaChart.js.map +0 -1
- package/lib/components/AreaChart/AreaChart.types.js +0 -4
- package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
- package/lib/components/AreaChart/index.js +0 -3
- package/lib/components/AreaChart/index.js.map +0 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -63
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -33
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ChartTable/ChartTable.js +0 -160
- package/lib/components/ChartTable/ChartTable.js.map +0 -1
- package/lib/components/ChartTable/ChartTable.types.js +0 -4
- package/lib/components/ChartTable/ChartTable.types.js.map +0 -1
- package/lib/components/ChartTable/index.js +0 -3
- package/lib/components/ChartTable/index.js.map +0 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +0 -136
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +0 -68
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -659
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/index.js +0 -2
- package/lib/components/CommonComponents/Annotations/index.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -223
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -139
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/CartesianChart.js +0 -665
- package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
- package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
- package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
- package/lib/components/CommonComponents/ChartPopover.js +0 -197
- package/lib/components/CommonComponents/ChartPopover.js.map +0 -1
- package/lib/components/CommonComponents/ChartPopover.types.js +0 -1
- package/lib/components/CommonComponents/ChartPopover.types.js.map +0 -1
- package/lib/components/CommonComponents/index.js +0 -6
- package/lib/components/CommonComponents/index.js.map +0 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +0 -189
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -131
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +0 -171
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -127
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -397
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -163
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3490
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
- package/lib/components/DeclarativeChart/index.js +0 -1
- package/lib/components/DeclarativeChart/index.js.map +0 -1
- package/lib/components/DonutChart/Arc/Arc.js +0 -118
- package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
- package/lib/components/DonutChart/Arc/Arc.types.js +0 -1
- package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
- package/lib/components/DonutChart/Arc/index.js +0 -2
- package/lib/components/DonutChart/Arc/index.js.map +0 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +0 -80
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -49
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
- package/lib/components/DonutChart/DonutChart.js +0 -349
- package/lib/components/DonutChart/DonutChart.js.map +0 -1
- package/lib/components/DonutChart/DonutChart.types.js +0 -4
- package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
- package/lib/components/DonutChart/Pie/Pie.js +0 -72
- package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
- package/lib/components/DonutChart/Pie/Pie.types.js +0 -1
- package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
- package/lib/components/DonutChart/Pie/index.js +0 -2
- package/lib/components/DonutChart/Pie/index.js.map +0 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +0 -41
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -30
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
- package/lib/components/DonutChart/index.js +0 -3
- package/lib/components/DonutChart/index.js.map +0 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +0 -98
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -62
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
- package/lib/components/FunnelChart/FunnelChart.js +0 -401
- package/lib/components/FunnelChart/FunnelChart.js.map +0 -1
- package/lib/components/FunnelChart/FunnelChart.types.js +0 -4
- package/lib/components/FunnelChart/FunnelChart.types.js.map +0 -1
- package/lib/components/FunnelChart/funnelGeometry.js +0 -219
- package/lib/components/FunnelChart/funnelGeometry.js.map +0 -1
- package/lib/components/FunnelChart/index.js +0 -2
- package/lib/components/FunnelChart/index.js.map +0 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +0 -83
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -65
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GanttChart/GanttChart.js +0 -535
- package/lib/components/GanttChart/GanttChart.js.map +0 -1
- package/lib/components/GanttChart/GanttChart.types.js +0 -4
- package/lib/components/GanttChart/GanttChart.types.js.map +0 -1
- package/lib/components/GanttChart/index.js +0 -2
- package/lib/components/GanttChart/index.js.map +0 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +0 -27
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -26
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GaugeChart/GaugeChart.js +0 -568
- package/lib/components/GaugeChart/GaugeChart.js.map +0 -1
- package/lib/components/GaugeChart/GaugeChart.types.js +0 -4
- package/lib/components/GaugeChart/GaugeChart.types.js.map +0 -1
- package/lib/components/GaugeChart/index.js +0 -3
- package/lib/components/GaugeChart/index.js.map +0 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +0 -197
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -149
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -813
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -4
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/index.js +0 -3
- package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -77
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -40
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +0 -677
- package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -4
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
- package/lib/components/HeatMapChart/index.js +0 -3
- package/lib/components/HeatMapChart/index.js.map +0 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -48
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -42
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -411
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -7
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
- package/lib/components/HorizontalBarChart/index.js +0 -3
- package/lib/components/HorizontalBarChart/index.js.map +0 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -175
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -125
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -720
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -4
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/index.js +0 -3
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -62
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -54
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
- package/lib/components/Legends/Legends.js +0 -323
- package/lib/components/Legends/Legends.js.map +0 -1
- package/lib/components/Legends/Legends.types.js +0 -3
- package/lib/components/Legends/Legends.types.js.map +0 -1
- package/lib/components/Legends/OverflowMenu.js +0 -33
- package/lib/components/Legends/OverflowMenu.js.map +0 -1
- package/lib/components/Legends/index.js +0 -3
- package/lib/components/Legends/index.js.map +0 -1
- package/lib/components/Legends/shape.js +0 -36
- package/lib/components/Legends/shape.js.map +0 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +0 -262
- package/lib/components/Legends/useLegendsStyles.styles.js.map +0 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +0 -142
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
- package/lib/components/LineChart/LineChart.js +0 -1332
- package/lib/components/LineChart/LineChart.js.map +0 -1
- package/lib/components/LineChart/LineChart.types.js +0 -3
- package/lib/components/LineChart/LineChart.types.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -118
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -59
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -42
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
- package/lib/components/LineChart/index.js +0 -4
- package/lib/components/LineChart/index.js.map +0 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +0 -93
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +0 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +0 -50
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.js +0 -577
- package/lib/components/PolarChart/PolarChart.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.types.js +0 -4
- package/lib/components/PolarChart/PolarChart.types.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.utils.js +0 -174
- package/lib/components/PolarChart/PolarChart.utils.js.map +0 -1
- package/lib/components/PolarChart/index.js +0 -2
- package/lib/components/PolarChart/index.js.map +0 -1
- package/lib/components/PolarChart/usePolarChartStyles.styles.js +0 -72
- package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -61
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +0 -99
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -4
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
- package/lib/components/ResponsiveContainer/index.js +0 -3
- package/lib/components/ResponsiveContainer/index.js.map +0 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -30
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -29
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js +0 -20
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
- package/lib/components/SankeyChart/SankeyChart.js +0 -1026
- package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
- package/lib/components/SankeyChart/SankeyChart.types.js +0 -3
- package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
- package/lib/components/SankeyChart/index.js +0 -3
- package/lib/components/SankeyChart/index.js.map +0 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +0 -123
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -79
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ScatterChart/ScatterChart.js +0 -544
- package/lib/components/ScatterChart/ScatterChart.js.map +0 -1
- package/lib/components/ScatterChart/ScatterChart.types.js +0 -4
- package/lib/components/ScatterChart/ScatterChart.types.js.map +0 -1
- package/lib/components/ScatterChart/index.js +0 -3
- package/lib/components/ScatterChart/index.js.map +0 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +0 -84
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -41
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
- package/lib/components/Sparkline/Sparkline.js +0 -123
- package/lib/components/Sparkline/Sparkline.js.map +0 -1
- package/lib/components/Sparkline/Sparkline.types.js +0 -4
- package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
- package/lib/components/Sparkline/index.js +0 -3
- package/lib/components/Sparkline/index.js.map +0 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.js +0 -40
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +0 -31
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -405
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -20
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -415
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -537
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3279
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -28
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/index.js +0 -1
- package/lib/components/VegaDeclarativeChart/index.js.map +0 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -930
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -4
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
- package/lib/components/VerticalBarChart/index.js +0 -3
- package/lib/components/VerticalBarChart/index.js.map +0 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -86
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -48
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1077
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/index.js +0 -3
- package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -74
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -38
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
- package/lib/index.js +0 -26
- package/lib/index.js.map +0 -1
- package/lib/types/ChartAnnotation.js +0 -1
- package/lib/types/ChartAnnotation.js.map +0 -1
- package/lib/types/DataPoint.js +0 -3
- package/lib/types/DataPoint.js.map +0 -1
- package/lib/types/EventAnnotation.js +0 -1
- package/lib/types/EventAnnotation.js.map +0 -1
- package/lib/types/LegendDataItem.js +0 -1
- package/lib/types/LegendDataItem.js.map +0 -1
- package/lib/types/index.js +0 -3
- package/lib/types/index.js.map +0 -1
- package/lib/utilities/ChartTitle.js +0 -45
- package/lib/utilities/ChartTitle.js.map +0 -1
- package/lib/utilities/Common.styles.js +0 -117
- package/lib/utilities/Common.styles.js.map +0 -1
- package/lib/utilities/Common.styles.raw.js +0 -115
- package/lib/utilities/Common.styles.raw.js.map +0 -1
- package/lib/utilities/FocusableTooltipText.js +0 -65
- package/lib/utilities/FocusableTooltipText.js.map +0 -1
- package/lib/utilities/KeyCodes.js +0 -11
- package/lib/utilities/KeyCodes.js.map +0 -1
- package/lib/utilities/SVGTooltipText.js +0 -179
- package/lib/utilities/SVGTooltipText.js.map +0 -1
- package/lib/utilities/async-utils.js +0 -380
- package/lib/utilities/async-utils.js.map +0 -1
- package/lib/utilities/colors.js +0 -281
- package/lib/utilities/colors.js.map +0 -1
- package/lib/utilities/getWindow.js +0 -25
- package/lib/utilities/getWindow.js.map +0 -1
- package/lib/utilities/hooks.js +0 -34
- package/lib/utilities/hooks.js.map +0 -1
- package/lib/utilities/image-export-utils.js +0 -405
- package/lib/utilities/image-export-utils.js.map +0 -1
- package/lib/utilities/index.js +0 -5
- package/lib/utilities/index.js.map +0 -1
- package/lib/utilities/overflow-utils.js +0 -27
- package/lib/utilities/overflow-utils.js.map +0 -1
- package/lib/utilities/scatterpolar-utils.js +0 -52
- package/lib/utilities/scatterpolar-utils.js.map +0 -1
- package/lib/utilities/string.js +0 -32
- package/lib/utilities/string.js.map +0 -1
- package/lib/utilities/test-data.js +0 -565
- package/lib/utilities/test-data.js.map +0 -1
- package/lib/utilities/utilities.js +0 -1990
- package/lib/utilities/utilities.js.map +0 -1
- package/lib/utilities/vbc-utils.js +0 -51
- package/lib/utilities/vbc-utils.js.map +0 -1
- package/lib-commonjs/AnnotationOnlyChart.js +0 -6
- package/lib-commonjs/AnnotationOnlyChart.js.map +0 -1
- package/lib-commonjs/AreaChart.js +0 -6
- package/lib-commonjs/AreaChart.js.map +0 -1
- package/lib-commonjs/CartesianChart.js +0 -6
- package/lib-commonjs/CartesianChart.js.map +0 -1
- package/lib-commonjs/ChartTable.js +0 -6
- package/lib-commonjs/ChartTable.js.map +0 -1
- package/lib-commonjs/DeclarativeChart.js +0 -6
- package/lib-commonjs/DeclarativeChart.js.map +0 -1
- package/lib-commonjs/DonutChart.js +0 -6
- package/lib-commonjs/DonutChart.js.map +0 -1
- package/lib-commonjs/FunnelChart.js +0 -6
- package/lib-commonjs/FunnelChart.js.map +0 -1
- package/lib-commonjs/GanttChart.js +0 -6
- package/lib-commonjs/GanttChart.js.map +0 -1
- package/lib-commonjs/GaugeChart.js +0 -6
- package/lib-commonjs/GaugeChart.js.map +0 -1
- package/lib-commonjs/GroupedVerticalBarChart.js +0 -6
- package/lib-commonjs/GroupedVerticalBarChart.js.map +0 -1
- package/lib-commonjs/HeatMapChart.js +0 -6
- package/lib-commonjs/HeatMapChart.js.map +0 -1
- package/lib-commonjs/HorizontalBarChart.js +0 -6
- package/lib-commonjs/HorizontalBarChart.js.map +0 -1
- package/lib-commonjs/HorizontalBarChartWithAxis.js +0 -6
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib-commonjs/Legends.js +0 -6
- package/lib-commonjs/Legends.js.map +0 -1
- package/lib-commonjs/LineChart.js +0 -6
- package/lib-commonjs/LineChart.js.map +0 -1
- package/lib-commonjs/PolarChart.js +0 -6
- package/lib-commonjs/PolarChart.js.map +0 -1
- package/lib-commonjs/Popover.js +0 -6
- package/lib-commonjs/Popover.js.map +0 -1
- package/lib-commonjs/ResponsiveContainer.js +0 -6
- package/lib-commonjs/ResponsiveContainer.js.map +0 -1
- package/lib-commonjs/SankeyChart.js +0 -6
- package/lib-commonjs/SankeyChart.js.map +0 -1
- package/lib-commonjs/ScatterChart.js +0 -6
- package/lib-commonjs/ScatterChart.js.map +0 -1
- package/lib-commonjs/Sparkline.js +0 -6
- package/lib-commonjs/Sparkline.js.map +0 -1
- package/lib-commonjs/VegaDeclarativeChart.js +0 -6
- package/lib-commonjs/VegaDeclarativeChart.js.map +0 -1
- package/lib-commonjs/VerticalBarChart.js +0 -6
- package/lib-commonjs/VerticalBarChart.js.map +0 -1
- package/lib-commonjs/VerticalStackedBarChart.js +0 -6
- package/lib-commonjs/VerticalStackedBarChart.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -207
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -6
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -57
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -34
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +0 -938
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +0 -1
- package/lib-commonjs/components/AreaChart/AreaChart.types.js +0 -7
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +0 -1
- package/lib-commonjs/components/AreaChart/index.js +0 -8
- package/lib-commonjs/components/AreaChart/index.js.map +0 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -96
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -49
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +0 -171
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js +0 -7
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +0 -1
- package/lib-commonjs/components/ChartTable/index.js +0 -8
- package/lib-commonjs/components/ChartTable/index.js.map +0 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +0 -200
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +0 -82
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -670
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -4
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -325
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -174
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +0 -673
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +0 -5
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +0 -207
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +0 -4
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/index.js +0 -11
- package/lib-commonjs/components/CommonComponents/index.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +0 -268
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -144
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -238
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -141
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -400
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -195
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3577
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/index.js +0 -6
- package/lib-commonjs/components/DeclarativeChart/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -125
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +0 -4
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +0 -110
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -63
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +0 -356
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +0 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js +0 -7
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -79
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +0 -4
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +0 -55
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -44
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DonutChart/index.js +0 -8
- package/lib-commonjs/components/DonutChart/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +0 -145
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -76
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +0 -412
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +0 -7
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -246
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/index.js +0 -7
- package/lib-commonjs/components/FunnelChart/index.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +0 -118
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -79
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +0 -546
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js +0 -7
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +0 -1
- package/lib-commonjs/components/GanttChart/index.js +0 -7
- package/lib-commonjs/components/GanttChart/index.js.map +0 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +0 -42
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -42
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +0 -597
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +0 -7
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/index.js +0 -8
- package/lib-commonjs/components/GaugeChart/index.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +0 -281
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -167
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -818
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -7
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -116
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -56
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +0 -688
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +0 -7
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/index.js +0 -8
- package/lib-commonjs/components/HeatMapChart/index.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -71
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -60
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +0 -417
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -17
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -264
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -139
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -726
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -7
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -86
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -70
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/Legends/Legends.js +0 -333
- package/lib-commonjs/components/Legends/Legends.js.map +0 -1
- package/lib-commonjs/components/Legends/Legends.types.js +0 -6
- package/lib-commonjs/components/Legends/Legends.types.js.map +0 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
- package/lib-commonjs/components/Legends/index.js +0 -8
- package/lib-commonjs/components/Legends/index.js.map +0 -1
- package/lib-commonjs/components/Legends/shape.js +0 -47
- package/lib-commonjs/components/Legends/shape.js.map +0 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +0 -456
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +0 -178
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/LineChart/LineChart.js +0 -1337
- package/lib-commonjs/components/LineChart/LineChart.js.map +0 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js +0 -6
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +0 -129
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +0 -70
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +0 -53
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
- package/lib-commonjs/components/LineChart/index.js +0 -9
- package/lib-commonjs/components/LineChart/index.js.map +0 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -132
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +0 -63
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.js +0 -587
- package/lib-commonjs/components/PolarChart/PolarChart.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.types.js +0 -7
- package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js +0 -204
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +0 -1
- package/lib-commonjs/components/PolarChart/index.js +0 -7
- package/lib-commonjs/components/PolarChart/index.js.map +0 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +0 -107
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -75
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +0 -107
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -7
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -50
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -47
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +0 -28
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +0 -1042
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +0 -6
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/index.js +0 -8
- package/lib-commonjs/components/SankeyChart/index.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -202
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -97
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -550
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +0 -7
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/index.js +0 -8
- package/lib-commonjs/components/ScatterChart/index.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -120
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -55
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +0 -129
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +0 -1
- package/lib-commonjs/components/Sparkline/Sparkline.types.js +0 -7
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +0 -1
- package/lib-commonjs/components/Sparkline/index.js +0 -8
- package/lib-commonjs/components/Sparkline/index.js.map +0 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +0 -57
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +0 -45
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -274
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -35
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -412
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -533
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3214
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -31
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
- package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +0 -932
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +0 -7
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
- package/lib-commonjs/components/VerticalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -128
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -64
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1088
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -7
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -116
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -56
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js +0 -31
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/types/ChartAnnotation.js +0 -4
- package/lib-commonjs/types/ChartAnnotation.js.map +0 -1
- package/lib-commonjs/types/DataPoint.js +0 -6
- package/lib-commonjs/types/DataPoint.js.map +0 -1
- package/lib-commonjs/types/EventAnnotation.js +0 -4
- package/lib-commonjs/types/EventAnnotation.js.map +0 -1
- package/lib-commonjs/types/LegendDataItem.js +0 -4
- package/lib-commonjs/types/LegendDataItem.js.map +0 -1
- package/lib-commonjs/types/index.js +0 -8
- package/lib-commonjs/types/index.js.map +0 -1
- package/lib-commonjs/utilities/ChartTitle.js +0 -53
- package/lib-commonjs/utilities/ChartTitle.js.map +0 -1
- package/lib-commonjs/utilities/Common.styles.js +0 -138
- package/lib-commonjs/utilities/Common.styles.js.map +0 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +0 -138
- package/lib-commonjs/utilities/Common.styles.raw.js.map +0 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +0 -75
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +0 -1
- package/lib-commonjs/utilities/KeyCodes.js +0 -21
- package/lib-commonjs/utilities/KeyCodes.js.map +0 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +0 -189
- package/lib-commonjs/utilities/SVGTooltipText.js.map +0 -1
- package/lib-commonjs/utilities/async-utils.js +0 -382
- package/lib-commonjs/utilities/async-utils.js.map +0 -1
- package/lib-commonjs/utilities/colors.js +0 -311
- package/lib-commonjs/utilities/colors.js.map +0 -1
- package/lib-commonjs/utilities/getWindow.js +0 -28
- package/lib-commonjs/utilities/getWindow.js.map +0 -1
- package/lib-commonjs/utilities/hooks.js +0 -45
- package/lib-commonjs/utilities/hooks.js.map +0 -1
- package/lib-commonjs/utilities/image-export-utils.js +0 -423
- package/lib-commonjs/utilities/image-export-utils.js.map +0 -1
- package/lib-commonjs/utilities/index.js +0 -10
- package/lib-commonjs/utilities/index.js.map +0 -1
- package/lib-commonjs/utilities/overflow-utils.js +0 -36
- package/lib-commonjs/utilities/overflow-utils.js.map +0 -1
- package/lib-commonjs/utilities/scatterpolar-utils.js +0 -67
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +0 -1
- package/lib-commonjs/utilities/string.js +0 -29
- package/lib-commonjs/utilities/string.js.map +0 -1
- package/lib-commonjs/utilities/test-data.js +0 -628
- package/lib-commonjs/utilities/test-data.js.map +0 -1
- package/lib-commonjs/utilities/utilities.js +0 -2016
- package/lib-commonjs/utilities/utilities.js.map +0 -1
- package/lib-commonjs/utilities/vbc-utils.js +0 -72
- package/lib-commonjs/utilities/vbc-utils.js.map +0 -1
|
@@ -1,659 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { mergeClasses } from '@griffel/react';
|
|
4
|
-
import { applyOpacityToColor, DEFAULT_ANNOTATION_BACKGROUND_OPACITY, DEFAULT_CONNECTOR_ARROW, DEFAULT_CONNECTOR_END_PADDING, DEFAULT_CONNECTOR_START_PADDING, DEFAULT_CONNECTOR_STROKE_WIDTH, getDefaultConnectorStrokeColor, useChartAnnotationLayerStyles } from './useChartAnnotationLayer.styles';
|
|
5
|
-
import { useId } from '@fluentui/react-utilities';
|
|
6
|
-
import { tokens } from '@fluentui/react-theme';
|
|
7
|
-
const DEFAULT_HORIZONTAL_ALIGN = 'center';
|
|
8
|
-
const DEFAULT_VERTICAL_ALIGN = 'middle';
|
|
9
|
-
const DEFAULT_FOREIGN_OBJECT_WIDTH = 180;
|
|
10
|
-
const DEFAULT_FOREIGN_OBJECT_HEIGHT = 60;
|
|
11
|
-
const MIN_ARROW_SIZE = 6;
|
|
12
|
-
const MAX_ARROW_SIZE = 24;
|
|
13
|
-
const ARROW_SIZE_SCALE = 0.35;
|
|
14
|
-
const MAX_SIMPLE_MARKUP_DEPTH = 5;
|
|
15
|
-
const CHAR_CODE_LESS_THAN = '<'.codePointAt(0);
|
|
16
|
-
const CHAR_CODE_GREATER_THAN = '>'.codePointAt(0);
|
|
17
|
-
const decodeSimpleMarkupInput = (input)=>{
|
|
18
|
-
const namedEntities = {
|
|
19
|
-
amp: '&',
|
|
20
|
-
quot: '"',
|
|
21
|
-
apos: "'",
|
|
22
|
-
nbsp: '\u00a0'
|
|
23
|
-
};
|
|
24
|
-
const withBasicEntitiesDecoded = input.replace(/&(#x?[0-9a-f]+|#\d+|[a-z][\w-]*);/gi, (match, entity)=>{
|
|
25
|
-
const lower = entity.toLowerCase();
|
|
26
|
-
if (lower === 'lt' || lower === 'gt') {
|
|
27
|
-
return `&${lower};`;
|
|
28
|
-
}
|
|
29
|
-
if (lower.startsWith('#')) {
|
|
30
|
-
const isHex = lower[1] === 'x';
|
|
31
|
-
const digits = lower.slice(isHex ? 2 : 1);
|
|
32
|
-
const codePoint = Number.parseInt(digits, isHex ? 16 : 10);
|
|
33
|
-
if (Number.isNaN(codePoint)) {
|
|
34
|
-
return match;
|
|
35
|
-
}
|
|
36
|
-
if (codePoint === CHAR_CODE_LESS_THAN) {
|
|
37
|
-
return '<';
|
|
38
|
-
}
|
|
39
|
-
if (codePoint === CHAR_CODE_GREATER_THAN) {
|
|
40
|
-
return '>';
|
|
41
|
-
}
|
|
42
|
-
return String.fromCodePoint(codePoint);
|
|
43
|
-
}
|
|
44
|
-
var _namedEntities_lower;
|
|
45
|
-
return (_namedEntities_lower = namedEntities[lower]) !== null && _namedEntities_lower !== void 0 ? _namedEntities_lower : match;
|
|
46
|
-
});
|
|
47
|
-
return withBasicEntitiesDecoded.replace(/<([^;]+)>/gi, (match, inner)=>{
|
|
48
|
-
const normalized = inner.trim().replace(/\s+/g, ' ');
|
|
49
|
-
const lower = normalized.toLowerCase();
|
|
50
|
-
switch(lower){
|
|
51
|
-
case 'b':
|
|
52
|
-
return '<b>';
|
|
53
|
-
case '/b':
|
|
54
|
-
return '</b>';
|
|
55
|
-
case 'i':
|
|
56
|
-
return '<i>';
|
|
57
|
-
case '/i':
|
|
58
|
-
return '</i>';
|
|
59
|
-
case 'br':
|
|
60
|
-
case 'br/':
|
|
61
|
-
case 'br /':
|
|
62
|
-
return '<br />';
|
|
63
|
-
default:
|
|
64
|
-
return match;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
const appendTextNode = (nodes, text)=>{
|
|
69
|
-
if (text.length === 0) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const last = nodes[nodes.length - 1];
|
|
73
|
-
if (last && last.type === 'text') {
|
|
74
|
-
last.content += text;
|
|
75
|
-
} else {
|
|
76
|
-
nodes.push({
|
|
77
|
-
type: 'text',
|
|
78
|
-
content: text
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const serializeSimpleMarkup = (nodes)=>nodes.map((node)=>{
|
|
83
|
-
if (node.type === 'text') {
|
|
84
|
-
return node.content;
|
|
85
|
-
}
|
|
86
|
-
if (node.type === 'br') {
|
|
87
|
-
return '<br />';
|
|
88
|
-
}
|
|
89
|
-
return `<${node.tag}>${serializeSimpleMarkup(node.children)}</${node.tag}>`;
|
|
90
|
-
}).join('');
|
|
91
|
-
const parseSimpleMarkup = (input)=>{
|
|
92
|
-
if (!input) {
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
95
|
-
const decodedInput = decodeSimpleMarkupInput(input);
|
|
96
|
-
const rootChildren = [];
|
|
97
|
-
const stack = [
|
|
98
|
-
{
|
|
99
|
-
node: null
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
const currentChildren = ()=>{
|
|
103
|
-
var _stack__node;
|
|
104
|
-
var _stack__node_children;
|
|
105
|
-
return (_stack__node_children = (_stack__node = stack[stack.length - 1].node) === null || _stack__node === void 0 ? void 0 : _stack__node.children) !== null && _stack__node_children !== void 0 ? _stack__node_children : rootChildren;
|
|
106
|
-
};
|
|
107
|
-
const tagRegex = /<\/?([a-z]+)\s*\/?\s*>/gi;
|
|
108
|
-
let lastIndex = 0;
|
|
109
|
-
let match;
|
|
110
|
-
while((match = tagRegex.exec(decodedInput)) !== null){
|
|
111
|
-
const [fullMatch, rawTagName] = match;
|
|
112
|
-
const tagName = rawTagName.toLowerCase();
|
|
113
|
-
const isClosing = fullMatch.startsWith('</');
|
|
114
|
-
const isSelfClosing = /\/\s*>$/.test(fullMatch);
|
|
115
|
-
appendTextNode(currentChildren(), decodedInput.slice(lastIndex, match.index));
|
|
116
|
-
lastIndex = match.index + fullMatch.length;
|
|
117
|
-
if (tagName === 'br' && !isClosing) {
|
|
118
|
-
currentChildren().push({
|
|
119
|
-
type: 'br'
|
|
120
|
-
});
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
if ((tagName === 'b' || tagName === 'i') && !isSelfClosing) {
|
|
124
|
-
if (isClosing) {
|
|
125
|
-
const top = stack[stack.length - 1].node;
|
|
126
|
-
if (stack.length > 1 && (top === null || top === void 0 ? void 0 : top.tag) === tagName) {
|
|
127
|
-
stack.pop();
|
|
128
|
-
} else {
|
|
129
|
-
appendTextNode(currentChildren(), fullMatch);
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
if (stack.length - 1 >= MAX_SIMPLE_MARKUP_DEPTH) {
|
|
133
|
-
appendTextNode(currentChildren(), fullMatch);
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const elementNode = {
|
|
137
|
-
type: 'element',
|
|
138
|
-
tag: tagName,
|
|
139
|
-
children: []
|
|
140
|
-
};
|
|
141
|
-
currentChildren().push(elementNode);
|
|
142
|
-
stack.push({
|
|
143
|
-
node: elementNode
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
appendTextNode(currentChildren(), fullMatch);
|
|
149
|
-
}
|
|
150
|
-
appendTextNode(currentChildren(), decodedInput.slice(lastIndex));
|
|
151
|
-
while(stack.length > 1){
|
|
152
|
-
var _stack__node;
|
|
153
|
-
const unclosed = stack.pop();
|
|
154
|
-
const elementNode = unclosed.node;
|
|
155
|
-
if (!elementNode) {
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
var _stack__node_children;
|
|
159
|
-
const parentChildren = (_stack__node_children = (_stack__node = stack[stack.length - 1].node) === null || _stack__node === void 0 ? void 0 : _stack__node.children) !== null && _stack__node_children !== void 0 ? _stack__node_children : rootChildren;
|
|
160
|
-
const lastChild = parentChildren[parentChildren.length - 1];
|
|
161
|
-
if (lastChild === elementNode) {
|
|
162
|
-
parentChildren.pop();
|
|
163
|
-
} else {
|
|
164
|
-
const nodeIndex = parentChildren.indexOf(elementNode);
|
|
165
|
-
if (nodeIndex !== -1) {
|
|
166
|
-
parentChildren.splice(nodeIndex, 1);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
appendTextNode(parentChildren, `<${elementNode.tag}>${serializeSimpleMarkup(elementNode.children)}</${elementNode.tag}>`);
|
|
170
|
-
}
|
|
171
|
-
return rootChildren;
|
|
172
|
-
};
|
|
173
|
-
const simpleMarkupNodesToPlainText = (nodes)=>nodes.map((node)=>{
|
|
174
|
-
if (node.type === 'text') {
|
|
175
|
-
return node.content;
|
|
176
|
-
}
|
|
177
|
-
if (node.type === 'br') {
|
|
178
|
-
return '\n';
|
|
179
|
-
}
|
|
180
|
-
return simpleMarkupNodesToPlainText(node.children);
|
|
181
|
-
}).join('');
|
|
182
|
-
const renderSimpleMarkupNodeList = (nodes, keyPrefix)=>nodes.map((node, index)=>{
|
|
183
|
-
const key = `${keyPrefix}-${index}`;
|
|
184
|
-
if (node.type === 'text') {
|
|
185
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, {
|
|
186
|
-
key: key
|
|
187
|
-
}, node.content);
|
|
188
|
-
}
|
|
189
|
-
if (node.type === 'br') {
|
|
190
|
-
return /*#__PURE__*/ React.createElement("br", {
|
|
191
|
-
key: key
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
const Tag = node.tag === 'b' ? 'strong' : 'em';
|
|
195
|
-
return /*#__PURE__*/ React.createElement(Tag, {
|
|
196
|
-
key
|
|
197
|
-
}, ...renderSimpleMarkupNodeList(node.children, key));
|
|
198
|
-
});
|
|
199
|
-
const renderSimpleMarkup = (nodes, keyPrefix)=>{
|
|
200
|
-
const rendered = renderSimpleMarkupNodeList(nodes, keyPrefix);
|
|
201
|
-
var _rendered_;
|
|
202
|
-
return rendered.length <= 1 ? (_rendered_ = rendered[0]) !== null && _rendered_ !== void 0 ? _rendered_ : null : rendered;
|
|
203
|
-
};
|
|
204
|
-
const normalizeBandOffset = (scale, value)=>{
|
|
205
|
-
const position = scale === null || scale === void 0 ? void 0 : scale(value);
|
|
206
|
-
if (typeof position !== 'number' || Number.isNaN(position)) {
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
209
|
-
if (scale && typeof scale.bandwidth === 'function') {
|
|
210
|
-
return position + scale.bandwidth() / 2;
|
|
211
|
-
}
|
|
212
|
-
return position;
|
|
213
|
-
};
|
|
214
|
-
const clamp = (value, min, max)=>Math.max(min, Math.min(max, value));
|
|
215
|
-
const resolveDataCoordinate = (axis, value, context, yAxis = 'primary')=>{
|
|
216
|
-
if (axis === 'x') {
|
|
217
|
-
const xScale = context.xScale;
|
|
218
|
-
if (!xScale) {
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
const parsedValue = value instanceof Date ? value.getTime() : value;
|
|
222
|
-
return normalizeBandOffset(xScale, parsedValue);
|
|
223
|
-
}
|
|
224
|
-
const yScale = yAxis === 'secondary' ? context.yScaleSecondary : context.yScalePrimary;
|
|
225
|
-
if (!yScale) {
|
|
226
|
-
return undefined;
|
|
227
|
-
}
|
|
228
|
-
const parsedValue = value instanceof Date ? value.getTime() : value;
|
|
229
|
-
return normalizeBandOffset(yScale, parsedValue);
|
|
230
|
-
};
|
|
231
|
-
const resolveAxisCoordinate = (axis, coordinateType, value, context, options = {})=>{
|
|
232
|
-
switch(coordinateType){
|
|
233
|
-
case 'data':
|
|
234
|
-
return resolveDataCoordinate(axis, value, context, options.yAxis);
|
|
235
|
-
case 'relative':
|
|
236
|
-
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
237
|
-
return undefined;
|
|
238
|
-
}
|
|
239
|
-
return axis === 'x' ? context.plotRect.x + context.plotRect.width * value : context.plotRect.y + context.plotRect.height * value;
|
|
240
|
-
case 'pixel':
|
|
241
|
-
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
242
|
-
return undefined;
|
|
243
|
-
}
|
|
244
|
-
return axis === 'x' ? context.plotRect.x + value : context.plotRect.y + value;
|
|
245
|
-
default:
|
|
246
|
-
return undefined;
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
const createMeasurementSignature = (annotationContentSignature, containerStyle, contentStyle, layoutClassName, styleClassName)=>JSON.stringify({
|
|
250
|
-
annotationContentSignature,
|
|
251
|
-
containerStyle,
|
|
252
|
-
contentStyle,
|
|
253
|
-
layoutClassName: layoutClassName !== null && layoutClassName !== void 0 ? layoutClassName : '',
|
|
254
|
-
styleClassName: styleClassName !== null && styleClassName !== void 0 ? styleClassName : ''
|
|
255
|
-
});
|
|
256
|
-
const getCoordinateDescriptor = (coordinates)=>{
|
|
257
|
-
switch(coordinates.type){
|
|
258
|
-
case 'data':
|
|
259
|
-
return {
|
|
260
|
-
xType: 'data',
|
|
261
|
-
yType: 'data',
|
|
262
|
-
yAxis: coordinates.yAxis
|
|
263
|
-
};
|
|
264
|
-
case 'relative':
|
|
265
|
-
return {
|
|
266
|
-
xType: 'relative',
|
|
267
|
-
yType: 'relative'
|
|
268
|
-
};
|
|
269
|
-
case 'pixel':
|
|
270
|
-
return {
|
|
271
|
-
xType: 'pixel',
|
|
272
|
-
yType: 'pixel'
|
|
273
|
-
};
|
|
274
|
-
case 'mixed':
|
|
275
|
-
return {
|
|
276
|
-
xType: coordinates.xCoordinateType,
|
|
277
|
-
yType: coordinates.yCoordinateType,
|
|
278
|
-
yAxis: coordinates.yAxis
|
|
279
|
-
};
|
|
280
|
-
default:
|
|
281
|
-
return undefined;
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
const resolveCoordinates = (annotation, context)=>{
|
|
285
|
-
const { coordinates, layout } = annotation;
|
|
286
|
-
if (!coordinates) {
|
|
287
|
-
return undefined;
|
|
288
|
-
}
|
|
289
|
-
const descriptor = getCoordinateDescriptor(coordinates);
|
|
290
|
-
if (!descriptor) {
|
|
291
|
-
return undefined;
|
|
292
|
-
}
|
|
293
|
-
var _layout_offsetX;
|
|
294
|
-
const offsetX = (_layout_offsetX = layout === null || layout === void 0 ? void 0 : layout.offsetX) !== null && _layout_offsetX !== void 0 ? _layout_offsetX : 0;
|
|
295
|
-
var _layout_offsetY;
|
|
296
|
-
const offsetY = (_layout_offsetY = layout === null || layout === void 0 ? void 0 : layout.offsetY) !== null && _layout_offsetY !== void 0 ? _layout_offsetY : 0;
|
|
297
|
-
const anchorX = resolveAxisCoordinate('x', descriptor.xType, coordinates.x, context);
|
|
298
|
-
const anchorY = resolveAxisCoordinate('y', descriptor.yType, coordinates.y, context, {
|
|
299
|
-
yAxis: descriptor.yAxis
|
|
300
|
-
});
|
|
301
|
-
if (anchorX === undefined || anchorY === undefined) {
|
|
302
|
-
return undefined;
|
|
303
|
-
}
|
|
304
|
-
const anchor = {
|
|
305
|
-
x: anchorX,
|
|
306
|
-
y: anchorY
|
|
307
|
-
};
|
|
308
|
-
let left = anchor.x + offsetX;
|
|
309
|
-
let top = anchor.y + offsetY;
|
|
310
|
-
if (layout === null || layout === void 0 ? void 0 : layout.clipToBounds) {
|
|
311
|
-
left = clamp(left, context.plotRect.x, context.plotRect.x + context.plotRect.width);
|
|
312
|
-
top = clamp(top, context.plotRect.y, context.plotRect.y + context.plotRect.height);
|
|
313
|
-
}
|
|
314
|
-
return {
|
|
315
|
-
anchor,
|
|
316
|
-
point: {
|
|
317
|
-
x: left,
|
|
318
|
-
y: top
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
export const ChartAnnotationLayer = /*#__PURE__*/ React.memo((props)=>{
|
|
323
|
-
const { annotations: annotationsProp, context, hideDefaultStyles } = props;
|
|
324
|
-
const classes = useChartAnnotationLayerStyles(props);
|
|
325
|
-
const idPrefix = useId('chart-annotation');
|
|
326
|
-
const autoKeyPrefix = useId('chart-annotation-item');
|
|
327
|
-
const [measurements, setMeasurements] = React.useState({});
|
|
328
|
-
const resolvedAnnotations = React.useMemo(()=>{
|
|
329
|
-
let fallbackIndex = 0;
|
|
330
|
-
return (annotationsProp !== null && annotationsProp !== void 0 ? annotationsProp : []).map((annotation)=>{
|
|
331
|
-
var _annotation_id;
|
|
332
|
-
return {
|
|
333
|
-
annotation,
|
|
334
|
-
key: (_annotation_id = annotation.id) !== null && _annotation_id !== void 0 ? _annotation_id : `${autoKeyPrefix}-${fallbackIndex++}`
|
|
335
|
-
};
|
|
336
|
-
});
|
|
337
|
-
}, [
|
|
338
|
-
annotationsProp,
|
|
339
|
-
autoKeyPrefix
|
|
340
|
-
]);
|
|
341
|
-
React.useEffect(()=>{
|
|
342
|
-
setMeasurements((prev)=>{
|
|
343
|
-
if (resolvedAnnotations.length === 0) {
|
|
344
|
-
if (Object.keys(prev).length === 0) {
|
|
345
|
-
return prev;
|
|
346
|
-
}
|
|
347
|
-
return {};
|
|
348
|
-
}
|
|
349
|
-
const next = {};
|
|
350
|
-
resolvedAnnotations.forEach(({ key })=>{
|
|
351
|
-
if (prev[key]) {
|
|
352
|
-
next[key] = prev[key];
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
if (Object.keys(next).length === Object.keys(prev).length) {
|
|
356
|
-
let identical = true;
|
|
357
|
-
for (const key of Object.keys(next)){
|
|
358
|
-
if (next[key] !== prev[key]) {
|
|
359
|
-
identical = false;
|
|
360
|
-
break;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (identical) {
|
|
364
|
-
return prev;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
return next;
|
|
368
|
-
});
|
|
369
|
-
}, [
|
|
370
|
-
resolvedAnnotations
|
|
371
|
-
]);
|
|
372
|
-
const updateMeasurement = React.useCallback((key, width, height, signature)=>{
|
|
373
|
-
setMeasurements((prev)=>{
|
|
374
|
-
const prevEntry = prev[key];
|
|
375
|
-
if (prevEntry && prevEntry.signature === signature && Math.abs(prevEntry.width - width) < 0.5 && Math.abs(prevEntry.height - height) < 0.5) {
|
|
376
|
-
return prev;
|
|
377
|
-
}
|
|
378
|
-
if (width === 0 && height === 0) {
|
|
379
|
-
return prev;
|
|
380
|
-
}
|
|
381
|
-
return {
|
|
382
|
-
...prev,
|
|
383
|
-
[key]: {
|
|
384
|
-
width,
|
|
385
|
-
height,
|
|
386
|
-
signature
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
});
|
|
390
|
-
}, []);
|
|
391
|
-
const annotationForeignObjects = [];
|
|
392
|
-
const measurementElements = [];
|
|
393
|
-
const connectors = [];
|
|
394
|
-
resolvedAnnotations.forEach(({ annotation, key })=>{
|
|
395
|
-
var _annotation_style, _annotation_style1, _annotation_style2, _annotation_style3, _annotation_style4, _annotation_style5, _annotation_style6, _annotation_style7, _annotation_style8, _annotation_style9, _annotation_style10, _annotation_style11, _annotation_style12, _annotation_style13, _annotation_style14, _annotation_style15, _annotation_style16, _annotation_style17, _annotation_style18, _annotation_accessibility, _annotation_accessibility1, _annotation_accessibility2;
|
|
396
|
-
const resolved = resolveCoordinates(annotation, context);
|
|
397
|
-
if (!resolved) {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
const rawAnnotationText = annotation.text === undefined || annotation.text === null ? '' : String(annotation.text);
|
|
401
|
-
const annotationMarkupNodes = parseSimpleMarkup(rawAnnotationText);
|
|
402
|
-
const annotationMarkupSignature = JSON.stringify(annotationMarkupNodes);
|
|
403
|
-
const annotationPlainText = simpleMarkupNodesToPlainText(annotationMarkupNodes);
|
|
404
|
-
const layout = annotation.layout;
|
|
405
|
-
var _layout_align;
|
|
406
|
-
const horizontalAlign = (_layout_align = layout === null || layout === void 0 ? void 0 : layout.align) !== null && _layout_align !== void 0 ? _layout_align : DEFAULT_HORIZONTAL_ALIGN;
|
|
407
|
-
var _layout_verticalAlign;
|
|
408
|
-
const verticalAlign = (_layout_verticalAlign = layout === null || layout === void 0 ? void 0 : layout.verticalAlign) !== null && _layout_verticalAlign !== void 0 ? _layout_verticalAlign : DEFAULT_VERTICAL_ALIGN;
|
|
409
|
-
var _annotation_style_opacity;
|
|
410
|
-
const backgroundOpacity = (_annotation_style_opacity = (_annotation_style = annotation.style) === null || _annotation_style === void 0 ? void 0 : _annotation_style.opacity) !== null && _annotation_style_opacity !== void 0 ? _annotation_style_opacity : DEFAULT_ANNOTATION_BACKGROUND_OPACITY;
|
|
411
|
-
const baseBackgroundColor = (_annotation_style1 = annotation.style) === null || _annotation_style1 === void 0 ? void 0 : _annotation_style1.backgroundColor;
|
|
412
|
-
const hasCustomBackground = ((_annotation_style2 = annotation.style) === null || _annotation_style2 === void 0 ? void 0 : _annotation_style2.backgroundColor) !== undefined || ((_annotation_style3 = annotation.style) === null || _annotation_style3 === void 0 ? void 0 : _annotation_style3.opacity) !== undefined;
|
|
413
|
-
var _annotation_style_borderStyle;
|
|
414
|
-
const containerStyle = {
|
|
415
|
-
maxWidth: layout === null || layout === void 0 ? void 0 : layout.maxWidth,
|
|
416
|
-
...hasCustomBackground ? {
|
|
417
|
-
backgroundColor: applyOpacityToColor(baseBackgroundColor, backgroundOpacity, {
|
|
418
|
-
preserveOriginalOpacity: ((_annotation_style4 = annotation.style) === null || _annotation_style4 === void 0 ? void 0 : _annotation_style4.opacity) === undefined
|
|
419
|
-
})
|
|
420
|
-
} : hideDefaultStyles ? {} : {
|
|
421
|
-
backgroundColor: applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY)
|
|
422
|
-
},
|
|
423
|
-
borderColor: (_annotation_style5 = annotation.style) === null || _annotation_style5 === void 0 ? void 0 : _annotation_style5.borderColor,
|
|
424
|
-
borderWidth: (_annotation_style6 = annotation.style) === null || _annotation_style6 === void 0 ? void 0 : _annotation_style6.borderWidth,
|
|
425
|
-
borderStyle: (_annotation_style_borderStyle = (_annotation_style7 = annotation.style) === null || _annotation_style7 === void 0 ? void 0 : _annotation_style7.borderStyle) !== null && _annotation_style_borderStyle !== void 0 ? _annotation_style_borderStyle : ((_annotation_style8 = annotation.style) === null || _annotation_style8 === void 0 ? void 0 : _annotation_style8.borderColor) ? 'solid' : undefined,
|
|
426
|
-
borderRadius: (_annotation_style9 = annotation.style) === null || _annotation_style9 === void 0 ? void 0 : _annotation_style9.borderRadius,
|
|
427
|
-
padding: (_annotation_style10 = annotation.style) === null || _annotation_style10 === void 0 ? void 0 : _annotation_style10.padding,
|
|
428
|
-
boxShadow: (_annotation_style11 = annotation.style) === null || _annotation_style11 === void 0 ? void 0 : _annotation_style11.boxShadow
|
|
429
|
-
};
|
|
430
|
-
const contentStyle = {
|
|
431
|
-
color: (_annotation_style12 = annotation.style) === null || _annotation_style12 === void 0 ? void 0 : _annotation_style12.textColor,
|
|
432
|
-
fontSize: (_annotation_style13 = annotation.style) === null || _annotation_style13 === void 0 ? void 0 : _annotation_style13.fontSize,
|
|
433
|
-
fontWeight: (_annotation_style14 = annotation.style) === null || _annotation_style14 === void 0 ? void 0 : _annotation_style14.fontWeight,
|
|
434
|
-
opacity: 1
|
|
435
|
-
};
|
|
436
|
-
if (typeof ((_annotation_style15 = annotation.style) === null || _annotation_style15 === void 0 ? void 0 : _annotation_style15.rotation) === 'number' && !Number.isNaN(annotation.style.rotation)) {
|
|
437
|
-
containerStyle.transform = `rotate(${annotation.style.rotation}deg)`;
|
|
438
|
-
containerStyle.transformOrigin = '50% 50%';
|
|
439
|
-
}
|
|
440
|
-
const measurementSignature = createMeasurementSignature(annotationMarkupSignature, containerStyle, contentStyle, layout === null || layout === void 0 ? void 0 : layout.className, (_annotation_style16 = annotation.style) === null || _annotation_style16 === void 0 ? void 0 : _annotation_style16.className);
|
|
441
|
-
const measurementEntry = measurements[key];
|
|
442
|
-
const isMeasurementValid = (measurementEntry === null || measurementEntry === void 0 ? void 0 : measurementEntry.signature) === measurementSignature;
|
|
443
|
-
const measuredSize = isMeasurementValid ? measurementEntry : undefined;
|
|
444
|
-
var _measuredSize_width, _ref;
|
|
445
|
-
const width = Math.max((_ref = (_measuredSize_width = measuredSize === null || measuredSize === void 0 ? void 0 : measuredSize.width) !== null && _measuredSize_width !== void 0 ? _measuredSize_width : layout === null || layout === void 0 ? void 0 : layout.maxWidth) !== null && _ref !== void 0 ? _ref : DEFAULT_FOREIGN_OBJECT_WIDTH, 1);
|
|
446
|
-
var _measuredSize_height;
|
|
447
|
-
const height = Math.max((_measuredSize_height = measuredSize === null || measuredSize === void 0 ? void 0 : measuredSize.height) !== null && _measuredSize_height !== void 0 ? _measuredSize_height : DEFAULT_FOREIGN_OBJECT_HEIGHT, 1);
|
|
448
|
-
const offsetX = horizontalAlign === 'center' ? -width / 2 : horizontalAlign === 'end' ? -width : 0;
|
|
449
|
-
const offsetY = verticalAlign === 'middle' ? -height / 2 : verticalAlign === 'bottom' ? -height : 0;
|
|
450
|
-
const baseTopLeftX = resolved.point.x + offsetX;
|
|
451
|
-
const baseTopLeftY = resolved.point.y + offsetY;
|
|
452
|
-
const usePlotBounds = (layout === null || layout === void 0 ? void 0 : layout.clipToBounds) !== false;
|
|
453
|
-
const viewportX = usePlotBounds ? context.plotRect.x : 0;
|
|
454
|
-
const viewportY = usePlotBounds ? context.plotRect.y : 0;
|
|
455
|
-
var _context_svgRect_width;
|
|
456
|
-
const viewportWidth = usePlotBounds ? context.plotRect.width : (_context_svgRect_width = context.svgRect.width) !== null && _context_svgRect_width !== void 0 ? _context_svgRect_width : 0;
|
|
457
|
-
var _context_svgRect_height;
|
|
458
|
-
const viewportHeight = usePlotBounds ? context.plotRect.height : (_context_svgRect_height = context.svgRect.height) !== null && _context_svgRect_height !== void 0 ? _context_svgRect_height : 0;
|
|
459
|
-
const maxTopLeftX = viewportWidth > 0 ? viewportX + viewportWidth - width : baseTopLeftX;
|
|
460
|
-
const maxTopLeftY = viewportHeight > 0 ? viewportY + viewportHeight - height : baseTopLeftY;
|
|
461
|
-
let topLeftX = viewportWidth > 0 ? clamp(baseTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : baseTopLeftX;
|
|
462
|
-
let topLeftY = viewportHeight > 0 ? clamp(baseTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : baseTopLeftY;
|
|
463
|
-
let displayPoint = {
|
|
464
|
-
x: topLeftX - offsetX,
|
|
465
|
-
y: topLeftY - offsetY
|
|
466
|
-
};
|
|
467
|
-
if (annotation.connector) {
|
|
468
|
-
var _annotation_connector_startPadding;
|
|
469
|
-
const startPadding = (_annotation_connector_startPadding = annotation.connector.startPadding) !== null && _annotation_connector_startPadding !== void 0 ? _annotation_connector_startPadding : 12;
|
|
470
|
-
var _annotation_connector_endPadding;
|
|
471
|
-
const endPadding = (_annotation_connector_endPadding = annotation.connector.endPadding) !== null && _annotation_connector_endPadding !== void 0 ? _annotation_connector_endPadding : 0;
|
|
472
|
-
const minArrowClearance = 6;
|
|
473
|
-
const minDistance = Math.max(startPadding + endPadding + minArrowClearance, startPadding);
|
|
474
|
-
const dx = displayPoint.x - resolved.anchor.x;
|
|
475
|
-
const dy = displayPoint.y - resolved.anchor.y;
|
|
476
|
-
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
477
|
-
if (distance < minDistance) {
|
|
478
|
-
const fallbackDirection = {
|
|
479
|
-
x: 0,
|
|
480
|
-
y: -1
|
|
481
|
-
};
|
|
482
|
-
const ux = distance === 0 ? fallbackDirection.x : dx / distance;
|
|
483
|
-
const uy = distance === 0 ? fallbackDirection.y : dy / distance;
|
|
484
|
-
const desiredDisplayX = resolved.anchor.x + ux * minDistance;
|
|
485
|
-
const desiredDisplayY = resolved.anchor.y + uy * minDistance;
|
|
486
|
-
let desiredTopLeftX = desiredDisplayX + offsetX;
|
|
487
|
-
let desiredTopLeftY = desiredDisplayY + offsetY;
|
|
488
|
-
desiredTopLeftX = viewportWidth > 0 ? clamp(desiredTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : desiredTopLeftX;
|
|
489
|
-
desiredTopLeftY = viewportHeight > 0 ? clamp(desiredTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : desiredTopLeftY;
|
|
490
|
-
topLeftX = desiredTopLeftX;
|
|
491
|
-
topLeftY = desiredTopLeftY;
|
|
492
|
-
displayPoint = {
|
|
493
|
-
x: topLeftX - offsetX,
|
|
494
|
-
y: topLeftY - offsetY
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
const measurementStyle = {
|
|
499
|
-
position: 'absolute',
|
|
500
|
-
left: topLeftX,
|
|
501
|
-
top: topLeftY,
|
|
502
|
-
pointerEvents: 'none',
|
|
503
|
-
visibility: 'hidden',
|
|
504
|
-
...containerStyle
|
|
505
|
-
};
|
|
506
|
-
const annotationClass = hideDefaultStyles ? classes.annotationNoDefaults : classes.annotation;
|
|
507
|
-
if (!isMeasurementValid) {
|
|
508
|
-
var _annotation_style19, _annotation_style20;
|
|
509
|
-
measurementElements.push(/*#__PURE__*/ React.createElement("div", {
|
|
510
|
-
key: `${key}-measurement`,
|
|
511
|
-
ref: (node)=>{
|
|
512
|
-
if (node) {
|
|
513
|
-
const rect = node.getBoundingClientRect();
|
|
514
|
-
if (rect.width !== 0 || rect.height !== 0) {
|
|
515
|
-
updateMeasurement(key, rect.width, rect.height, measurementSignature);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
className: mergeClasses(annotationClass, classes.measurement, layout === null || layout === void 0 ? void 0 : layout.className, (_annotation_style19 = annotation.style) === null || _annotation_style19 === void 0 ? void 0 : _annotation_style19.className),
|
|
520
|
-
style: measurementStyle,
|
|
521
|
-
"aria-hidden": true,
|
|
522
|
-
"data-annotation-key": key,
|
|
523
|
-
"data-chart-annotation-measurement": "true"
|
|
524
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
525
|
-
className: mergeClasses(classes.annotationContent, layout === null || layout === void 0 ? void 0 : layout.className, (_annotation_style20 = annotation.style) === null || _annotation_style20 === void 0 ? void 0 : _annotation_style20.className),
|
|
526
|
-
style: contentStyle
|
|
527
|
-
}, renderSimpleMarkup(annotationMarkupNodes, `${key}-measurement`))));
|
|
528
|
-
}
|
|
529
|
-
var _annotation_accessibility_role, _annotation_accessibility_ariaLabel;
|
|
530
|
-
annotationForeignObjects.push(/*#__PURE__*/ React.createElement("foreignObject", {
|
|
531
|
-
key: `${key}-annotation`,
|
|
532
|
-
x: topLeftX,
|
|
533
|
-
y: topLeftY,
|
|
534
|
-
width: width,
|
|
535
|
-
height: height,
|
|
536
|
-
className: mergeClasses(classes.annotationForeignObject),
|
|
537
|
-
"data-annotation-key": key
|
|
538
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
539
|
-
className: mergeClasses(annotationClass, layout === null || layout === void 0 ? void 0 : layout.className, (_annotation_style17 = annotation.style) === null || _annotation_style17 === void 0 ? void 0 : _annotation_style17.className),
|
|
540
|
-
style: containerStyle,
|
|
541
|
-
"data-annotation-key": key
|
|
542
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
543
|
-
className: mergeClasses(classes.annotationContent, classes.annotationContentInteractive, (_annotation_style18 = annotation.style) === null || _annotation_style18 === void 0 ? void 0 : _annotation_style18.className),
|
|
544
|
-
style: contentStyle,
|
|
545
|
-
role: (_annotation_accessibility_role = (_annotation_accessibility = annotation.accessibility) === null || _annotation_accessibility === void 0 ? void 0 : _annotation_accessibility.role) !== null && _annotation_accessibility_role !== void 0 ? _annotation_accessibility_role : 'note',
|
|
546
|
-
"aria-label": (_annotation_accessibility_ariaLabel = (_annotation_accessibility1 = annotation.accessibility) === null || _annotation_accessibility1 === void 0 ? void 0 : _annotation_accessibility1.ariaLabel) !== null && _annotation_accessibility_ariaLabel !== void 0 ? _annotation_accessibility_ariaLabel : annotationPlainText ? annotationPlainText : undefined,
|
|
547
|
-
"aria-describedby": (_annotation_accessibility2 = annotation.accessibility) === null || _annotation_accessibility2 === void 0 ? void 0 : _annotation_accessibility2.ariaDescribedBy,
|
|
548
|
-
tabIndex: 0,
|
|
549
|
-
"data-chart-annotation": "true",
|
|
550
|
-
"data-annotation-key": key
|
|
551
|
-
}, renderSimpleMarkup(annotationMarkupNodes, `${key}-content`)))));
|
|
552
|
-
if (annotation.connector) {
|
|
553
|
-
const { startPadding = DEFAULT_CONNECTOR_START_PADDING, endPadding = DEFAULT_CONNECTOR_END_PADDING, strokeColor = getDefaultConnectorStrokeColor(), strokeWidth = DEFAULT_CONNECTOR_STROKE_WIDTH, dashArray, arrow = DEFAULT_CONNECTOR_ARROW } = annotation.connector;
|
|
554
|
-
const dx = resolved.anchor.x - displayPoint.x;
|
|
555
|
-
const dy = resolved.anchor.y - displayPoint.y;
|
|
556
|
-
const distance = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
557
|
-
const ux = dx / distance;
|
|
558
|
-
const uy = dy / distance;
|
|
559
|
-
const sizeBasis = Math.max(1, Math.min(width, height));
|
|
560
|
-
const proportionalSize = sizeBasis * ARROW_SIZE_SCALE;
|
|
561
|
-
const maxByPadding = startPadding > 0 ? startPadding * 1.25 : MAX_ARROW_SIZE;
|
|
562
|
-
const maxByDistance = distance * 0.6;
|
|
563
|
-
const markerSize = clamp(proportionalSize, MIN_ARROW_SIZE, Math.min(MAX_ARROW_SIZE, maxByPadding, maxByDistance));
|
|
564
|
-
const markerStrokeWidth = clamp(strokeWidth, 1, markerSize / 2);
|
|
565
|
-
const start = {
|
|
566
|
-
x: displayPoint.x + ux * startPadding,
|
|
567
|
-
y: displayPoint.y + uy * startPadding
|
|
568
|
-
};
|
|
569
|
-
const end = {
|
|
570
|
-
x: resolved.anchor.x - ux * endPadding,
|
|
571
|
-
y: resolved.anchor.y - uy * endPadding
|
|
572
|
-
};
|
|
573
|
-
connectors.push({
|
|
574
|
-
key: `${key}-connector`,
|
|
575
|
-
start,
|
|
576
|
-
end,
|
|
577
|
-
strokeColor,
|
|
578
|
-
strokeWidth,
|
|
579
|
-
dashArray,
|
|
580
|
-
arrow,
|
|
581
|
-
markerSize,
|
|
582
|
-
markerStrokeWidth
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
if (annotationForeignObjects.length === 0 && connectors.length === 0) {
|
|
587
|
-
return null;
|
|
588
|
-
}
|
|
589
|
-
const viewBoxWidth = context.svgRect.width || 1;
|
|
590
|
-
const viewBoxHeight = context.svgRect.height || 1;
|
|
591
|
-
const markerDefs = [];
|
|
592
|
-
const createMarkerId = (color, position, size, markerStrokeWidth)=>{
|
|
593
|
-
const id = `${idPrefix}-${position}-${markerDefs.length}`;
|
|
594
|
-
const refY = size / 2;
|
|
595
|
-
const refX = position === 'end' ? size : 0;
|
|
596
|
-
const pathEnd = `M0 0 L ${size} ${refY} L0 ${size} Z`;
|
|
597
|
-
const pathStart = `M ${size} 0 L0 ${refY} L ${size} ${size} Z`;
|
|
598
|
-
const path = position === 'end' ? pathEnd : pathStart;
|
|
599
|
-
markerDefs.push(/*#__PURE__*/ React.createElement("marker", {
|
|
600
|
-
key: id,
|
|
601
|
-
id: id,
|
|
602
|
-
markerWidth: size,
|
|
603
|
-
markerHeight: size,
|
|
604
|
-
viewBox: `0 0 ${size} ${size}`,
|
|
605
|
-
refX: refX,
|
|
606
|
-
refY: refY,
|
|
607
|
-
orient: "auto",
|
|
608
|
-
markerUnits: "userSpaceOnUse"
|
|
609
|
-
}, /*#__PURE__*/ React.createElement("path", {
|
|
610
|
-
d: path,
|
|
611
|
-
fill: color,
|
|
612
|
-
stroke: color,
|
|
613
|
-
strokeWidth: markerStrokeWidth,
|
|
614
|
-
strokeLinecap: "round",
|
|
615
|
-
strokeLinejoin: "round"
|
|
616
|
-
})));
|
|
617
|
-
return id;
|
|
618
|
-
};
|
|
619
|
-
const connectorElements = connectors.map((connector)=>{
|
|
620
|
-
let markerStart;
|
|
621
|
-
let markerEnd;
|
|
622
|
-
if (connector.arrow === 'start' || connector.arrow === 'both') {
|
|
623
|
-
markerStart = createMarkerId(connector.strokeColor, 'start', connector.markerSize, connector.markerStrokeWidth);
|
|
624
|
-
}
|
|
625
|
-
if (connector.arrow === 'end' || connector.arrow === 'both') {
|
|
626
|
-
markerEnd = createMarkerId(connector.strokeColor, 'end', connector.markerSize, connector.markerStrokeWidth);
|
|
627
|
-
}
|
|
628
|
-
return /*#__PURE__*/ React.createElement("line", {
|
|
629
|
-
key: connector.key,
|
|
630
|
-
x1: connector.start.x,
|
|
631
|
-
y1: connector.start.y,
|
|
632
|
-
x2: connector.end.x,
|
|
633
|
-
y2: connector.end.y,
|
|
634
|
-
stroke: connector.strokeColor,
|
|
635
|
-
strokeWidth: connector.strokeWidth,
|
|
636
|
-
strokeDasharray: connector.dashArray,
|
|
637
|
-
strokeLinecap: "round",
|
|
638
|
-
markerStart: markerStart ? `url(#${markerStart})` : undefined,
|
|
639
|
-
markerEnd: markerEnd ? `url(#${markerEnd})` : undefined
|
|
640
|
-
});
|
|
641
|
-
});
|
|
642
|
-
const shouldRenderSvg = connectors.length > 0 || annotationForeignObjects.length > 0;
|
|
643
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
644
|
-
className: classes.root,
|
|
645
|
-
role: "presentation",
|
|
646
|
-
"data-chart-annotation-layer": "true"
|
|
647
|
-
}, shouldRenderSvg && /*#__PURE__*/ React.createElement("svg", {
|
|
648
|
-
className: classes.connectorLayer,
|
|
649
|
-
width: "100%",
|
|
650
|
-
height: "100%",
|
|
651
|
-
viewBox: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
|
|
652
|
-
preserveAspectRatio: "none",
|
|
653
|
-
"data-chart-annotation-svg": "true"
|
|
654
|
-
}, markerDefs.length > 0 && /*#__PURE__*/ React.createElement("defs", null, markerDefs), connectorElements.length > 0 && /*#__PURE__*/ React.createElement("g", {
|
|
655
|
-
"aria-hidden": "true",
|
|
656
|
-
className: classes.connectorGroup
|
|
657
|
-
}, connectorElements), annotationForeignObjects), measurementElements);
|
|
658
|
-
});
|
|
659
|
-
ChartAnnotationLayer.displayName = 'ChartAnnotationLayer';
|