@fluentui/react-charts 9.2.3 → 9.3.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 +79 -10
- package/dist/index.d.ts +98 -5
- package/lib/components/AreaChart/AreaChart.js +8 -6
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +4 -2
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +4 -15
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +95 -8
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +5 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +45 -42
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +14 -5
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +19 -14
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +7 -33
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +5 -3
- 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 +56 -16
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +19 -0
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1096 -337
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/imageExporter.js +1 -0
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +8 -8
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +9 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +61 -25
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +1 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +23 -4
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +11 -5
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +2 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +1 -0
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +2 -2
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +2 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +6 -17
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +5 -21
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +2 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +8 -2
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
- 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/useHorizontalBarChartWithAxisStyles.styles.js +2 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.js +1 -0
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js +1 -0
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/shape.js +1 -0
- package/lib/components/Legends/shape.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +2 -0
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +1 -0
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +284 -281
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +1 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js +1 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +25 -10
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +5 -21
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +2 -0
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js +1 -0
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -0
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +14 -25
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +3 -12
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +121 -81
- 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 -7
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +5 -22
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +1 -0
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +17 -12
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +10 -6
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +6 -19
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +30 -25
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +9 -6
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +5 -19
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/types/DataPoint.js +3 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/Common.styles.js +47 -0
- package/lib/utilities/Common.styles.js.map +1 -0
- package/lib/utilities/Common.styles.raw.js +47 -0
- package/lib/utilities/Common.styles.raw.js.map +1 -0
- package/lib/utilities/FocusableTooltipText.js +1 -0
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +1 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/image-export-utils.js +1 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.js +52 -0
- package/lib/utilities/scatterpolar-utils.js.map +1 -0
- package/lib/utilities/utilities.js +314 -146
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +7 -5
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -14
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +95 -8
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +4 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +45 -42
- 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/ChartPopover.js +14 -5
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +16 -13
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +5 -32
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +4 -3
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +60 -20
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +22 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1109 -338
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +8 -8
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +11 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +61 -25
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +33 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +11 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +1 -0
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -2
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -19
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -20
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -2
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
- 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/useHorizontalBarChartWithAxisStyles.styles.js +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +1 -0
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js +1 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/shape.js +1 -0
- package/lib-commonjs/components/Legends/shape.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +282 -279
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +31 -9
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -20
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +2 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +24 -33
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +118 -78
- 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 +14 -7
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -20
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +16 -11
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +6 -3
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +4 -17
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -24
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +6 -3
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -18
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +3 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +71 -0
- package/lib-commonjs/utilities/Common.styles.js.map +1 -0
- package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js +2 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +1 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +327 -137
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { useLineChartStyles } from './useLineChartStyles.styles';
|
|
3
4
|
import { select as d3Select, pointer } from 'd3-selection';
|
|
4
5
|
import { bisector } from 'd3-array';
|
|
5
6
|
import { Legends } from '../Legends/index';
|
|
6
7
|
import { line as d3Line } from 'd3-shape';
|
|
7
|
-
import { max as d3Max
|
|
8
|
+
import { max as d3Max } from 'd3-array';
|
|
8
9
|
import { useId } from '@fluentui/react-utilities';
|
|
9
10
|
import { find } from '../../utilities/index';
|
|
10
11
|
import { CartesianChart } from '../../index';
|
|
11
12
|
import { EventsAnnotation } from './eventAnnotation/EventAnnotation';
|
|
12
13
|
import { tokens } from '@fluentui/react-theme';
|
|
13
|
-
import { calloutData, ChartTypes, getXAxisType, XAxisTypes, tooltipOfAxislabels, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis,
|
|
14
|
+
import { calloutData, ChartTypes, getXAxisType, XAxisTypes, tooltipOfAxislabels, Points, pointTypes, getTypeOfAxis, getNextColor, getColorFromToken, findNumericMinMaxOfY, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfNumericForAreaLineScatterCharts, createStringYAxis, useRtl, getCurveFactory, isScatterPolarSeries, getDomainPaddingForMarkers, isPlottable, getRangeForScatterMarkerSize } from '../../utilities/index';
|
|
14
15
|
import { toImage } from '../../utilities/image-export-utils';
|
|
16
|
+
import { renderScatterPolarCategoryLabels } from '../../utilities/scatterpolar-utils';
|
|
17
|
+
import { formatDateToLocaleString } from '@fluentui/chart-utilities';
|
|
15
18
|
var PointSize = /*#__PURE__*/ function(PointSize) {
|
|
16
19
|
PointSize[PointSize["hoverSize"] = 11] = "hoverSize";
|
|
17
20
|
PointSize[PointSize["invisibleSize"] = 1] = "invisibleSize";
|
|
@@ -91,6 +94,8 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
91
94
|
*/ export const LineChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
92
95
|
var _props_legendProps_selectedLegends, _props_legendProps;
|
|
93
96
|
let _hasMarkersMode = false;
|
|
97
|
+
let _isXAxisDateType = false;
|
|
98
|
+
let _isScatterPolar = false;
|
|
94
99
|
let _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
|
|
95
100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
101
|
let _calloutPoints = calloutData(_points) || [];
|
|
@@ -119,11 +124,6 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
119
124
|
const _isRTL = useRtl();
|
|
120
125
|
let xAxisCalloutAccessibilityData = {};
|
|
121
126
|
const cartesianChartRef = React.useRef(null);
|
|
122
|
-
let _xMin = Number.NEGATIVE_INFINITY;
|
|
123
|
-
let _yMin = Number.NEGATIVE_INFINITY;
|
|
124
|
-
let _xMax = Number.POSITIVE_INFINITY;
|
|
125
|
-
let _xPadding = 0;
|
|
126
|
-
let _yPadding = 0;
|
|
127
127
|
let _yScaleSecondary;
|
|
128
128
|
const _legendsRef = React.useRef(null);
|
|
129
129
|
props.eventAnnotationProps && props.eventAnnotationProps.labelHeight && (eventLabelHeight = props.eventAnnotationProps.labelHeight);
|
|
@@ -144,6 +144,9 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
144
144
|
y: 0
|
|
145
145
|
});
|
|
146
146
|
const [isPopoverOpen, setPopoverOpen] = React.useState(false);
|
|
147
|
+
const [YValue, setYValue] = React.useState('');
|
|
148
|
+
const [legendVal, setLegendVal] = React.useState('');
|
|
149
|
+
const [lineColor, setLineColor] = React.useState('');
|
|
147
150
|
const pointsRef = React.useRef([]);
|
|
148
151
|
const calloutPointsRef = React.useRef([]);
|
|
149
152
|
const classes = useLineChartStyles(props);
|
|
@@ -172,14 +175,10 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
172
175
|
}, []);
|
|
173
176
|
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
|
|
174
177
|
let domainNRangeValue;
|
|
175
|
-
if (
|
|
176
|
-
domainNRangeValue =
|
|
177
|
-
} else if (_hasMarkersMode && xAxisType === XAxisTypes.DateAxis) {
|
|
178
|
-
domainNRangeValue = _getDomainNRangeValuesOfDateWithPadding(points, margins, width, isRTL, tickValues, chartType, barWidth);
|
|
179
|
-
} else if (xAxisType === XAxisTypes.NumericAxis) {
|
|
180
|
-
domainNRangeValue = domainRangeOfNumericForAreaChart(points, margins, width, isRTL);
|
|
178
|
+
if (xAxisType === XAxisTypes.NumericAxis) {
|
|
179
|
+
domainNRangeValue = domainRangeOfNumericForAreaLineScatterCharts(points, margins, width, isRTL, props.xScaleType, _hasMarkersMode);
|
|
181
180
|
} else if (xAxisType === XAxisTypes.DateAxis) {
|
|
182
|
-
domainNRangeValue =
|
|
181
|
+
domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(points, margins, width, isRTL, tickValues, chartType, barWidth, _hasMarkersMode);
|
|
183
182
|
} else {
|
|
184
183
|
domainNRangeValue = {
|
|
185
184
|
dStartValue: 0,
|
|
@@ -202,6 +201,7 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
202
201
|
var _item_lineOptions_mode_includes, _item_lineOptions_mode, _item_lineOptions;
|
|
203
202
|
return (_item_lineOptions = item.lineOptions) === null || _item_lineOptions === void 0 ? void 0 : (_item_lineOptions_mode = _item_lineOptions.mode) === null || _item_lineOptions_mode === void 0 ? void 0 : (_item_lineOptions_mode_includes = _item_lineOptions_mode.includes) === null || _item_lineOptions_mode_includes === void 0 ? void 0 : _item_lineOptions_mode_includes.call(_item_lineOptions_mode, 'markers');
|
|
204
203
|
})) !== null && _filteredData_some !== void 0 ? _filteredData_some : false;
|
|
204
|
+
_isScatterPolar = isScatterPolarSeries(filteredData);
|
|
205
205
|
return filteredData ? filteredData.map((item, index)=>{
|
|
206
206
|
let color;
|
|
207
207
|
if (typeof item.color === 'undefined') {
|
|
@@ -233,16 +233,19 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
233
233
|
function _getCustomizedCallout() {
|
|
234
234
|
return props.onRenderCalloutPerStack ? props.onRenderCalloutPerStack(stackCalloutProps) : props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps) : null;
|
|
235
235
|
}
|
|
236
|
-
function _getNumericMinMaxOfY(points) {
|
|
236
|
+
function _getNumericMinMaxOfY(points, yAxisType, useSecondaryYScale) {
|
|
237
237
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
238
|
-
const { startValue, endValue } = findNumericMinMaxOfY(points);
|
|
239
|
-
|
|
238
|
+
const { startValue, endValue } = findNumericMinMaxOfY(points, yAxisType, useSecondaryYScale, useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType);
|
|
239
|
+
let yPadding = {
|
|
240
|
+
start: 0,
|
|
241
|
+
end: 0
|
|
242
|
+
};
|
|
240
243
|
if (_hasMarkersMode) {
|
|
241
|
-
|
|
244
|
+
yPadding = getDomainPaddingForMarkers(startValue, endValue, useSecondaryYScale ? props.secondaryYScaleType : props.yScaleType);
|
|
242
245
|
}
|
|
243
246
|
return {
|
|
244
|
-
startValue: startValue -
|
|
245
|
-
endValue: endValue +
|
|
247
|
+
startValue: startValue - yPadding.start,
|
|
248
|
+
endValue: endValue + yPadding.end
|
|
246
249
|
};
|
|
247
250
|
}
|
|
248
251
|
function _getMargins(_margins) {
|
|
@@ -404,11 +407,6 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
404
407
|
}
|
|
405
408
|
}
|
|
406
409
|
}
|
|
407
|
-
function _getRangeForScatterMarkerSize(yScale, yPadding) {
|
|
408
|
-
const extraXPixels = _isRTL ? _xAxisScale(_xMax - _xPadding) - _xAxisScale(_xMax) : _xAxisScale(_xMin + _xPadding) - _xAxisScale(_xMin);
|
|
409
|
-
const extraYPixels = yScale(_yMin) - yScale(_yMin + _yPadding);
|
|
410
|
-
return Math.min(extraXPixels, extraYPixels);
|
|
411
|
-
}
|
|
412
410
|
function _createLines(xElement, containerHeight) {
|
|
413
411
|
const lines = [];
|
|
414
412
|
if (isSelectedLegend) {
|
|
@@ -416,7 +414,6 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
416
414
|
} else {
|
|
417
415
|
_points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
|
|
418
416
|
}
|
|
419
|
-
const extraMaxPixels = _hasMarkersMode ? _getRangeForScatterMarkerSize(_yScalePrimary, _yPadding) : 0;
|
|
420
417
|
const maxMarkerSize = d3Max(_points, (point)=>{
|
|
421
418
|
return d3Max(point.data, (item)=>{
|
|
422
419
|
return item.markerSize;
|
|
@@ -430,44 +427,64 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
430
427
|
const legendVal = _points[i].legend;
|
|
431
428
|
const lineColor = _points[i].color;
|
|
432
429
|
const verticaLineHeight = containerHeight - margins.bottom + 6;
|
|
433
|
-
const
|
|
430
|
+
const useSecondaryYScale = !!(_points[i].useSecondaryYScale && _yScaleSecondary);
|
|
431
|
+
const yScale = useSecondaryYScale ? _yScaleSecondary : _yScalePrimary;
|
|
432
|
+
const extraMaxPixels = _hasMarkersMode ? getRangeForScatterMarkerSize({
|
|
433
|
+
data: _points,
|
|
434
|
+
xScale: _xAxisScale,
|
|
435
|
+
yScalePrimary: _yScalePrimary,
|
|
436
|
+
yScaleSecondary: _yScaleSecondary,
|
|
437
|
+
useSecondaryYScale,
|
|
438
|
+
xScaleType: props.xScaleType,
|
|
439
|
+
yScaleType: props.yScaleType,
|
|
440
|
+
secondaryYScaleType: props.secondaryYScaleType
|
|
441
|
+
}) : 0;
|
|
434
442
|
if (_points[i].data.length === 1) {
|
|
435
443
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
436
444
|
const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[0];
|
|
437
|
-
const
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
445
|
+
const xPoint = _xAxisScale(x1);
|
|
446
|
+
const yPoint = yScale(y1);
|
|
447
|
+
if (isPlottable(xPoint, yPoint)) {
|
|
448
|
+
var _points_i_lineOptions_mode, _points_i_lineOptions1;
|
|
449
|
+
const circleId = `${_circleId}_${i}`;
|
|
450
|
+
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
451
|
+
const currentMarkerSize = _points[i].data[0].markerSize;
|
|
452
|
+
const supportsTextMode = (_points_i_lineOptions1 = _points[i].lineOptions) === null || _points_i_lineOptions1 === void 0 ? void 0 : (_points_i_lineOptions_mode = _points_i_lineOptions1.mode) === null || _points_i_lineOptions_mode === void 0 ? void 0 : _points_i_lineOptions_mode.includes('text');
|
|
453
|
+
const text = _points[i].data[0].text;
|
|
454
|
+
var _points_i_data__text;
|
|
455
|
+
pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(React.Fragment, {
|
|
456
|
+
key: `${circleId}_fragment`
|
|
457
|
+
}, /*#__PURE__*/ React.createElement("circle", {
|
|
458
|
+
id: circleId,
|
|
459
|
+
key: circleId,
|
|
460
|
+
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : activePoint === circleId ? 5.5 : 3.5,
|
|
461
|
+
cx: xPoint,
|
|
462
|
+
cy: yPoint,
|
|
463
|
+
fill: activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor,
|
|
464
|
+
opacity: isLegendSelected ? 1 : 0.1,
|
|
465
|
+
tabIndex: isLegendSelected ? 0 : undefined,
|
|
466
|
+
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
467
|
+
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
468
|
+
onMouseOut: _handleMouseOut,
|
|
469
|
+
strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0,
|
|
470
|
+
stroke: activePoint === circleId ? lineColor : '',
|
|
471
|
+
role: "img",
|
|
472
|
+
"aria-label": (_points_i_data__text = _points[i].data[0].text) !== null && _points_i_data__text !== void 0 ? _points_i_data__text : _getAriaLabel(i, 0),
|
|
473
|
+
"data-is-focusable": isLegendSelected,
|
|
474
|
+
ref: (e)=>{
|
|
475
|
+
_refCallback(e, circleId);
|
|
476
|
+
},
|
|
477
|
+
onFocus: (event)=>_handleFocus(event, circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
478
|
+
onBlur: _handleMouseOut,
|
|
479
|
+
..._getClickHandler(_points[i].data[0].onDataPointClick)
|
|
480
|
+
}), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ React.createElement("text", {
|
|
481
|
+
key: `${circleId}-label`,
|
|
482
|
+
x: xPoint,
|
|
483
|
+
y: yPoint + Math.max(currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 3.5, 4) + 12,
|
|
484
|
+
className: classes.markerLabel,
|
|
485
|
+
opacity: isLegendSelected ? 1 : 0.1
|
|
486
|
+
}, text))));
|
|
487
|
+
}
|
|
471
488
|
}
|
|
472
489
|
let gapIndex = 0;
|
|
473
490
|
var _points_i_gaps_sort;
|
|
@@ -475,13 +492,13 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
475
492
|
const lineCurve = (_points_i_lineOptions = _points[i].lineOptions) === null || _points_i_lineOptions === void 0 ? void 0 : _points_i_lineOptions.curve;
|
|
476
493
|
// Use path rendering technique for larger datasets to optimize performance.
|
|
477
494
|
if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {
|
|
478
|
-
var
|
|
495
|
+
var _points_i_lineOptions2;
|
|
479
496
|
const line = d3Line()// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
480
497
|
.x((d)=>_xAxisScale(d[0]))// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
481
|
-
.y((d)=>yScale(d[1])).curve(getCurveFactory(lineCurve));
|
|
498
|
+
.y((d)=>yScale(d[1])).curve(getCurveFactory(lineCurve)).defined((d)=>isPlottable(_xAxisScale(d[0]), yScale(d[1])));
|
|
482
499
|
const lineId = `${_lineId}_${i}`;
|
|
483
500
|
const borderId = `${_borderId}_${i}`;
|
|
484
|
-
const strokeWidth = ((
|
|
501
|
+
const strokeWidth = ((_points_i_lineOptions2 = _points[i].lineOptions) === null || _points_i_lineOptions2 === void 0 ? void 0 : _points_i_lineOptions2.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
485
502
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
486
503
|
const lineData = [];
|
|
487
504
|
for(let k = 0; k < _points[i].data.length; k++){
|
|
@@ -491,19 +508,19 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
491
508
|
]);
|
|
492
509
|
}
|
|
493
510
|
if (isLegendSelected) {
|
|
494
|
-
var
|
|
495
|
-
const lineBorderWidth = ((
|
|
511
|
+
var _points_i_lineOptions3, _points_i_lineOptions4, _points_i_lineOptions5;
|
|
512
|
+
const lineBorderWidth = ((_points_i_lineOptions3 = _points[i].lineOptions) === null || _points_i_lineOptions3 === void 0 ? void 0 : _points_i_lineOptions3.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
|
|
496
513
|
if (lineBorderWidth > 0) {
|
|
497
|
-
var
|
|
514
|
+
var _points_i_lineOptions6, _points_i_lineOptions7;
|
|
498
515
|
var _points_i_lineOptions_strokeLinecap;
|
|
499
516
|
bordersForLine.push(/*#__PURE__*/ React.createElement("path", {
|
|
500
517
|
id: borderId,
|
|
501
518
|
key: borderId,
|
|
502
519
|
d: line(lineData),
|
|
503
520
|
fill: "transparent",
|
|
504
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap = (
|
|
521
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap = (_points_i_lineOptions6 = _points[i].lineOptions) === null || _points_i_lineOptions6 === void 0 ? void 0 : _points_i_lineOptions6.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap !== void 0 ? _points_i_lineOptions_strokeLinecap : 'round',
|
|
505
522
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
506
|
-
stroke: ((
|
|
523
|
+
stroke: ((_points_i_lineOptions7 = _points[i].lineOptions) === null || _points_i_lineOptions7 === void 0 ? void 0 : _points_i_lineOptions7.lineBorderColor) || tokens.colorNeutralBackground1,
|
|
507
524
|
opacity: 1
|
|
508
525
|
}));
|
|
509
526
|
}
|
|
@@ -516,16 +533,17 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
516
533
|
"data-is-focusable": true,
|
|
517
534
|
stroke: lineColor,
|
|
518
535
|
strokeWidth: strokeWidth,
|
|
519
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap1 = (
|
|
520
|
-
|
|
521
|
-
|
|
536
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap1 = (_points_i_lineOptions4 = _points[i].lineOptions) === null || _points_i_lineOptions4 === void 0 ? void 0 : _points_i_lineOptions4.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap1 !== void 0 ? _points_i_lineOptions_strokeLinecap1 : 'round',
|
|
537
|
+
strokeDasharray: (_points_i_lineOptions5 = _points[i].lineOptions) === null || _points_i_lineOptions5 === void 0 ? void 0 : _points_i_lineOptions5.strokeDasharray,
|
|
538
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
539
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
522
540
|
onMouseOut: _handleMouseOut,
|
|
523
541
|
..._getClickHandler(_points[i].onLineClick),
|
|
524
542
|
opacity: 1,
|
|
525
543
|
tabIndex: isLegendSelected ? 0 : undefined
|
|
526
544
|
}));
|
|
527
545
|
} else {
|
|
528
|
-
var
|
|
546
|
+
var _points_i_lineOptions8, _points_i_lineOptions9;
|
|
529
547
|
var _points_i_lineOptions_strokeLinecap2;
|
|
530
548
|
linesForLine.push(/*#__PURE__*/ React.createElement("path", {
|
|
531
549
|
id: lineId,
|
|
@@ -535,7 +553,8 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
535
553
|
"data-is-focusable": false,
|
|
536
554
|
stroke: lineColor,
|
|
537
555
|
strokeWidth: strokeWidth,
|
|
538
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (
|
|
556
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap2 = (_points_i_lineOptions8 = _points[i].lineOptions) === null || _points_i_lineOptions8 === void 0 ? void 0 : _points_i_lineOptions8.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap2 !== void 0 ? _points_i_lineOptions_strokeLinecap2 : 'round',
|
|
557
|
+
strokeDasharray: (_points_i_lineOptions9 = _points[i].lineOptions) === null || _points_i_lineOptions9 === void 0 ? void 0 : _points_i_lineOptions9.strokeDasharray,
|
|
539
558
|
opacity: 0.1
|
|
540
559
|
}));
|
|
541
560
|
}
|
|
@@ -549,13 +568,13 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
549
568
|
strokeWidth: DEFAULT_LINE_STROKE_SIZE,
|
|
550
569
|
stroke: lineColor,
|
|
551
570
|
visibility: 'hidden',
|
|
552
|
-
onMouseMove: (event)=>_onMouseOverLargeDataset
|
|
553
|
-
onMouseOver: (event)=>_onMouseOverLargeDataset
|
|
571
|
+
onMouseMove: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
572
|
+
onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
|
|
554
573
|
onMouseOut: _handleMouseOut
|
|
555
574
|
}));
|
|
556
575
|
} else if (!props.optimizeLargeData) {
|
|
557
576
|
for(let j = 1; j < _points[i].data.length; j++){
|
|
558
|
-
var
|
|
577
|
+
var _points_i_lineOptions10, _points_i_lineOptions_mode1, _points_i_lineOptions11, _points_i_lineOptions_mode2, _points_i_lineOptions12;
|
|
559
578
|
const gapResult = _checkInGap(j, gaps, gapIndex);
|
|
560
579
|
const isInGap = gapResult.isInGap;
|
|
561
580
|
gapIndex = gapResult.gapIndex;
|
|
@@ -564,147 +583,159 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
564
583
|
const circleId = `${_circleId}_${i}_${j}`;
|
|
565
584
|
const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points[i].data[j - 1];
|
|
566
585
|
const { x: x2, y: y2 } = _points[i].data[j];
|
|
567
|
-
|
|
568
|
-
const
|
|
586
|
+
const xPoint1 = _xAxisScale(x1);
|
|
587
|
+
const yPoint1 = yScale(y1);
|
|
588
|
+
const xPoint2 = _xAxisScale(x2);
|
|
589
|
+
const yPoint2 = yScale(y2);
|
|
590
|
+
const strokeWidth = ((_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : _points_i_lineOptions10.strokeWidth) || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
569
591
|
const isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
570
592
|
const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;
|
|
593
|
+
const supportsTextMode = (_points_i_lineOptions11 = _points[i].lineOptions) === null || _points_i_lineOptions11 === void 0 ? void 0 : (_points_i_lineOptions_mode1 = _points_i_lineOptions11.mode) === null || _points_i_lineOptions_mode1 === void 0 ? void 0 : _points_i_lineOptions_mode1.includes('text');
|
|
594
|
+
const text = _points[i].data[j - 1].text;
|
|
571
595
|
let currentMarkerSize = _points[i].data[j - 1].markerSize;
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
"data-is-focusable": isLegendSelected,
|
|
580
|
-
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
581
|
-
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
582
|
-
onMouseOut: _handleMouseOut,
|
|
583
|
-
onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
584
|
-
onBlur: _handleMouseOut,
|
|
585
|
-
..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
|
|
586
|
-
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
|
|
587
|
-
fill: _getPointFill(lineColor, circleId, j, false),
|
|
588
|
-
stroke: lineColor,
|
|
589
|
-
strokeWidth: strokeWidth,
|
|
590
|
-
role: "img",
|
|
591
|
-
"aria-label": (_points_i_data__text1 = _points[i].data[j - 1].text) !== null && _points_i_data__text1 !== void 0 ? _points_i_data__text1 : _getAriaLabel(i, j - 1)
|
|
592
|
-
}), _points[i].data[j - 1].text && /*#__PURE__*/ React.createElement("text", {
|
|
593
|
-
key: `${circleId}-label`,
|
|
594
|
-
x: _xAxisScale(x1),
|
|
595
|
-
y: yScale(y1) + 12,
|
|
596
|
-
fontSize: 12,
|
|
597
|
-
className: classes.markerLabel
|
|
598
|
-
}, _points[i].data[j - 1].text)) : /*#__PURE__*/ React.createElement("path", {
|
|
599
|
-
id: circleId,
|
|
600
|
-
key: circleId,
|
|
601
|
-
d: path,
|
|
602
|
-
"data-is-focusable": isLegendSelected,
|
|
603
|
-
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
604
|
-
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
605
|
-
onMouseOut: _handleMouseOut,
|
|
606
|
-
onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
607
|
-
onBlur: _handleMouseOut,
|
|
608
|
-
..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
|
|
609
|
-
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
|
|
610
|
-
fill: _getPointFill(lineColor, circleId, j, false),
|
|
611
|
-
stroke: lineColor,
|
|
612
|
-
strokeWidth: strokeWidth,
|
|
613
|
-
role: "img",
|
|
614
|
-
"aria-label": _getAriaLabel(i, j - 1),
|
|
615
|
-
tabIndex: isLegendSelected ? 0 : undefined
|
|
616
|
-
}));
|
|
617
|
-
if (j + 1 === _points[i].data.length) {
|
|
618
|
-
var _points_i_lineOptions_mode2, _points_i_lineOptions10;
|
|
619
|
-
// If this is last point of the line segment.
|
|
620
|
-
const lastCircleId = `${circleId}${j}L`;
|
|
621
|
-
const hiddenHoverCircleId = `${circleId}${j}D`;
|
|
622
|
-
const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
|
|
623
|
-
path = _getPath(_xAxisScale(x2), yScale(y2), lastCircleId, j, true, _points[i].index);
|
|
624
|
-
const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
|
|
625
|
-
currentMarkerSize = _points[i].data[j].markerSize;
|
|
626
|
-
var _points_i_data_j_text;
|
|
627
|
-
pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, {
|
|
628
|
-
key: `${lastCircleId}_container`
|
|
629
|
-
}, ((_points_i_lineOptions10 = _points[i].lineOptions) === null || _points_i_lineOptions10 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions10.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('markers')) ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
|
|
630
|
-
id: lastCircleId,
|
|
631
|
-
key: lastCircleId,
|
|
596
|
+
if (isPlottable(xPoint1, yPoint1)) {
|
|
597
|
+
var _points_i_lineOptions_mode3, _points_i_lineOptions13;
|
|
598
|
+
const path = _getPath(xPoint1, yPoint1, circleId, j, false, _points[i].index);
|
|
599
|
+
var _points_i_data__text1;
|
|
600
|
+
pointsForLine.push(((_points_i_lineOptions13 = _points[i].lineOptions) === null || _points_i_lineOptions13 === void 0 ? void 0 : (_points_i_lineOptions_mode3 = _points_i_lineOptions13.mode) === null || _points_i_lineOptions_mode3 === void 0 ? void 0 : _points_i_lineOptions_mode3.includes('markers')) || supportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
|
|
601
|
+
id: circleId,
|
|
602
|
+
key: circleId,
|
|
632
603
|
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
633
|
-
cx:
|
|
634
|
-
cy:
|
|
604
|
+
cx: xPoint1,
|
|
605
|
+
cy: yPoint1,
|
|
635
606
|
"data-is-focusable": isLegendSelected,
|
|
636
|
-
onMouseOver: (event)=>_handleHover(
|
|
637
|
-
onMouseMove: (event)=>_handleHover(
|
|
607
|
+
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
608
|
+
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
638
609
|
onMouseOut: _handleMouseOut,
|
|
639
|
-
onFocus: (event)=>_handleFocus(event, lineId,
|
|
610
|
+
onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
640
611
|
onBlur: _handleMouseOut,
|
|
641
|
-
..._getClickHandler(_points[i].data[j].onDataPointClick),
|
|
642
|
-
opacity: isLegendSelected && !
|
|
643
|
-
fill: _getPointFill(lineColor,
|
|
612
|
+
..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
|
|
613
|
+
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
|
|
614
|
+
fill: _getPointFill(lineColor, circleId, j, false),
|
|
644
615
|
stroke: lineColor,
|
|
645
616
|
strokeWidth: strokeWidth,
|
|
646
617
|
role: "img",
|
|
647
|
-
"aria-label": (
|
|
648
|
-
}),
|
|
649
|
-
key: `${
|
|
650
|
-
x:
|
|
651
|
-
y:
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
},
|
|
655
|
-
id:
|
|
656
|
-
key:
|
|
618
|
+
"aria-label": (_points_i_data__text1 = _points[i].data[j - 1].text) !== null && _points_i_data__text1 !== void 0 ? _points_i_data__text1 : _getAriaLabel(i, j - 1)
|
|
619
|
+
}), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ React.createElement("text", {
|
|
620
|
+
key: `${circleId}-label`,
|
|
621
|
+
x: xPoint1,
|
|
622
|
+
y: yPoint1 + Math.max(currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4, 4) + 12,
|
|
623
|
+
className: classes.markerLabel,
|
|
624
|
+
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01
|
|
625
|
+
}, text)) : /*#__PURE__*/ React.createElement("path", {
|
|
626
|
+
id: circleId,
|
|
627
|
+
key: circleId,
|
|
657
628
|
d: path,
|
|
658
629
|
"data-is-focusable": isLegendSelected,
|
|
659
|
-
onMouseOver: (event)=>_handleHover(
|
|
660
|
-
onMouseMove: (event)=>_handleHover(
|
|
630
|
+
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
631
|
+
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
661
632
|
onMouseOut: _handleMouseOut,
|
|
662
|
-
onFocus: (event)=>_handleFocus(event, lineId,
|
|
633
|
+
onFocus: (event)=>_handleFocus(event, lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData),
|
|
663
634
|
onBlur: _handleMouseOut,
|
|
664
|
-
..._getClickHandler(_points[i].data[j].onDataPointClick),
|
|
665
|
-
opacity: isLegendSelected && !
|
|
666
|
-
fill: _getPointFill(lineColor,
|
|
635
|
+
..._getClickHandler(_points[i].data[j - 1].onDataPointClick),
|
|
636
|
+
opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01,
|
|
637
|
+
fill: _getPointFill(lineColor, circleId, j, false),
|
|
667
638
|
stroke: lineColor,
|
|
668
639
|
strokeWidth: strokeWidth,
|
|
669
640
|
role: "img",
|
|
670
|
-
"aria-label": _getAriaLabel(i, j),
|
|
641
|
+
"aria-label": _getAriaLabel(i, j - 1),
|
|
671
642
|
tabIndex: isLegendSelected ? 0 : undefined
|
|
672
|
-
})
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
643
|
+
}));
|
|
644
|
+
}
|
|
645
|
+
if (j + 1 === _points[i].data.length) {
|
|
646
|
+
var _points_i_lineOptions_mode4, _points_i_lineOptions14;
|
|
647
|
+
// If this is last point of the line segment.
|
|
648
|
+
const lastCircleId = `${circleId}${j}L`;
|
|
649
|
+
const hiddenHoverCircleId = `${circleId}${j}D`;
|
|
650
|
+
const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;
|
|
651
|
+
const { xAxisCalloutData: lastCirlceXCallout, xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData } = _points[i].data[j];
|
|
652
|
+
currentMarkerSize = _points[i].data[j].markerSize;
|
|
653
|
+
const lastSupportsTextMode = (_points_i_lineOptions14 = _points[i].lineOptions) === null || _points_i_lineOptions14 === void 0 ? void 0 : (_points_i_lineOptions_mode4 = _points_i_lineOptions14.mode) === null || _points_i_lineOptions_mode4 === void 0 ? void 0 : _points_i_lineOptions_mode4.includes('text');
|
|
654
|
+
const lastText = _points[i].data[j].text;
|
|
655
|
+
if (isPlottable(xPoint2, yPoint2)) {
|
|
656
|
+
var _points_i_lineOptions_mode5, _points_i_lineOptions15;
|
|
657
|
+
const path = _getPath(xPoint2, yPoint2, lastCircleId, j, true, _points[i].index);
|
|
658
|
+
var _points_i_data_j_text;
|
|
659
|
+
pointsForLine.push(/*#__PURE__*/ React.createElement(React.Fragment, {
|
|
660
|
+
key: `${lastCircleId}_container`
|
|
661
|
+
}, ((_points_i_lineOptions15 = _points[i].lineOptions) === null || _points_i_lineOptions15 === void 0 ? void 0 : (_points_i_lineOptions_mode5 = _points_i_lineOptions15.mode) === null || _points_i_lineOptions_mode5 === void 0 ? void 0 : _points_i_lineOptions_mode5.includes('markers')) || lastSupportsTextMode ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("circle", {
|
|
662
|
+
id: lastCircleId,
|
|
663
|
+
key: lastCircleId,
|
|
664
|
+
r: currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4,
|
|
665
|
+
cx: xPoint2,
|
|
666
|
+
cy: yPoint2,
|
|
667
|
+
"data-is-focusable": isLegendSelected,
|
|
668
|
+
onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
669
|
+
onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
670
|
+
onMouseOut: _handleMouseOut,
|
|
671
|
+
onFocus: (event)=>_handleFocus(event, lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData),
|
|
672
|
+
onBlur: _handleMouseOut,
|
|
673
|
+
..._getClickHandler(_points[i].data[j].onDataPointClick),
|
|
674
|
+
opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01,
|
|
675
|
+
fill: _getPointFill(lineColor, lastCircleId, j, true),
|
|
676
|
+
stroke: lineColor,
|
|
677
|
+
strokeWidth: strokeWidth,
|
|
678
|
+
role: "img",
|
|
679
|
+
"aria-label": (_points_i_data_j_text = _points[i].data[j].text) !== null && _points_i_data_j_text !== void 0 ? _points_i_data_j_text : _getAriaLabel(i, j)
|
|
680
|
+
}), !_isScatterPolar && lastSupportsTextMode && lastText && /*#__PURE__*/ React.createElement("text", {
|
|
681
|
+
key: `${lastCircleId}-label`,
|
|
682
|
+
x: xPoint2,
|
|
683
|
+
y: yPoint2 + Math.max(currentMarkerSize ? currentMarkerSize * extraMaxPixels / maxMarkerSize : 4, 4) + 12,
|
|
684
|
+
className: classes.markerLabel
|
|
685
|
+
}, text)) : /*#__PURE__*/ React.createElement("path", {
|
|
686
|
+
id: lastCircleId,
|
|
687
|
+
key: lastCircleId,
|
|
688
|
+
d: path,
|
|
689
|
+
"data-is-focusable": isLegendSelected,
|
|
690
|
+
onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
691
|
+
onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
692
|
+
onMouseOut: _handleMouseOut,
|
|
693
|
+
onFocus: (event)=>_handleFocus(event, lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData),
|
|
694
|
+
onBlur: _handleMouseOut,
|
|
695
|
+
..._getClickHandler(_points[i].data[j].onDataPointClick),
|
|
696
|
+
opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01,
|
|
697
|
+
fill: _getPointFill(lineColor, lastCircleId, j, true),
|
|
698
|
+
stroke: lineColor,
|
|
699
|
+
strokeWidth: strokeWidth,
|
|
700
|
+
role: "img",
|
|
701
|
+
"aria-label": _getAriaLabel(i, j),
|
|
702
|
+
tabIndex: isLegendSelected ? 0 : undefined
|
|
703
|
+
}), /*#__PURE__*/ React.createElement("circle", {
|
|
704
|
+
id: hiddenHoverCircleId,
|
|
705
|
+
key: hiddenHoverCircleId,
|
|
706
|
+
r: 8,
|
|
707
|
+
cx: xPoint2,
|
|
708
|
+
cy: yPoint2,
|
|
709
|
+
opacity: 0,
|
|
710
|
+
width: 0,
|
|
711
|
+
onMouseOver: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
712
|
+
onMouseMove: (event)=>_handleHover(x2, y2, verticaLineHeight, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
713
|
+
onMouseOut: _handleMouseOut,
|
|
714
|
+
strokeWidth: 0,
|
|
715
|
+
focusable: false,
|
|
716
|
+
onBlur: _handleMouseOut
|
|
717
|
+
})));
|
|
718
|
+
}
|
|
688
719
|
}
|
|
689
|
-
if (!_hasMarkersMode || ((
|
|
720
|
+
if (isPlottable(xPoint1, yPoint1) && isPlottable(xPoint2, yPoint2) && (!_hasMarkersMode || ((_points_i_lineOptions12 = _points[i].lineOptions) === null || _points_i_lineOptions12 === void 0 ? void 0 : (_points_i_lineOptions_mode2 = _points_i_lineOptions12.mode) === null || _points_i_lineOptions_mode2 === void 0 ? void 0 : _points_i_lineOptions_mode2.includes('lines')))) {
|
|
690
721
|
if (isLegendSelected) {
|
|
691
722
|
// don't draw line if it is in a gap
|
|
692
723
|
if (!isInGap) {
|
|
693
|
-
var
|
|
694
|
-
const lineBorderWidth = ((
|
|
724
|
+
var _points_i_lineOptions16, _points_i_lineOptions17, _points_i_lineOptions18, _points_i_lineOptions19;
|
|
725
|
+
const lineBorderWidth = ((_points_i_lineOptions16 = _points[i].lineOptions) === null || _points_i_lineOptions16 === void 0 ? void 0 : _points_i_lineOptions16.lineBorderWidth) ? Number.parseFloat(_points[i].lineOptions.lineBorderWidth.toString()) : 0;
|
|
695
726
|
if (lineBorderWidth > 0) {
|
|
696
|
-
var
|
|
727
|
+
var _points_i_lineOptions20, _points_i_lineOptions21;
|
|
697
728
|
var _points_i_lineOptions_strokeLinecap3;
|
|
698
729
|
bordersForLine.push(/*#__PURE__*/ React.createElement("line", {
|
|
699
730
|
id: borderId,
|
|
700
731
|
key: borderId,
|
|
701
|
-
x1:
|
|
702
|
-
y1:
|
|
703
|
-
x2:
|
|
704
|
-
y2:
|
|
705
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (
|
|
732
|
+
x1: xPoint1,
|
|
733
|
+
y1: yPoint1,
|
|
734
|
+
x2: xPoint2,
|
|
735
|
+
y2: yPoint2,
|
|
736
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap3 = (_points_i_lineOptions20 = _points[i].lineOptions) === null || _points_i_lineOptions20 === void 0 ? void 0 : _points_i_lineOptions20.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap3 !== void 0 ? _points_i_lineOptions_strokeLinecap3 : 'round',
|
|
706
737
|
strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth,
|
|
707
|
-
stroke: ((
|
|
738
|
+
stroke: ((_points_i_lineOptions21 = _points[i].lineOptions) === null || _points_i_lineOptions21 === void 0 ? void 0 : _points_i_lineOptions21.lineBorderColor) || tokens.colorNeutralBackground1,
|
|
708
739
|
opacity: 1
|
|
709
740
|
}));
|
|
710
741
|
}
|
|
@@ -712,41 +743,41 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
712
743
|
linesForLine.push(/*#__PURE__*/ React.createElement("line", {
|
|
713
744
|
id: lineId,
|
|
714
745
|
key: lineId,
|
|
715
|
-
x1:
|
|
716
|
-
y1:
|
|
717
|
-
x2:
|
|
718
|
-
y2:
|
|
746
|
+
x1: xPoint1,
|
|
747
|
+
y1: yPoint1,
|
|
748
|
+
x2: xPoint2,
|
|
749
|
+
y2: yPoint2,
|
|
719
750
|
strokeWidth: strokeWidth,
|
|
720
751
|
ref: (e)=>{
|
|
721
752
|
_refCallback(e, lineId);
|
|
722
753
|
},
|
|
723
|
-
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
724
|
-
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale),
|
|
754
|
+
onMouseOver: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
755
|
+
onMouseMove: (event)=>_handleHover(x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event, yScale, legendVal, lineColor),
|
|
725
756
|
onMouseOut: _handleMouseOut,
|
|
726
757
|
stroke: lineColor,
|
|
727
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (
|
|
728
|
-
strokeDasharray: (
|
|
729
|
-
strokeDashoffset: (
|
|
758
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap4 = (_points_i_lineOptions17 = _points[i].lineOptions) === null || _points_i_lineOptions17 === void 0 ? void 0 : _points_i_lineOptions17.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap4 !== void 0 ? _points_i_lineOptions_strokeLinecap4 : 'round',
|
|
759
|
+
strokeDasharray: (_points_i_lineOptions18 = _points[i].lineOptions) === null || _points_i_lineOptions18 === void 0 ? void 0 : _points_i_lineOptions18.strokeDasharray,
|
|
760
|
+
strokeDashoffset: (_points_i_lineOptions19 = _points[i].lineOptions) === null || _points_i_lineOptions19 === void 0 ? void 0 : _points_i_lineOptions19.strokeDashoffset,
|
|
730
761
|
opacity: 1,
|
|
731
762
|
..._getClickHandler(_points[i].onLineClick)
|
|
732
763
|
}));
|
|
733
764
|
}
|
|
734
765
|
} else {
|
|
735
766
|
if (!isInGap) {
|
|
736
|
-
var
|
|
767
|
+
var _points_i_lineOptions22, _points_i_lineOptions23, _points_i_lineOptions24;
|
|
737
768
|
var _points_i_lineOptions_strokeLinecap5;
|
|
738
769
|
linesForLine.push(/*#__PURE__*/ React.createElement("line", {
|
|
739
770
|
id: lineId,
|
|
740
771
|
key: lineId,
|
|
741
|
-
x1:
|
|
742
|
-
y1:
|
|
743
|
-
x2:
|
|
744
|
-
y2:
|
|
772
|
+
x1: xPoint1,
|
|
773
|
+
y1: yPoint1,
|
|
774
|
+
x2: xPoint2,
|
|
775
|
+
y2: yPoint2,
|
|
745
776
|
strokeWidth: strokeWidth,
|
|
746
777
|
stroke: lineColor,
|
|
747
|
-
strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (
|
|
748
|
-
strokeDasharray: (
|
|
749
|
-
strokeDashoffset: (
|
|
778
|
+
strokeLinecap: (_points_i_lineOptions_strokeLinecap5 = (_points_i_lineOptions22 = _points[i].lineOptions) === null || _points_i_lineOptions22 === void 0 ? void 0 : _points_i_lineOptions22.strokeLinecap) !== null && _points_i_lineOptions_strokeLinecap5 !== void 0 ? _points_i_lineOptions_strokeLinecap5 : 'round',
|
|
779
|
+
strokeDasharray: (_points_i_lineOptions23 = _points[i].lineOptions) === null || _points_i_lineOptions23 === void 0 ? void 0 : _points_i_lineOptions23.strokeDasharray,
|
|
780
|
+
strokeDashoffset: (_points_i_lineOptions24 = _points[i].lineOptions) === null || _points_i_lineOptions24 === void 0 ? void 0 : _points_i_lineOptions24.strokeDashoffset,
|
|
750
781
|
opacity: 0.1
|
|
751
782
|
}));
|
|
752
783
|
}
|
|
@@ -754,6 +785,15 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
754
785
|
}
|
|
755
786
|
}
|
|
756
787
|
}
|
|
788
|
+
if (_isScatterPolar) {
|
|
789
|
+
var _points_i;
|
|
790
|
+
pointsForLine.push(...renderScatterPolarCategoryLabels({
|
|
791
|
+
xAxisScale: _xAxisScale,
|
|
792
|
+
yAxisScale: yScale,
|
|
793
|
+
className: classes.markerLabel || '',
|
|
794
|
+
lineOptions: (_points_i = _points[i]) === null || _points_i === void 0 ? void 0 : _points_i.lineOptions
|
|
795
|
+
}));
|
|
796
|
+
}
|
|
757
797
|
lines.push(/*#__PURE__*/ React.createElement("g", {
|
|
758
798
|
key: `line_${i}`,
|
|
759
799
|
role: "region",
|
|
@@ -896,7 +936,7 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
896
936
|
}
|
|
897
937
|
}
|
|
898
938
|
const { xAxisCalloutData } = lineChartData[linenumber].data[index];
|
|
899
|
-
const formattedDate = xPointToHighlight instanceof Date ?
|
|
939
|
+
const formattedDate = xPointToHighlight instanceof Date ? formatDateToLocaleString(xPointToHighlight, props.culture, props.useUTC) : xPointToHighlight;
|
|
900
940
|
const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;
|
|
901
941
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
902
942
|
const found = find(_calloutPoints, (element)=>{
|
|
@@ -931,7 +971,7 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
931
971
|
cy = targetRect.top + targetRect.height / 2;
|
|
932
972
|
updatePosition(cx, cy);
|
|
933
973
|
_uniqueCallOutID = circleId;
|
|
934
|
-
const formattedData = x instanceof Date ?
|
|
974
|
+
const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;
|
|
935
975
|
const xVal = x instanceof Date ? x.getTime() : x;
|
|
936
976
|
const found = find(_calloutPoints, (element)=>element.x === xVal);
|
|
937
977
|
// if no points need to be called out then don't show vertical line and callout card
|
|
@@ -951,11 +991,24 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
951
991
|
setActivePoint(circleId);
|
|
952
992
|
}
|
|
953
993
|
}
|
|
954
|
-
function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent, yScale) {
|
|
994
|
+
function _handleHover(x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent, yScale, legendVal, lineColor) {
|
|
955
995
|
mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
|
|
956
|
-
const formattedData = x instanceof Date ?
|
|
996
|
+
const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;
|
|
957
997
|
const xVal = x instanceof Date ? x.getTime() : x;
|
|
998
|
+
const yVal = y instanceof Date ? y.getTime() : y;
|
|
958
999
|
const found = find(_calloutPoints, (element)=>element.x === xVal);
|
|
1000
|
+
let hoverDp = undefined;
|
|
1001
|
+
if (props.isCalloutForStack === false && (found === null || found === void 0 ? void 0 : found.values)) {
|
|
1002
|
+
const dp = find(found.values, (val)=>(val === null || val === void 0 ? void 0 : val.y) === yVal);
|
|
1003
|
+
if (dp) {
|
|
1004
|
+
hoverDp = {
|
|
1005
|
+
x: xVal,
|
|
1006
|
+
values: [
|
|
1007
|
+
dp
|
|
1008
|
+
]
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
959
1012
|
// if no points need to be called out then don't show vertical line and callout card
|
|
960
1013
|
if (found) {
|
|
961
1014
|
d3Select(`#${_verticalLine}`).attr('transform', ()=>`translate(${_xAxisScale(x)}, ${yScale(y)})`).attr('visibility', 'visibility').attr('y2', `${lineHeight - 5 - yScale(y)}`);
|
|
@@ -964,8 +1017,11 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
964
1017
|
updatePosition(mouseEvent.clientX, mouseEvent.clientY);
|
|
965
1018
|
xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
|
|
966
1019
|
setYValueHover(found.values);
|
|
1020
|
+
setYValue(yVal);
|
|
1021
|
+
setLegendVal(legendVal);
|
|
1022
|
+
setLineColor(lineColor);
|
|
967
1023
|
setStackCalloutProps(found);
|
|
968
|
-
setDataPointCalloutProps(
|
|
1024
|
+
setDataPointCalloutProps(hoverDp);
|
|
969
1025
|
setActivePoint(circleId);
|
|
970
1026
|
setNearestCircleToHighlight(null);
|
|
971
1027
|
}
|
|
@@ -1083,81 +1139,18 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
1083
1139
|
var _point_callOutAccessibilityData;
|
|
1084
1140
|
const line = _points[lineIndex];
|
|
1085
1141
|
const point = line.data[pointIndex];
|
|
1086
|
-
const formattedDate = point.x instanceof Date ?
|
|
1142
|
+
const formattedDate = point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC) : point.x;
|
|
1087
1143
|
const xValue = point.xAxisCalloutData || formattedDate;
|
|
1088
1144
|
const legend = line.legend;
|
|
1089
1145
|
const yValue = point.yAxisCalloutData || point.y;
|
|
1090
1146
|
return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${xValue}. ${legend}, ${yValue}.`;
|
|
1091
1147
|
}
|
|
1092
|
-
function _getDomainNRangeValuesOfDateWithPadding(points, margins, width, isRTL, tickValues = [], chartType, barWidth) {
|
|
1093
|
-
let sDate;
|
|
1094
|
-
let lDate;
|
|
1095
|
-
sDate = d3Min(points, (point)=>{
|
|
1096
|
-
return d3Min(point.data, (item)=>item.x);
|
|
1097
|
-
});
|
|
1098
|
-
lDate = d3Max(points, (point)=>{
|
|
1099
|
-
return d3Max(point.data, (item)=>item.x);
|
|
1100
|
-
});
|
|
1101
|
-
// Include tickValues if present
|
|
1102
|
-
sDate = d3Min([
|
|
1103
|
-
...tickValues,
|
|
1104
|
-
sDate
|
|
1105
|
-
]);
|
|
1106
|
-
lDate = d3Max([
|
|
1107
|
-
...tickValues,
|
|
1108
|
-
lDate
|
|
1109
|
-
]);
|
|
1110
|
-
// Calculate time-based padding (e.g. 10% of the date range)
|
|
1111
|
-
const dateRange = lDate.getTime() - sDate.getTime();
|
|
1112
|
-
const datePadding = _hasMarkersMode ? dateRange * 0.1 : 0;
|
|
1113
|
-
const paddedSDate = new Date(sDate.getTime() - datePadding);
|
|
1114
|
-
const paddedLDate = new Date(lDate.getTime() + datePadding);
|
|
1115
|
-
const rStartValue = margins.left;
|
|
1116
|
-
const rEndValue = width - margins.right;
|
|
1117
|
-
return isRTL ? {
|
|
1118
|
-
dStartValue: paddedLDate,
|
|
1119
|
-
dEndValue: paddedSDate,
|
|
1120
|
-
rStartValue,
|
|
1121
|
-
rEndValue
|
|
1122
|
-
} : {
|
|
1123
|
-
dStartValue: paddedSDate,
|
|
1124
|
-
dEndValue: paddedLDate,
|
|
1125
|
-
rStartValue,
|
|
1126
|
-
rEndValue
|
|
1127
|
-
};
|
|
1128
|
-
}
|
|
1129
|
-
function _getDomainNRangeValuesWithPadding(points, margins, width, isRTL) {
|
|
1130
|
-
_xMin = d3Min(points, (point)=>{
|
|
1131
|
-
return d3Min(point.data, (item)=>item.x);
|
|
1132
|
-
});
|
|
1133
|
-
_xMax = d3Max(points, (point)=>{
|
|
1134
|
-
return d3Max(point.data, (item)=>{
|
|
1135
|
-
return item.x;
|
|
1136
|
-
});
|
|
1137
|
-
});
|
|
1138
|
-
if (_hasMarkersMode) {
|
|
1139
|
-
_xPadding = (_xMax - _xMin) * 0.1;
|
|
1140
|
-
}
|
|
1141
|
-
const rStartValue = margins.left;
|
|
1142
|
-
const rEndValue = width - margins.right;
|
|
1143
|
-
return isRTL ? {
|
|
1144
|
-
dStartValue: _xMax + _xPadding,
|
|
1145
|
-
dEndValue: _xMin - _xPadding,
|
|
1146
|
-
rStartValue,
|
|
1147
|
-
rEndValue
|
|
1148
|
-
} : {
|
|
1149
|
-
dStartValue: _xMin - _xPadding,
|
|
1150
|
-
dEndValue: _xMax + _xPadding,
|
|
1151
|
-
rStartValue,
|
|
1152
|
-
rEndValue
|
|
1153
|
-
};
|
|
1154
|
-
}
|
|
1155
1148
|
function _isChartEmpty() {
|
|
1156
1149
|
return !(props.data && props.data.lineChartData && props.data.lineChartData.length > 0 && props.data.lineChartData.filter((item)=>item.data.length).length > 0);
|
|
1157
1150
|
}
|
|
1158
1151
|
const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;
|
|
1159
1152
|
_points = _injectIndexPropertyInLineChartData(props.data.lineChartData);
|
|
1160
|
-
|
|
1153
|
+
_isXAxisDateType = getXAxisType(_points);
|
|
1161
1154
|
let points = _points;
|
|
1162
1155
|
if (legendProps && !!legendProps.canSelectMultipleLegends) {
|
|
1163
1156
|
points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;
|
|
@@ -1170,18 +1163,21 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
1170
1163
|
if (!props.hideLegend) {
|
|
1171
1164
|
legendBars = _createLegends(_points); // ToDo: Memoize legends to improve performance.
|
|
1172
1165
|
}
|
|
1173
|
-
var _props_culture;
|
|
1174
1166
|
const calloutProps = {
|
|
1175
1167
|
YValueHover: YValueHover,
|
|
1176
1168
|
hoverXValue: hoverXValue,
|
|
1169
|
+
YValue: YValue,
|
|
1170
|
+
legend: legendVal,
|
|
1171
|
+
color: lineColor,
|
|
1172
|
+
XValue: hoverXValue,
|
|
1177
1173
|
descriptionMessage: props.getCalloutDescriptionMessage && stackCalloutProps ? props.getCalloutDescriptionMessage(stackCalloutProps) : undefined,
|
|
1178
1174
|
'data-is-focusable': true,
|
|
1179
1175
|
xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,
|
|
1180
1176
|
...props.calloutProps,
|
|
1181
1177
|
clickPosition: clickPosition,
|
|
1182
1178
|
isPopoverOpen: isPopoverOpen,
|
|
1183
|
-
isCalloutForStack:
|
|
1184
|
-
culture:
|
|
1179
|
+
isCalloutForStack: props.isCalloutForStack,
|
|
1180
|
+
culture: props.culture,
|
|
1185
1181
|
isCartesian: true,
|
|
1186
1182
|
customCallout: {
|
|
1187
1183
|
customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout() : undefined,
|
|
@@ -1204,7 +1200,11 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
1204
1200
|
getmargins: _getMargins,
|
|
1205
1201
|
getMinMaxOfYAxis: _getNumericMinMaxOfY,
|
|
1206
1202
|
getGraphData: _initializeLineChartData,
|
|
1207
|
-
xAxisType:
|
|
1203
|
+
xAxisType: _isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis,
|
|
1204
|
+
..._isScatterPolar ? {
|
|
1205
|
+
yMaxValue: 1,
|
|
1206
|
+
yMinValue: -1
|
|
1207
|
+
} : {},
|
|
1208
1208
|
getDomainNRangeValues: _getDomainNRangeValues,
|
|
1209
1209
|
createStringYAxis: createStringYAxis,
|
|
1210
1210
|
onChartMouseLeave: _handleChartMouseLeave,
|
|
@@ -1246,3 +1246,6 @@ const PATH_MULTIPLY_SIZE = 2.5;
|
|
|
1246
1246
|
});
|
|
1247
1247
|
});
|
|
1248
1248
|
LineChart.displayName = 'LineChart';
|
|
1249
|
+
LineChart.defaultProps = {
|
|
1250
|
+
isCalloutForStack: true
|
|
1251
|
+
};
|