@fluentui/react-charts 0.0.0-nightly-20250423-1342.1 → 0.0.0-nightly-20250424-0405.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -16
- package/dist/index.d.ts +3305 -0
- package/lib/AreaChart.js +1 -0
- package/lib/AreaChart.js.map +1 -0
- package/lib/CartesianChart.js +1 -0
- package/lib/CartesianChart.js.map +1 -0
- package/lib/DeclarativeChart.js +1 -0
- package/lib/DeclarativeChart.js.map +1 -0
- package/lib/DonutChart.js +1 -0
- package/lib/DonutChart.js.map +1 -0
- package/lib/GaugeChart.js +1 -0
- package/lib/GaugeChart.js.map +1 -0
- package/lib/GroupedVerticalBarChart.js +1 -0
- package/lib/GroupedVerticalBarChart.js.map +1 -0
- package/lib/HeatMapChart.js +1 -0
- package/lib/HeatMapChart.js.map +1 -0
- package/lib/HorizontalBarChart.js +1 -0
- package/lib/HorizontalBarChart.js.map +1 -0
- package/lib/HorizontalBarChartWithAxis.js +1 -0
- package/lib/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/Legends.js +1 -0
- package/lib/Legends.js.map +1 -0
- package/lib/LineChart.js +1 -0
- package/lib/LineChart.js.map +1 -0
- package/lib/Popover.js +1 -0
- package/lib/Popover.js.map +1 -0
- package/lib/ResponsiveContainer.js +1 -0
- package/lib/ResponsiveContainer.js.map +1 -0
- package/lib/SankeyChart.js +1 -0
- package/lib/SankeyChart.js.map +1 -0
- package/lib/ScatterChart.js +1 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/Sparkline.js +1 -0
- package/lib/Sparkline.js.map +1 -0
- package/lib/VerticalBarChart.js +1 -0
- package/lib/VerticalBarChart.js.map +1 -0
- package/lib/VerticalStackedBarChart.js +1 -0
- package/lib/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.js +775 -0
- package/lib/components/AreaChart/AreaChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.types.js +4 -0
- package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib/components/AreaChart/index.js +3 -0
- package/lib/components/AreaChart/index.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +55 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +478 -0
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.js +187 -0
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib/components/CommonComponents/index.js +4 -0
- package/lib/components/CommonComponents/index.js.map +1 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +113 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +167 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +197 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +811 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib/components/DeclarativeChart/imageExporter.js +221 -0
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib/components/DeclarativeChart/index.js +1 -0
- package/lib/components/DeclarativeChart/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.js +110 -0
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib/components/DonutChart/Arc/index.js +2 -0
- package/lib/components/DonutChart/Arc/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.js +291 -0
- package/lib/components/DonutChart/DonutChart.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.types.js +1 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.js +72 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/index.js +2 -0
- package/lib/components/DonutChart/Pie/index.js.map +1 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +40 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/index.js +3 -0
- package/lib/components/DonutChart/index.js.map +1 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.js +592 -0
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib/components/GaugeChart/index.js +3 -0
- package/lib/components/GaugeChart/index.js.map +1 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +178 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/index.js +3 -0
- package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +81 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib/components/HeatMapChart/index.js +3 -0
- package/lib/components/HeatMapChart/index.js.map +1 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +37 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib/components/HorizontalBarChart/index.js +3 -0
- package/lib/components/HorizontalBarChart/index.js.map +1 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +156 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +67 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib/components/Legends/Legends.js +303 -0
- package/lib/components/Legends/Legends.js.map +1 -0
- package/lib/components/Legends/Legends.types.js +1 -0
- package/lib/components/Legends/Legends.types.js.map +1 -0
- package/lib/components/Legends/OverflowMenu.js +25 -0
- package/lib/components/Legends/OverflowMenu.js.map +1 -0
- package/lib/components/Legends/index.js +3 -0
- package/lib/components/Legends/index.js.map +1 -0
- package/lib/components/Legends/shape.js +35 -0
- package/lib/components/Legends/shape.js.map +1 -0
- package/lib/components/Legends/useLegendsStyles.styles.js +146 -0
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib/components/LineChart/LineChart.js +1034 -0
- package/lib/components/LineChart/LineChart.js.map +1 -0
- package/lib/components/LineChart/LineChart.types.js +3 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib/components/LineChart/index.js +4 -0
- package/lib/components/LineChart/index.js.map +1 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js +56 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib/components/ResponsiveContainer/index.js +1 -0
- package/lib/components/ResponsiveContainer/index.js.map +1 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.js +1023 -0
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib/components/SankeyChart/index.js +3 -0
- package/lib/components/SankeyChart/index.js.map +1 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.js +465 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +56 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.js +119 -0
- package/lib/components/Sparkline/Sparkline.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.types.js +4 -0
- package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib/components/Sparkline/index.js +3 -0
- package/lib/components/Sparkline/index.js.map +1 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js +926 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib/components/VerticalBarChart/index.js +3 -0
- package/lib/components/VerticalBarChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +66 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/index.js +3 -0
- package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +65 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/lib/types/DataPoint.js +1 -0
- package/lib/types/DataPoint.js.map +1 -0
- package/lib/types/EventAnnotation.js +1 -0
- package/lib/types/EventAnnotation.js.map +1 -0
- package/lib/types/LegendDataItem.js +1 -0
- package/lib/types/LegendDataItem.js.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utilities/FocusableTooltipText.js +65 -0
- package/lib/utilities/FocusableTooltipText.js.map +1 -0
- package/lib/utilities/KeyCodes.js +8 -0
- package/lib/utilities/KeyCodes.js.map +1 -0
- package/lib/utilities/SVGTooltipText.js +183 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -0
- package/lib/utilities/async-utils.js +380 -0
- package/lib/utilities/async-utils.js.map +1 -0
- package/lib/utilities/colors.js +269 -0
- package/lib/utilities/colors.js.map +1 -0
- package/lib/utilities/getWindow.js +25 -0
- package/lib/utilities/getWindow.js.map +1 -0
- package/lib/utilities/index.js +3 -0
- package/lib/utilities/index.js.map +1 -0
- package/lib/utilities/locale-util.js +15 -0
- package/lib/utilities/locale-util.js.map +1 -0
- package/lib/utilities/overflow-utils.js +27 -0
- package/lib/utilities/overflow-utils.js.map +1 -0
- package/lib/utilities/string.js +32 -0
- package/lib/utilities/string.js.map +1 -0
- package/lib/utilities/test-data.js +329 -0
- package/lib/utilities/test-data.js.map +1 -0
- package/lib/utilities/utilities.js +1405 -0
- package/lib/utilities/utilities.js.map +1 -0
- package/lib/utilities/vbc-utils.js +27 -0
- package/lib/utilities/vbc-utils.js.map +1 -0
- package/lib-commonjs/AreaChart.js +6 -0
- package/lib-commonjs/AreaChart.js.map +1 -0
- package/lib-commonjs/CartesianChart.js +6 -0
- package/lib-commonjs/CartesianChart.js.map +1 -0
- package/lib-commonjs/DeclarativeChart.js +6 -0
- package/lib-commonjs/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/DonutChart.js +6 -0
- package/lib-commonjs/DonutChart.js.map +1 -0
- package/lib-commonjs/GaugeChart.js +6 -0
- package/lib-commonjs/GaugeChart.js.map +1 -0
- package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
- package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -0
- package/lib-commonjs/HeatMapChart.js +6 -0
- package/lib-commonjs/HeatMapChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChart.js +6 -0
- package/lib-commonjs/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/Legends.js +6 -0
- package/lib-commonjs/Legends.js.map +1 -0
- package/lib-commonjs/LineChart.js +6 -0
- package/lib-commonjs/LineChart.js.map +1 -0
- package/lib-commonjs/Popover.js +6 -0
- package/lib-commonjs/Popover.js.map +1 -0
- package/lib-commonjs/ResponsiveContainer.js +6 -0
- package/lib-commonjs/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/SankeyChart.js +6 -0
- package/lib-commonjs/SankeyChart.js.map +1 -0
- package/lib-commonjs/ScatterChart.js +6 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/Sparkline.js +6 -0
- package/lib-commonjs/Sparkline.js.map +1 -0
- package/lib-commonjs/VerticalBarChart.js +6 -0
- package/lib-commonjs/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/VerticalStackedBarChart.js +6 -0
- package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib-commonjs/components/AreaChart/index.js +8 -0
- package/lib-commonjs/components/AreaChart/index.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +95 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +484 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/index.js +9 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +166 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +236 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +205 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +859 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
- package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +54 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/index.js +8 -0
- package/lib-commonjs/components/DonutChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +621 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/index.js +8 -0
- package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +258 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +130 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/index.js +8 -0
- package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +59 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +237 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +107 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.js +313 -0
- package/lib-commonjs/components/Legends/Legends.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.types.js +6 -0
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
- package/lib-commonjs/components/Legends/index.js +8 -0
- package/lib-commonjs/components/Legends/index.js.map +1 -0
- package/lib-commonjs/components/Legends/shape.js +46 -0
- package/lib-commonjs/components/Legends/shape.js.map +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.js +1040 -0
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib-commonjs/components/LineChart/index.js +9 -0
- package/lib-commonjs/components/LineChart/index.js.map +1 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +87 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1039 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/index.js +8 -0
- package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +471 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.js +8 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +87 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib-commonjs/components/Sparkline/index.js +8 -0
- package/lib-commonjs/components/Sparkline/index.js.map +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +928 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +110 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +113 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +25 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/types/DataPoint.js +4 -0
- package/lib-commonjs/types/DataPoint.js.map +1 -0
- package/lib-commonjs/types/EventAnnotation.js +6 -0
- package/lib-commonjs/types/EventAnnotation.js.map +1 -0
- package/lib-commonjs/types/LegendDataItem.js +4 -0
- package/lib-commonjs/types/LegendDataItem.js.map +1 -0
- package/lib-commonjs/types/index.js +7 -0
- package/lib-commonjs/types/index.js.map +1 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/KeyCodes.js +18 -0
- package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +193 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/async-utils.js +382 -0
- package/lib-commonjs/utilities/async-utils.js.map +1 -0
- package/lib-commonjs/utilities/colors.js +293 -0
- package/lib-commonjs/utilities/colors.js.map +1 -0
- package/lib-commonjs/utilities/getWindow.js +28 -0
- package/lib-commonjs/utilities/getWindow.js.map +1 -0
- package/lib-commonjs/utilities/index.js +8 -0
- package/lib-commonjs/utilities/index.js.map +1 -0
- package/lib-commonjs/utilities/locale-util.js +25 -0
- package/lib-commonjs/utilities/locale-util.js.map +1 -0
- package/lib-commonjs/utilities/overflow-utils.js +36 -0
- package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
- package/lib-commonjs/utilities/string.js +29 -0
- package/lib-commonjs/utilities/string.js.map +1 -0
- package/lib-commonjs/utilities/test-data.js +383 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +1371 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -0
- package/lib-commonjs/utilities/vbc-utils.js +45 -0
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
- package/package.json +13 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LineChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LineChartProps } from './LineChart.types';\nimport { useLineChartStyles } from './useLineChartStyles.styles';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select, pointer } from 'd3-selection';\nimport { bisector } from 'd3-array';\nimport { Legend, Legends } from '../Legends/index';\nimport { line as d3Line } from 'd3-shape';\nimport { useId } from '@fluentui/react-utilities';\nimport { find } from '../../utilities/index';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n LineChartPoints,\n CustomizedCalloutData,\n Margins,\n RefArrayData,\n ColorFillBarsProps,\n LineChartGap,\n LineChartDataPoint,\n Chart,\n} from '../../index';\nimport { EventsAnnotation } from './eventAnnotation/EventAnnotation';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n calloutData,\n ChartTypes,\n getXAxisType,\n XAxisTypes,\n tooltipOfXAxislabels,\n Points,\n pointTypes,\n getMinMaxOfYAxis,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n useRtl,\n formatDate,\n getCurveFactory,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\nenum PointSize {\n hoverSize = 11,\n invisibleSize = 1,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bisect = bisector((d: any) => d.x).left;\n\nconst DEFAULT_LINE_STROKE_SIZE = 4;\n// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)\nconst PATH_MULTIPLY_SIZE = 2.5;\n\n/**\n *\n * @param x units from origin\n * @param y units from origin\n * @param w is the legnth of the each side of a shape\n * @param index index to get the shape path\n */\nconst _getPointPath = (x: number, y: number, w: number, index: number): string => {\n const allPointPaths = [\n // circle path\n `M${x - w / 2} ${y}\n A${w / 2} ${w / 2} 0 1 0 ${x + w / 2} ${y}\n M${x - w / 2} ${y}\n A ${w / 2} ${w / 2} 0 1 1 ${x + w / 2} ${y}\n `,\n //square\n `M${x - w / 2} ${y - w / 2}\n L${x + w / 2} ${y - w / 2}\n L${x + w / 2} ${y + w / 2}\n L${x - w / 2} ${y + w / 2}\n Z`,\n //triangle\n `M${x - w / 2} ${y - 0.2886 * w}\n H ${x + w / 2}\n L${x} ${y + 0.5774 * w} Z`,\n //diamond\n `M${x} ${y - w / 2}\n L${x + w / 2} ${y}\n L${x} ${y + w / 2}\n L${x - w / 2} ${y}\n Z`,\n //pyramid\n `M${x} ${y - 0.5774 * w}\n L${x + w / 2} ${y + 0.2886 * w}\n L${x - w / 2} ${y + 0.2886 * w} Z`,\n //hexagon\n `M${x - 0.5 * w} ${y - 0.866 * w}\n L${x + 0.5 * w} ${y - 0.866 * w}\n L${x + w} ${y}\n L${x + 0.5 * w} ${y + 0.866 * w}\n L${x - 0.5 * w} ${y + 0.866 * w}\n L${x - w} ${y}\n Z`,\n //pentagon\n `M${x} ${y - 0.851 * w}\n L${x + 0.6884 * w} ${y - 0.2633 * w}\n L${x + 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.5001 * w} ${y + 0.6884 * w}\n L${x - 0.6884 * w} ${y - 0.2633 * w}\n Z`,\n //octagon\n `M${x - 0.5001 * w} ${y - 1.207 * w}\n L${x + 0.5001 * w} ${y - 1.207 * w}\n L${x + 1.207 * w} ${y - 0.5001 * w}\n L${x + 1.207 * w} ${y + 0.5001 * w}\n L${x + 0.5001 * w} ${y + 1.207 * w}\n L${x - 0.5001 * w} ${y + 1.207 * w}\n L${x - 1.207 * w} ${y + 0.5001 * w}\n L${x - 1.207 * w} ${y - 0.5001 * w}\n Z`,\n ];\n return allPointPaths[index];\n};\n\ntype LineChartDataWithIndex = LineChartPoints & { index: number };\n\n// Create a LineChart variant which uses these default styles and this styled subcomponent.\n/**\n * Linechart component\n * {@docCategory LineChart}\n */\nexport const LineChart: React.FunctionComponent<LineChartProps> = React.forwardRef<HTMLDivElement, LineChartProps>(\n (props, forwardedRef) => {\n let _points: LineChartDataWithIndex[] = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints: any[] = calloutData(_points) || [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xAxisScale: any = '';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _yAxisScale: any = '';\n let _circleId: string = useId('circle');\n let _lineId: string = useId('lineID');\n let _borderId: string = useId('borderID');\n let _verticalLine: string = useId('verticalLine');\n let _colorFillBarPatternId: string = useId('colorFillBarPattern');\n let _uniqueCallOutID: string | null = '';\n let _refArray: RefArrayData[] = [];\n let margins: Margins;\n let eventLabelHeight: number = 36;\n let lines: JSX.Element[];\n let _renderedColorFillBars: JSX.Element[];\n const _colorFillBars = React.useRef<ColorFillBarsProps[]>([]);\n let _tooltipId: string = useId('LineChartTooltipId_');\n let _rectId: string = useId('containerRectLD');\n let _staticHighlightCircle: string = useId('staticHighlightCircle');\n let _firstRenderOptimization = true;\n let _emptyChartId: string = useId('_LineChart_empty');\n const _colorFillBarId = useId('_colorFillBarId');\n const _isRTL: boolean = useRtl();\n let xAxisCalloutAccessibilityData: AccessibilityProps = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n\n props.eventAnnotationProps &&\n props.eventAnnotationProps.labelHeight &&\n (eventLabelHeight = props.eventAnnotationProps.labelHeight);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>(\n _injectIndexPropertyInLineChartData(props.data.lineChartData, true),\n );\n const [selectedColorBarLegend, setSelectedColorBarLegend] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(\n (props.legendProps?.selectedLegends?.length ?? 0) > 0,\n );\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [nearestCircleToHighlight, setNearestCircleToHighlight] = React.useState<LineChartDataPoint | null>(null);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<CustomizedCalloutData>();\n const [stackCalloutProps, setStackCalloutProps] = React.useState<CustomizedCalloutData>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n const pointsRef = React.useRef<LineChartDataWithIndex[] | []>([]);\n const calloutPointsRef = React.useRef<any[]>([]);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (_points !== _injectIndexPropertyInLineChartData(props.data.lineChartData) || props.data !== _points) {\n pointsRef.current = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _injectIndexPropertyInLineChartData(\n lineChartData?: LineChartPoints[],\n isFilterSelectedLegends: boolean = false,\n ): LineChartDataWithIndex[] | [] {\n const { allowMultipleShapesForPoints = false } = props;\n // Apply filter only if isPropChange is true\n const filteredData = isFilterSelectedLegends\n ? lineChartData?.filter(\n (item: LineChartPoints) =>\n props.legendProps?.selectedLegends?.includes(item.legend) ||\n props.legendProps?.selectedLegend === item.legend,\n )\n : lineChartData;\n return filteredData\n ? filteredData.map((item: LineChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: allowMultipleShapesForPoints ? index : -1,\n color,\n };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps)\n : null;\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _initializeLineChartData(\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n _xAxisScale = xScale;\n _yAxisScale = yScale;\n _renderedColorFillBars = props.colorFillBars ? _createColorFillBars(containerHeight) : [];\n lines = _createLines(xElement!, containerHeight!);\n }\n\n function _handleSingleLegendSelectionAction(lineChartItem: LineChartDataWithIndex | ColorFillBarsProps) {\n if (selectedLegend === lineChartItem.legend) {\n setSelectedLegend('');\n _handleLegendClick(lineChartItem, null);\n } else {\n setSelectedLegend(lineChartItem.legend);\n _handleLegendClick(lineChartItem, lineChartItem.legend);\n }\n }\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setSelectedColorBarLegend([]);\n setIsSelectedLegend(false);\n }\n\n function _handleLegendClick(\n lineChartItem: LineChartDataWithIndex | ColorFillBarsProps,\n selectedLegend: string | null | string[],\n ): void {\n if (lineChartItem.onLegendClick) {\n lineChartItem.onLegendClick(selectedLegend);\n }\n }\n\n function _createLegends(data: LineChartDataWithIndex[]): JSX.Element {\n const { legendProps, allowMultipleShapesForPoints = false } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: LineChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleLineLegendSelectionAction(point);\n } else {\n _handleSingleLegendSelectionAction(point);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n ...(allowMultipleShapesForPoints && {\n shape: Points[point.index % Object.keys(pointTypes).length] as Legend['shape'],\n }),\n };\n return legend;\n });\n\n const colorFillBarsLegendDataItems = props.colorFillBars\n ? props.colorFillBars.map((colorFillBar: ColorFillBarsProps, index: number) => {\n const title = colorFillBar.legend;\n const color = getColorFromToken(colorFillBar.color);\n const legend: Legend = {\n title,\n color,\n action: () => {\n if (isLegendMultiSelectEnabled) {\n _handleMultipleColorFillBarLegendSelectionAction(colorFillBar);\n } else {\n _handleSingleLegendSelectionAction(colorFillBar);\n }\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(title);\n },\n opacity: _getColorFillBarOpacity(colorFillBar),\n stripePattern: colorFillBar.applyPattern,\n };\n return legend;\n })\n : [];\n\n return (\n <Legends\n legends={[...legendDataItems, ...colorFillBarsLegendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n {...props.legendProps}\n />\n );\n }\n\n function _getBoxWidthOfShape(pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false, strokeWidth = DEFAULT_LINE_STROKE_SIZE } = props;\n if (allowMultipleShapesForPoints) {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else if (pointIndex === 1 || isLastPoint) {\n return strokeWidth * PATH_MULTIPLY_SIZE;\n } else {\n return PointSize.invisibleSize;\n }\n } else {\n if (activePoint === pointId) {\n return PointSize.hoverSize;\n } else {\n return PointSize.invisibleSize;\n }\n }\n }\n\n function _getPath(\n xPos: number,\n yPos: number,\n pointId: string,\n pointIndex: number,\n isLastPoint: boolean,\n pointOftheLine: number,\n ): string {\n const { allowMultipleShapesForPoints = false } = props;\n let w = _getBoxWidthOfShape(pointId, pointIndex, isLastPoint);\n const index: number = allowMultipleShapesForPoints ? pointOftheLine % Object.keys(pointTypes).length : 0;\n const widthRatio = pointTypes[index].widthRatio;\n w = widthRatio > 1 ? w / widthRatio : w;\n\n return _getPointPath(xPos, yPos, w, index);\n }\n function _getPointFill(lineColor: string, pointId: string, pointIndex: number, isLastPoint: boolean) {\n const { allowMultipleShapesForPoints = false } = props;\n if (allowMultipleShapesForPoints) {\n if (pointIndex === 1 || isLastPoint) {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n } else {\n if (activePoint === pointId) {\n return tokens.colorNeutralBackground1;\n } else {\n return lineColor;\n }\n }\n }\n\n function _createLines(xElement: SVGElement, containerHeight: number): JSX.Element[] {\n const lines: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points = selectedLegendPoints;\n } else {\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n }\n for (let i = _points.length - 1; i >= 0; i--) {\n const linesForLine: JSX.Element[] = [];\n const bordersForLine: JSX.Element[] = [];\n const pointsForLine: JSX.Element[] = [];\n\n const legendVal: string = _points[i].legend;\n const lineColor: string = _points[i].color!;\n const verticaLineHeight = containerHeight - margins.bottom! + 6;\n if (_points[i].data.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[0] as LineChartDataPoint;\n const circleId = `${_circleId}_${i}`;\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n pointsForLine.push(\n <circle\n id={circleId}\n key={circleId}\n r={activePoint === circleId ? 5.5 : 3.5}\n cx={_xAxisScale(x1)}\n cy={_yAxisScale(y1)}\n fill={activePoint === circleId ? tokens.colorNeutralBackground1 : lineColor}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={_points[i].legend !== '' ? 0 : undefined}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0}\n stroke={activePoint === circleId ? lineColor : ''}\n role=\"img\"\n aria-label={_getAriaLabel(i, 0)}\n data-is-focusable={isLegendSelected}\n ref={(e: SVGCircleElement | null) => {\n _refCallback(e!, circleId);\n }}\n onFocus={() => _handleFocus(circleId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[0].onDataPointClick)}\n />,\n );\n }\n\n let gapIndex = 0;\n const gaps = _points[i].gaps?.sort((a, b) => a.startIndex - b.startIndex) ?? [];\n const lineCurve = _points[i].lineOptions?.curve;\n\n // Use path rendering technique for larger datasets to optimize performance.\n if ((props.optimizeLargeData || lineCurve) && _points[i].data.length > 1) {\n const line = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => _xAxisScale(d[0]))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => _yAxisScale(d[1]))\n .curve(getCurveFactory(lineCurve));\n\n const lineId = `${_lineId}_${i}`;\n const borderId = `${_borderId}_${i}`;\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const lineData: [number, number][] = [];\n for (let k = 0; k < _points[i].data.length; k++) {\n lineData.push([\n _points[i].data[k].x instanceof Date\n ? (_points[i].data[k].x as Date).getTime()\n : (_points[i].data[k].x as number),\n _points[i].data[k].y,\n ]);\n }\n\n if (isLegendSelected) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <path\n id={borderId}\n key={borderId}\n d={line(lineData)!}\n fill=\"transparent\"\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={true}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event)}\n onMouseOut={_handleMouseOut}\n {..._getClickHandler(_points[i].onLineClick)}\n opacity={1}\n tabIndex={_points[i].legend !== '' ? 0 : undefined}\n />,\n );\n } else {\n linesForLine.push(\n <path\n id={lineId}\n key={lineId}\n d={line(lineData)!}\n fill=\"transparent\"\n data-is-focusable={false}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n opacity={0.1}\n />,\n );\n }\n\n pointsForLine.push(\n <circle\n id={`${_staticHighlightCircle}_${i}`}\n key={`${_staticHighlightCircle}_${i}`}\n r={5.5}\n cx={0}\n cy={0}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={DEFAULT_LINE_STROKE_SIZE}\n stroke={lineColor}\n visibility={'hidden'}\n onMouseMove={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event)}\n onMouseOver={event => _onMouseOverLargeDataset.bind(i, verticaLineHeight, event)}\n onMouseOut={_handleMouseOut}\n />,\n );\n } else if (!props.optimizeLargeData) {\n for (let j = 1; j < _points[i].data.length; j++) {\n const gapResult = _checkInGap(j, gaps, gapIndex);\n const isInGap = gapResult.isInGap;\n gapIndex = gapResult.gapIndex;\n\n const lineId = `${_lineId}_${i}_${j}`;\n const borderId = `${_borderId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const {\n x: x1,\n y: y1,\n xAxisCalloutData,\n xAxisCalloutAccessibilityData,\n } = _points[i].data[j - 1] as LineChartDataPoint;\n const { x: x2, y: y2 } = _points[i].data[j] as LineChartDataPoint;\n let path = _getPath(_xAxisScale(x1), _yAxisScale(y1), circleId, j, false, _points[i].index);\n const strokeWidth = _points[i].lineOptions?.strokeWidth || props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;\n\n const isLegendSelected: boolean =\n _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points[i].hideNonActiveDots && activePoint !== circleId;\n pointsForLine.push(\n <path\n id={circleId}\n key={circleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() => _handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j - 1].onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, circleId, j, false)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j - 1)}\n tabIndex={_points[i].legend !== '' ? 0 : undefined}\n />,\n );\n if (j + 1 === _points[i].data.length) {\n // If this is last point of the line segment.\n const lastCircleId = `${circleId}${j}L`;\n const hiddenHoverCircleId = `${circleId}${j}D`;\n const lastPointHidden = _points[i].hideNonActiveDots && activePoint !== lastCircleId;\n path = _getPath(_xAxisScale(x2), _yAxisScale(y2), lastCircleId, j, true, _points[i].index);\n const {\n xAxisCalloutData: lastCirlceXCallout,\n xAxisCalloutAccessibilityData: lastCirlceXCalloutAccessibilityData,\n } = _points[i].data[j];\n pointsForLine.push(\n <React.Fragment key={`${lastCircleId}_container`}>\n <path\n id={lastCircleId}\n key={lastCircleId}\n d={path}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n onFocus={() =>\n _handleFocus(lineId, x2, lastCirlceXCallout, lastCircleId, lastCirlceXCalloutAccessibilityData)\n }\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points[i].data[j].onDataPointClick)}\n opacity={isLegendSelected && !lastPointHidden ? 1 : 0.01}\n fill={_getPointFill(lineColor, lastCircleId, j, true)}\n stroke={lineColor}\n strokeWidth={strokeWidth}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={_points[i].legend !== '' ? 0 : undefined}\n />\n {/* Dummy circle acting as magnetic latch for last callout point */}\n <circle\n id={hiddenHoverCircleId}\n key={hiddenHoverCircleId}\n r={8}\n cx={_xAxisScale(x2)}\n cy={_yAxisScale(y2)}\n opacity={0}\n width={0}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x2,\n y2,\n verticaLineHeight,\n lastCirlceXCallout,\n lastCircleId,\n lastCirlceXCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n strokeWidth={0}\n focusable={false}\n onBlur={_handleMouseOut}\n />\n </React.Fragment>,\n );\n /* eslint-enable react/jsx-no-bind */\n }\n\n if (isLegendSelected) {\n // don't draw line if it is in a gap\n if (!isInGap) {\n const lineBorderWidth = _points[i].lineOptions?.lineBorderWidth\n ? Number.parseFloat(_points[i].lineOptions!.lineBorderWidth!.toString())\n : 0;\n if (lineBorderWidth > 0) {\n bordersForLine.push(\n <line\n id={borderId}\n key={borderId}\n x1={_xAxisScale(x1)}\n y1={_yAxisScale(y1)}\n x2={_xAxisScale(x2)}\n y2={_yAxisScale(y2)}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeWidth={Number.parseFloat(strokeWidth.toString()) + lineBorderWidth}\n stroke={_points[i].lineOptions?.lineBorderColor || tokens.colorNeutralBackground1}\n opacity={1}\n />,\n );\n }\n\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={_yAxisScale(y1)}\n x2={_xAxisScale(x2)}\n y2={_yAxisScale(y2)}\n strokeWidth={strokeWidth}\n ref={(e: SVGLineElement | null) => {\n _refCallback(e!, lineId);\n }}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(\n x1,\n y1,\n verticaLineHeight,\n xAxisCalloutData,\n circleId,\n xAxisCalloutAccessibilityData,\n event,\n )\n }\n onMouseOut={_handleMouseOut}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={1}\n {..._getClickHandler(_points[i].onLineClick)}\n />,\n );\n }\n } else {\n if (!isInGap) {\n linesForLine.push(\n <line\n id={lineId}\n key={lineId}\n x1={_xAxisScale(x1)}\n y1={_yAxisScale(y1)}\n x2={_xAxisScale(x2)}\n y2={_yAxisScale(y2)}\n strokeWidth={strokeWidth}\n stroke={lineColor}\n strokeLinecap={_points[i].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={_points[i].lineOptions?.strokeDasharray}\n strokeDashoffset={_points[i].lineOptions?.strokeDashoffset}\n opacity={0.1}\n />,\n );\n }\n }\n }\n }\n\n lines.push(\n <g\n key={`line_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`}\n >\n {bordersForLine}\n {linesForLine}\n {pointsForLine}\n </g>,\n );\n }\n const classes = useLineChartStyles(props);\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return lines;\n }\n\n function _createColorFillBars(containerHeight: number) {\n const colorFillBars: JSX.Element[] = [];\n if (isSelectedLegend) {\n _colorFillBars.current = selectedColorBarLegend;\n } else {\n _colorFillBars.current = props.colorFillBars!;\n }\n\n const yMinMaxValues = getMinMaxOfYAxis(_points, ChartTypes.LineChart);\n const FILL_Y_PADDING = 3;\n for (let i = 0; i < _colorFillBars.current.length; i++) {\n const colorFillBar = _colorFillBars.current[i];\n const colorFillBarId = `${_colorFillBarId}-${i}`;\n const color = getColorFromToken(colorFillBar.color);\n\n if (colorFillBar.applyPattern) {\n // Using a pattern element because CSS was unable to render diagonal stripes for rect elements\n colorFillBars.push(_getStripePattern(color, i));\n }\n\n for (let j = 0; j < colorFillBar.data.length; j++) {\n const startX = colorFillBar.data[j].startX;\n const endX = colorFillBar.data[j].endX;\n const opacity =\n _legendHighlighted(colorFillBar.legend) || _noLegendHighlighted() || isSelectedLegend\n ? _getColorFillBarOpacity(colorFillBar)\n : 0.1;\n colorFillBars.push(\n <rect\n fill={colorFillBar.applyPattern ? `url(#${_colorFillBarPatternId}_${i})` : color}\n fillOpacity={opacity}\n x={_isRTL ? _xAxisScale(endX) : _xAxisScale(startX)}\n y={_yAxisScale(yMinMaxValues.endValue) - FILL_Y_PADDING}\n width={Math.abs(_xAxisScale(endX) - _xAxisScale(startX))}\n height={_yAxisScale(props.yMinValue || 0) - _yAxisScale(yMinMaxValues.endValue) + FILL_Y_PADDING}\n key={`${colorFillBarId}${j}`}\n />,\n );\n }\n }\n return colorFillBars;\n }\n\n function _getStripePattern(color: string, id: number) {\n // This describes a tile pattern that resembles diagonal stripes\n // For more information: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n const stripePath = 'M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8';\n return (\n <pattern\n id={`${_colorFillBarPatternId}_${id}`}\n width={16}\n height={16}\n key={`${_colorFillBarPatternId}_${id}`}\n patternUnits={'userSpaceOnUse'}\n >\n <path d={stripePath} stroke={color} strokeWidth={1.25} />\n </pattern>\n );\n }\n\n function _checkInGap(pointIndex: number, gaps: LineChartGap[], currentGapIndex: number) {\n let gapIndex = currentGapIndex;\n let isInGap = false;\n\n while (gapIndex < gaps.length && pointIndex > gaps[gapIndex].endIndex) {\n gapIndex++;\n }\n\n if (gapIndex < gaps.length && pointIndex > gaps[gapIndex].startIndex && pointIndex <= gaps[gapIndex].endIndex) {\n isInGap = true;\n }\n return { isInGap, gapIndex };\n }\n\n function _refCallback(element: SVGGElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n const _onMouseOverLargeDataset = (\n linenumber: number,\n lineHeight: number,\n mouseEvent: React.MouseEvent<SVGRectElement | SVGPathElement | SVGCircleElement>,\n ) => {\n mouseEvent.persist();\n const { data } = props;\n const { lineChartData } = data;\n\n // This will get the value of the X when mouse is on the chart\n const xOffset = _xAxisScale.invert(pointer(mouseEvent)[0], document.getElementById(_rectId)!);\n const i = bisect(lineChartData![linenumber].data, xOffset);\n const d0 = lineChartData![linenumber].data[i - 1] as LineChartDataPoint;\n const d1 = lineChartData![linenumber].data[i] as LineChartDataPoint;\n let axisType: XAxisTypes | null = null;\n let xPointToHighlight: string | Date | number = 0;\n let index: null | number = null;\n if (d0 === undefined && d1 !== undefined) {\n xPointToHighlight = d1.x;\n index = i;\n } else if (d0 !== undefined && d1 === undefined) {\n xPointToHighlight = d0.x;\n index = i - 1;\n } else {\n axisType = getTypeOfAxis(lineChartData![linenumber].data[0].x, true) as XAxisTypes;\n let x0;\n let point0;\n let point1;\n switch (axisType) {\n case XAxisTypes.DateAxis:\n x0 = new Date(xOffset).getTime();\n point0 = (d0.x as Date).getTime();\n point1 = (d1.x as Date).getTime();\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n case XAxisTypes.NumericAxis:\n x0 = xOffset as number;\n point0 = d0.x as number;\n point1 = d1.x as number;\n xPointToHighlight = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? d1.x : d0.x;\n index = Math.abs(x0 - point0) > Math.abs(x0 - point1) ? i : i - 1;\n break;\n default:\n break;\n }\n }\n\n const { xAxisCalloutData } = lineChartData![linenumber].data[index as number];\n const formattedDate =\n xPointToHighlight instanceof Date ? formatDate(xPointToHighlight, props.useUTC) : xPointToHighlight;\n const modifiedXVal = xPointToHighlight instanceof Date ? xPointToHighlight.getTime() : xPointToHighlight;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const found: any = find(_calloutPoints, (element: { x: string | number }) => {\n return element.x === modifiedXVal;\n });\n const pointToHighlight: LineChartDataPoint = lineChartData![linenumber].data[index!] as LineChartDataPoint;\n const pointToHighlightUpdated =\n nearestCircleToHighlight === null ||\n (nearestCircleToHighlight !== null &&\n pointToHighlight !== null &&\n (nearestCircleToHighlight.x !== pointToHighlight.x || nearestCircleToHighlight.y !== pointToHighlight.y));\n // if no points need to be called out then don't show vertical line and callout card\n if (found && pointToHighlightUpdated) {\n _uniqueCallOutID = `#${_staticHighlightCircle}_${linenumber}`;\n\n d3Select(`#${_staticHighlightCircle}_${linenumber}`)\n .attr('cx', `${_xAxisScale(pointToHighlight.x)}`)\n .attr('cy', `${_yAxisScale(pointToHighlight.y)}`)\n .attr('visibility', 'visibility');\n\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(pointToHighlight.x)}, ${_yAxisScale(pointToHighlight.y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - _yAxisScale(pointToHighlight.y)}`);\n\n setNearestCircleToHighlight(pointToHighlight);\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setStackCalloutProps(found!);\n setYValueHover(found.values);\n setDataPointCalloutProps(found!);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue(formattedDate);\n setActivePoint('');\n }\n\n if (!found) {\n setPopoverOpen(false);\n setNearestCircleToHighlight(pointToHighlight);\n setActivePoint('');\n }\n };\n\n function _handleFocus(\n lineId: string,\n x: number | Date,\n\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: AccessibilityProps,\n ) {\n _uniqueCallOutID = circleId;\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: RefArrayData) => {\n if (obj.index === lineId) {\n setPopoverOpen(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n }\n\n function _handleHover(\n x: number | Date,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: AccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDate(x, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal);\n // if no points need to be called out then don't show vertical line and callout card\n\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale(x)}, ${_yAxisScale(y)})`)\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - 5 - _yAxisScale(y)}`);\n\n if (_uniqueCallOutID !== circleId) {\n _uniqueCallOutID = circleId;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setDataPointCalloutProps(found!);\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n } else {\n setActivePoint(circleId);\n setNearestCircleToHighlight(null);\n }\n }\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _handleMouseOut() {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }\n\n function _handleChartMouseLeave() {\n _uniqueCallOutID = null;\n setActivePoint('');\n if (isPopoverOpen) {\n setPopoverOpen(false);\n }\n }\n\n function _handleMultipleLineLegendSelectionAction(selectedLine: LineChartDataWithIndex) {\n const selectedLineIndex = selectedLegendPoints.reduce((acc, line, index) => {\n if (acc > -1 || line.legend !== selectedLine.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedLines: LineChartDataWithIndex[];\n if (selectedLineIndex === -1) {\n selectedLines = [...selectedLegendPoints, selectedLine];\n } else {\n selectedLines = selectedLegendPoints\n .slice(0, selectedLineIndex)\n .concat(selectedLegendPoints.slice(selectedLineIndex + 1));\n }\n\n const areAllLineLegendsSelected = props.data && selectedLines.length === props.data.lineChartData!.length;\n\n if (\n areAllLineLegendsSelected &&\n ((props.colorFillBars && props.colorFillBars.length === selectedColorBarLegend.length) || !props.colorFillBars)\n ) {\n // Clear all legends if all legends including color fill bar legends are selected\n // Or clear all legends if all legends are selected and there are no color fill bars\n _clearMultipleLegendSelections();\n } else if (!selectedLines.length && !selectedColorBarLegend.length) {\n // Clear all legends if no legends including color fill bar legends are selected\n _clearMultipleLegendSelections();\n } else {\n // Otherwise, set state when one or more legends are selected, including color fill bar legends\n setSelectedLegendPoints(selectedLines);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedLines.map((line: LineChartDataWithIndex) => line.legend);\n _handleLegendClick(selectedLine, selectedLegendTitlesToPass);\n }\n\n function _handleMultipleColorFillBarLegendSelectionAction(selectedColorFillBar: ColorFillBarsProps) {\n const selectedColorFillBarIndex = selectedColorBarLegend.reduce((acc, colorFillBar, index) => {\n if (acc > -1 || colorFillBar.legend !== selectedColorFillBar.legend) {\n return acc;\n } else {\n return index;\n }\n }, -1);\n\n let selectedColorFillBars: ColorFillBarsProps[];\n if (selectedColorFillBarIndex === -1) {\n selectedColorFillBars = [...selectedColorBarLegend, selectedColorFillBar];\n } else {\n selectedColorFillBars = selectedColorBarLegend\n .slice(0, selectedColorFillBarIndex)\n .concat(selectedColorBarLegend.slice(selectedColorFillBarIndex + 1));\n }\n\n const areAllColorFillBarLegendsSelected =\n selectedColorFillBars.length === (props.colorFillBars && props.colorFillBars!.length);\n\n if (\n areAllColorFillBarLegendsSelected &&\n ((props.data && props.data.lineChartData!.length === selectedLegendPoints.length) || !props.data)\n ) {\n // Clear all legends if all legends, including line legends, are selected\n // Or clear all legends if all legends are selected and there is no line data\n _clearMultipleLegendSelections();\n } else if (!selectedColorFillBars.length && !selectedLegendPoints.length) {\n // Clear all legends if no legends are selected, including line legends\n _clearMultipleLegendSelections();\n } else {\n // set state when one or more legends are selected, including line legends\n setSelectedColorBarLegend(selectedColorFillBars);\n setIsSelectedLegend(true);\n }\n\n const selectedLegendTitlesToPass = selectedColorFillBars.map(\n (colorFillBar: ColorFillBarsProps) => colorFillBar.legend,\n );\n _handleLegendClick(selectedColorFillBar, selectedLegendTitlesToPass);\n }\n\n function _clearMultipleLegendSelections() {\n setSelectedColorBarLegend([]);\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n function _legendHighlighted(legend: string) {\n return selectedLegend === legend || (selectedLegend === '' && activeLegend === legend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n function _getColorFillBarOpacity(colorFillBar: ColorFillBarsProps) {\n return colorFillBar.applyPattern ? 1 : 0.4;\n }\n\n function _getAriaLabel(lineIndex: number, pointIndex: number): string {\n const line = _points[lineIndex];\n const point = line.data[pointIndex];\n const formattedDate = point.x instanceof Date ? formatDate(point.x, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = line.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.lineChartData &&\n props.data.lineChartData.length > 0 &&\n props.data.lineChartData.filter((item: LineChartPoints) => item.data.length).length > 0\n );\n }\n\n const { legendProps, tickValues, tickFormat, eventAnnotationProps } = props;\n _points = _injectIndexPropertyInLineChartData(props.data.lineChartData);\n\n const isXAxisDateType = getXAxisType(_points);\n let points = _points;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: true,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={props.data.chartTitle}\n points={points}\n chartType={ChartTypes.LineChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={_getMargins}\n getGraphData={_initializeLineChartData}\n xAxisType={isXAxisDateType ? XAxisTypes.DateAxis : XAxisTypes.NumericAxis}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={props.enablePerfOptimization && _firstRenderOptimization}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n _xAxisScale = props.xScale!;\n _yAxisScale = props.yScale!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={props.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n {props.optimizeLargeData ? (\n <rect id={_rectId} width={props.containerWidth} height={props.containerHeight} fill={'transparent'} />\n ) : (\n <></>\n )}\n <g>\n {_renderedColorFillBars}\n {lines}\n </g>\n {eventAnnotationProps && (\n <EventsAnnotation\n {...eventAnnotationProps}\n scale={props.xScale!}\n chartYTop={margins.top! + eventLabelHeight}\n chartYBottom={props.containerHeight! - 35}\n />\n )}\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nLineChart.displayName = 'LineChart';\n"],"names":["React","useLineChartStyles","select","d3Select","pointer","bisector","Legends","line","d3Line","useId","find","CartesianChart","EventsAnnotation","tokens","calloutData","ChartTypes","getXAxisType","XAxisTypes","tooltipOfXAxislabels","Points","pointTypes","getMinMaxOfYAxis","getTypeOfAxis","getNextColor","getColorFromToken","useRtl","formatDate","getCurveFactory","PointSize","bisect","d","x","left","DEFAULT_LINE_STROKE_SIZE","PATH_MULTIPLY_SIZE","_getPointPath","y","w","index","allPointPaths","LineChart","forwardRef","props","forwardedRef","_points","_injectIndexPropertyInLineChartData","data","lineChartData","_calloutPoints","_xAxisScale","_yAxisScale","_circleId","_lineId","_borderId","_verticalLine","_colorFillBarPatternId","_uniqueCallOutID","_refArray","margins","eventLabelHeight","lines","_renderedColorFillBars","_colorFillBars","useRef","_tooltipId","_rectId","_staticHighlightCircle","_firstRenderOptimization","_emptyChartId","_colorFillBarId","_isRTL","xAxisCalloutAccessibilityData","cartesianChartRef","eventAnnotationProps","labelHeight","hoverXValue","setHoverXValue","useState","activeLegend","setActiveLegend","YValueHover","setYValueHover","selectedLegend","setSelectedLegend","selectedLegendPoints","setSelectedLegendPoints","selectedColorBarLegend","setSelectedColorBarLegend","isSelectedLegend","setIsSelectedLegend","legendProps","selectedLegends","length","activePoint","setActivePoint","nearestCircleToHighlight","setNearestCircleToHighlight","dataPointCalloutProps","setDataPointCalloutProps","stackCalloutProps","setStackCalloutProps","clickPosition","setClickPosition","isPopoverOpen","setPopoverOpen","pointsRef","calloutPointsRef","useEffect","current","height","width","useImperativeHandle","componentRef","chartContainer","isFilterSelectedLegends","allowMultipleShapesForPoints","filteredData","filter","item","includes","legend","map","color","updatePosition","newX","newY","threshold","distance","Math","sqrt","pow","_getCustomizedCallout","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_getMargins","_margins","_initializeLineChartData","xScale","yScale","containerHeight","containerWidth","xElement","colorFillBars","_createColorFillBars","_createLines","_handleSingleLegendSelectionAction","lineChartItem","_handleLegendClick","_onHoverCardHide","onLegendClick","_createLegends","isLegendMultiSelectEnabled","canSelectMultipleLegends","legendDataItems","point","title","action","_handleMultipleLineLegendSelectionAction","onMouseOutAction","hoverAction","_handleChartMouseLeave","legendShape","shape","Object","keys","colorFillBarsLegendDataItems","colorFillBar","_handleMultipleColorFillBarLegendSelectionAction","opacity","_getColorFillBarOpacity","stripePattern","applyPattern","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onLegendHoverCardLeave","_getBoxWidthOfShape","pointId","pointIndex","isLastPoint","strokeWidth","_getPath","xPos","yPos","pointOftheLine","widthRatio","_getPointFill","lineColor","colorNeutralBackground1","i","linesForLine","bordersForLine","pointsForLine","legendVal","verticaLineHeight","bottom","x1","y1","xAxisCalloutData","circleId","isLegendSelected","_legendHighlighted","_noLegendHighlighted","push","circle","id","key","r","cx","cy","fill","tabIndex","undefined","onMouseOver","event","_handleHover","onMouseMove","onMouseOut","_handleMouseOut","stroke","role","aria-label","_getAriaLabel","data-is-focusable","ref","e","_refCallback","onFocus","_handleFocus","onBlur","_getClickHandler","onDataPointClick","gapIndex","gaps","sort","a","b","startIndex","lineCurve","lineOptions","curve","optimizeLargeData","lineId","borderId","lineData","k","Date","getTime","lineBorderWidth","Number","parseFloat","toString","path","strokeLinecap","lineBorderColor","_onMouseOverLargeDataset","bind","onLineClick","visibility","j","gapResult","_checkInGap","isInGap","x2","y2","currentPointHidden","hideNonActiveDots","lastCircleId","hiddenHoverCircleId","lastPointHidden","lastCirlceXCallout","lastCirlceXCalloutAccessibilityData","Fragment","focusable","strokeDasharray","strokeDashoffset","g","classes","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","xAxis","yMinMaxValues","FILL_Y_PADDING","colorFillBarId","_getStripePattern","startX","endX","rect","fillOpacity","endValue","abs","yMinValue","stripePath","pattern","patternUnits","currentGapIndex","endIndex","element","legendTitle","refElement","linenumber","lineHeight","mouseEvent","persist","xOffset","invert","d0","d1","axisType","xPointToHighlight","x0","point0","point1","DateAxis","NumericAxis","formattedDate","useUTC","modifiedXVal","found","pointToHighlight","pointToHighlightUpdated","attr","clientX","clientY","values","formattedData","xVal","forEach","obj","func","onClick","selectedLine","selectedLineIndex","reduce","acc","selectedLines","slice","concat","areAllLineLegendsSelected","_clearMultipleLegendSelections","selectedLegendTitlesToPass","selectedColorFillBar","selectedColorFillBarIndex","selectedColorFillBars","areAllColorFillBarLegendsSelected","lineIndex","xValue","yValue","yAxisCalloutData","callOutAccessibilityData","ariaLabel","_isChartEmpty","tickValues","tickFormat","isXAxisDateType","points","legendBars","hideLegend","calloutProps","descriptionMessage","getCalloutDescriptionMessage","isCalloutForStack","culture","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","chartTitle","chartType","getmargins","getGraphData","xAxisType","onChartMouseLeave","enableFirstRenderOptimization","enablePerfOptimization","children","scale","chartYTop","top","chartYBottom","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,cAAc;gBAAE/B,QAAQnE,MAAMiG,eAAe;gBAAEyE,MAAM;+BAErF,yDAEF,oBAACkE,WACEzN,wBACAD,QAEFa,sCACC,oBAAC7D;gBACE,GAAG6D,oBAAoB;gBACxB2T,OAAO1V,MAAM+F,MAAM;gBACnB4P,WAAW3U,QAAQ4U,GAAG,GAAI3U;gBAC1B4U,cAAc7V,MAAMiG,eAAe,GAAI;;QAMnD;uBAGF,oBAAC6P;QAAIzL,IAAI3I;QAAe0J,MAAM;QAAS2K,OAAO;YAAEjO,SAAS;QAAI;QAAGuD,cAAY;;AAEhF,GACA;AACFvL,UAAUkW,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"rangeMappings":";;","mappings":"AAAA,uDAAuD,GA+HvD;;CAEC,GACD,WAGC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { findIndex } from '../../../utilities/index';
|
|
4
|
+
import { LabelLink } from './LabelLink';
|
|
5
|
+
import { getColorFromToken } from '../../../utilities/colors';
|
|
6
|
+
export const EventsAnnotation = (props)=>{
|
|
7
|
+
const textWidth = props.labelWidth ? props.labelWidth : 105;
|
|
8
|
+
const textY = props.chartYTop - 20;
|
|
9
|
+
const lineTopY = textY + 7;
|
|
10
|
+
const textPadding = 5;
|
|
11
|
+
const lineHeight = 18;
|
|
12
|
+
const fontSize = '10pt';
|
|
13
|
+
const axisRange = props.scale.range();
|
|
14
|
+
const lineDefs = props.events.map((e)=>({
|
|
15
|
+
...e,
|
|
16
|
+
x: props.scale(e.date)
|
|
17
|
+
}));
|
|
18
|
+
lineDefs.sort((e1, e2)=>+e1.date - +e2.date);
|
|
19
|
+
const fill = props.strokeColor ? getColorFromToken(props.strokeColor, false) : tokens.colorNeutralForeground1;
|
|
20
|
+
const lines = uniqBy(lineDefs, (x)=>x.date.toString()).map((x, i)=>/*#__PURE__*/ React.createElement("line", {
|
|
21
|
+
key: i,
|
|
22
|
+
x1: x.x,
|
|
23
|
+
x2: x.x,
|
|
24
|
+
y1: lineTopY,
|
|
25
|
+
y2: props.chartYBottom,
|
|
26
|
+
stroke: fill,
|
|
27
|
+
strokeDasharray: "8"
|
|
28
|
+
}));
|
|
29
|
+
const labelLinks = calculateLabels(lineDefs, textWidth + textPadding, axisRange[1], axisRange[0]).map((x, i)=>/*#__PURE__*/ React.createElement(LabelLink, {
|
|
30
|
+
key: i,
|
|
31
|
+
lineDefs,
|
|
32
|
+
labelDef: x,
|
|
33
|
+
textY,
|
|
34
|
+
textWidth,
|
|
35
|
+
textLineHeight: lineHeight,
|
|
36
|
+
textFontSize: fontSize,
|
|
37
|
+
textColor: props.labelColor,
|
|
38
|
+
mergedLabel: props.mergedLabel
|
|
39
|
+
}));
|
|
40
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, lines, labelLinks);
|
|
41
|
+
};
|
|
42
|
+
function calculateLabels(lineDefs, textWidth, maxX, minX) {
|
|
43
|
+
const calculateLabel = (lastX, currentIdx)=>{
|
|
44
|
+
// base case 1
|
|
45
|
+
if (currentIdx === lineDefs.length) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const { x } = lineDefs[currentIdx];
|
|
49
|
+
const leftXBoundary = x - textWidth;
|
|
50
|
+
// cannot render on top of other text
|
|
51
|
+
if (x < lastX) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
// base case 2
|
|
55
|
+
if (currentIdx === lineDefs.length - 1) {
|
|
56
|
+
if (lastX < leftXBoundary) {
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
x: x,
|
|
60
|
+
anchor: 'end',
|
|
61
|
+
aggregatedIdx: [
|
|
62
|
+
currentIdx
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
} else if (x + textWidth < maxX) {
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
x: x,
|
|
70
|
+
anchor: 'start',
|
|
71
|
+
aggregatedIdx: [
|
|
72
|
+
currentIdx
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
if (lastX < leftXBoundary) {
|
|
80
|
+
// label on left side
|
|
81
|
+
return backtrack(currentIdx, 'end');
|
|
82
|
+
} else {
|
|
83
|
+
// label on right side
|
|
84
|
+
return backtrack(currentIdx, 'start');
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const backtrack = (currentIdx, anchor)=>{
|
|
88
|
+
const bd = anchor === 'end' ? lineDefs[currentIdx].x : lineDefs[currentIdx].x + textWidth;
|
|
89
|
+
let idx = findIndex(lineDefs, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
|
+
(ds)=>ds.x > bd && (ds.x - textWidth >= bd || ds.x + textWidth < maxX), currentIdx + 1);
|
|
91
|
+
if (idx === -1) {
|
|
92
|
+
idx = lineDefs.length;
|
|
93
|
+
}
|
|
94
|
+
const aggregatedIdx = [];
|
|
95
|
+
for(let i = currentIdx; i < idx; i++){
|
|
96
|
+
aggregatedIdx.push(i);
|
|
97
|
+
}
|
|
98
|
+
const next = calculateLabel(bd, idx);
|
|
99
|
+
next.unshift({
|
|
100
|
+
x: lineDefs[currentIdx].x,
|
|
101
|
+
anchor,
|
|
102
|
+
aggregatedIdx
|
|
103
|
+
});
|
|
104
|
+
return next;
|
|
105
|
+
};
|
|
106
|
+
return calculateLabel(minX, 0);
|
|
107
|
+
}
|
|
108
|
+
/** Get unique items of `arr`, comparing based on the result of calling `iteratee` on each item. */ function uniqBy(arr, iteratee) {
|
|
109
|
+
const seen = [];
|
|
110
|
+
const result = [];
|
|
111
|
+
for (const x of arr){
|
|
112
|
+
const comp = iteratee(x);
|
|
113
|
+
if (seen.indexOf(comp) === -1) {
|
|
114
|
+
result.push(x);
|
|
115
|
+
seen.push(comp);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["EventAnnotation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScaleTime } from 'd3-scale';\nimport { tokens } from '@fluentui/react-theme';\nimport { findIndex } from '../../../utilities/index';\nimport { LineDef, LabelLink, LabelDef } from './LabelLink';\nimport { EventsAnnotationProps } from '../LineChart.types';\nimport { getColorFromToken } from '../../../utilities/colors';\n\ninterface IEventsAnnotationExtendProps extends EventsAnnotationProps {\n scale: ScaleTime<number, number>;\n chartYBottom: number;\n chartYTop: number;\n}\n\nexport const EventsAnnotation: React.FunctionComponent<IEventsAnnotationExtendProps> = props => {\n const textWidth = props.labelWidth ? props.labelWidth : 105;\n const textY = props.chartYTop - 20;\n const lineTopY = textY + 7;\n const textPadding = 5;\n const lineHeight = 18;\n const fontSize = '10pt';\n const axisRange = props.scale.range();\n\n const lineDefs: LineDef[] = props.events.map(e => ({ ...e, x: props.scale(e.date) }));\n\n lineDefs.sort((e1, e2) => +e1.date - +e2.date);\n\n const fill: string | undefined = props.strokeColor\n ? getColorFromToken(props.strokeColor, false /*ToDo fix */)\n : tokens.colorNeutralForeground1;\n\n const lines = uniqBy(lineDefs, x => x.date.toString()).map((x, i) => (\n <line key={i} x1={x.x} x2={x.x} y1={lineTopY} y2={props.chartYBottom} stroke={fill} strokeDasharray=\"8\" />\n ));\n\n const labelLinks = calculateLabels(lineDefs, textWidth + textPadding, axisRange[1], axisRange[0]).map((x, i) => (\n <LabelLink\n key={i}\n {...{\n lineDefs,\n labelDef: x,\n textY,\n textWidth,\n textLineHeight: lineHeight,\n textFontSize: fontSize,\n textColor: props.labelColor,\n mergedLabel: props.mergedLabel,\n }}\n />\n ));\n\n return (\n <>\n {lines}\n {labelLinks}\n </>\n );\n};\n\nfunction calculateLabels(lineDefs: LineDef[], textWidth: number, maxX: number, minX: number): LabelDef[] {\n const calculateLabel = (lastX: number, currentIdx: number): LabelDef[] => {\n // base case 1\n if (currentIdx === lineDefs.length) {\n return [];\n }\n\n const { x } = lineDefs[currentIdx];\n const leftXBoundary = x - textWidth;\n\n // cannot render on top of other text\n if (x < lastX) {\n return [];\n }\n\n // base case 2\n if (currentIdx === lineDefs.length - 1) {\n if (lastX < leftXBoundary) {\n return [{ x: x, anchor: 'end', aggregatedIdx: [currentIdx] }];\n } else if (x + textWidth < maxX) {\n return [{ x: x, anchor: 'start', aggregatedIdx: [currentIdx] }];\n }\n\n return [];\n }\n\n if (lastX < leftXBoundary) {\n // label on left side\n return backtrack(currentIdx, 'end');\n } else {\n // label on right side\n return backtrack(currentIdx, 'start');\n }\n };\n\n const backtrack = (currentIdx: number, anchor: 'start' | 'end'): LabelDef[] => {\n const bd = anchor === 'end' ? lineDefs[currentIdx].x : lineDefs[currentIdx].x + textWidth;\n\n let idx = findIndex(\n lineDefs,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ds => ds.x > bd && (ds.x - textWidth >= bd || ds.x + textWidth < maxX),\n currentIdx + 1,\n );\n if (idx === -1) {\n idx = lineDefs.length;\n }\n\n const aggregatedIdx: number[] = [];\n for (let i = currentIdx; i < idx; i++) {\n aggregatedIdx.push(i);\n }\n const next = calculateLabel(bd, idx);\n\n next.unshift({ x: lineDefs[currentIdx].x, anchor, aggregatedIdx });\n return next;\n };\n\n return calculateLabel(minX, 0);\n}\n\n/** Get unique items of `arr`, comparing based on the result of calling `iteratee` on each item. */\nfunction uniqBy<T>(arr: T[], iteratee: (x: T) => string): T[] {\n const seen: string[] = [];\n const result: T[] = [];\n for (const x of arr) {\n const comp = iteratee(x);\n if (seen.indexOf(comp) === -1) {\n result.push(x);\n seen.push(comp);\n }\n }\n return result;\n}\n"],"names":["React","tokens","findIndex","LabelLink","getColorFromToken","EventsAnnotation","props","textWidth","labelWidth","textY","chartYTop","lineTopY","textPadding","lineHeight","fontSize","axisRange","scale","range","lineDefs","events","map","e","x","date","sort","e1","e2","fill","strokeColor","colorNeutralForeground1","lines","uniqBy","toString","i","line","key","x1","x2","y1","y2","chartYBottom","stroke","strokeDasharray","labelLinks","calculateLabels","labelDef","textLineHeight","textFontSize","textColor","labelColor","mergedLabel","maxX","minX","calculateLabel","lastX","currentIdx","length","leftXBoundary","anchor","aggregatedIdx","backtrack","bd","idx","ds","push","next","unshift","arr","iteratee","seen","result","comp","indexOf"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAAkBC,SAAS,QAAkB,cAAc;AAE3D,SAASC,iBAAiB,QAAQ,4BAA4B;AAQ9D,OAAO,MAAMC,mBAA0EC,CAAAA;IAC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AAYtB,IAAI6B,KAAK7B,IAAK;YACrC0B,cAAcK,IAAI,CAAC/B;QACrB;QACA,MAAMgC,OAAOZ,eAAeQ,IAAIC;QAEhCG,KAAKC,OAAO,CAAC;YAAE5C,GAAGJ,QAAQ,CAACqC,WAAW,CAACjC,CAAC;YAAEoC;YAAQC;QAAc;QAChE,OAAOM;IACT;IAEA,OAAOZ,eAAeD,MAAM;AAC9B;AAEA,iGAAiG,GACjG,SAASrB,OAAUoC,GAAQ,EAAEC,QAA0B;IACrD,MAAMC,OAAiB,EAAE;IACzB,MAAMC,SAAc,EAAE;IACtB,KAAK,MAAMhD,KAAK6C,IAAK;QACnB,MAAMI,OAAOH,SAAS9C;QACtB,IAAI+C,KAAKG,OAAO,CAACD,UAAU,CAAC,GAAG;YAC7BD,OAAON,IAAI,CAAC1C;YACZ+C,KAAKL,IAAI,CAACO;QACZ;IACF;IACA,OAAOD;AACT"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Textbox } from './Textbox';
|
|
3
|
+
import { getColorFromToken } from '../../../utilities/colors';
|
|
4
|
+
import { tokens } from '@fluentui/react-theme';
|
|
5
|
+
export const LabelLink = (props)=>{
|
|
6
|
+
const gRef = React.useRef(null);
|
|
7
|
+
const [showCard, setShowCard] = React.useState(false);
|
|
8
|
+
const onClick = ()=>setShowCard(true);
|
|
9
|
+
let callout = null;
|
|
10
|
+
if (showCard) {
|
|
11
|
+
const cards = props.labelDef.aggregatedIdx.map((i)=>props.lineDefs[i].onRenderCard).filter((c)=>!!c);
|
|
12
|
+
if (cards.length > 0) {
|
|
13
|
+
callout = null;
|
|
14
|
+
// TODO - need to replace callout with popover
|
|
15
|
+
/*callout = {
|
|
16
|
+
/* <Callout
|
|
17
|
+
target={gRef.current}
|
|
18
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
19
|
+
onDismiss={onDismiss}
|
|
20
|
+
setInitialFocus={true}
|
|
21
|
+
role="dialog"
|
|
22
|
+
>
|
|
23
|
+
<FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>
|
|
24
|
+
<List<() => React.ReactNode>
|
|
25
|
+
items={cards}
|
|
26
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
27
|
+
onRenderCell={onRenderCell}
|
|
28
|
+
/>
|
|
29
|
+
</FocusZone>
|
|
30
|
+
</Callout>
|
|
31
|
+
};*/ }
|
|
32
|
+
}
|
|
33
|
+
let text;
|
|
34
|
+
const fill = props.textColor ? getColorFromToken(props.textColor, false) : tokens.colorNeutralForeground1;
|
|
35
|
+
if (props.labelDef.aggregatedIdx.length === 1) {
|
|
36
|
+
text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;
|
|
37
|
+
} else {
|
|
38
|
+
text = props.mergedLabel(props.labelDef.aggregatedIdx.length);
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("g", {
|
|
41
|
+
ref: gRef,
|
|
42
|
+
onClick: onClick,
|
|
43
|
+
"data-is-focusable": false,
|
|
44
|
+
style: {
|
|
45
|
+
cursor: 'pointer'
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/ React.createElement(Textbox, {
|
|
48
|
+
text: text,
|
|
49
|
+
x: props.labelDef.x,
|
|
50
|
+
y: props.textY,
|
|
51
|
+
width: props.textWidth,
|
|
52
|
+
lineHeight: props.textLineHeight,
|
|
53
|
+
textAnchor: props.labelDef.anchor,
|
|
54
|
+
fontSize: props.textFontSize,
|
|
55
|
+
fill: fill
|
|
56
|
+
})), callout);
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LabelLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EventAnnotation } from '../../../types/EventAnnotation';\nimport { Textbox } from './Textbox';\nimport { getColorFromToken } from '../../../utilities/colors';\nimport { tokens } from '@fluentui/react-theme';\n\nexport interface LineDef extends EventAnnotation {\n x: number;\n}\n\nexport interface LabelDef {\n x: number;\n aggregatedIdx: number[];\n anchor: 'start' | 'end';\n}\n\ninterface LabelLinkProps {\n lineDefs: LineDef[];\n labelDef: LabelDef;\n textY: number;\n textWidth: number;\n textLineHeight: number;\n textFontSize: string;\n textColor: string | undefined;\n mergedLabel: (count: number) => string;\n}\n\nexport const LabelLink: React.FunctionComponent<LabelLinkProps> = props => {\n const gRef = React.useRef<SVGGElement>(null);\n const [showCard, setShowCard] = React.useState(false);\n const onClick = () => setShowCard(true);\n\n let callout: React.ReactNode = null;\n if (showCard) {\n const cards = props.labelDef.aggregatedIdx.map(i => props.lineDefs[i].onRenderCard!).filter(c => !!c);\n if (cards.length > 0) {\n callout = null;\n // TODO - need to replace callout with popover\n /*callout = {\n /* <Callout\n target={gRef.current}\n // eslint-disable-next-line react/jsx-no-bind\n onDismiss={onDismiss}\n setInitialFocus={true}\n role=\"dialog\"\n >\n <FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>\n <List<() => React.ReactNode>\n items={cards}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderCell={onRenderCell}\n />\n </FocusZone>\n </Callout>\n };*/\n }\n }\n\n let text: string;\n const fill: string | undefined = props.textColor\n ? getColorFromToken(props.textColor, false)\n : tokens.colorNeutralForeground1;\n\n if (props.labelDef.aggregatedIdx.length === 1) {\n text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;\n } else {\n text = props.mergedLabel(props.labelDef.aggregatedIdx.length);\n }\n\n return (\n <>\n <g ref={gRef} onClick={onClick} data-is-focusable={false} style={{ cursor: 'pointer' }}>\n <Textbox\n text={text}\n x={props.labelDef.x}\n y={props.textY}\n width={props.textWidth}\n lineHeight={props.textLineHeight}\n textAnchor={props.labelDef.anchor}\n fontSize={props.textFontSize}\n fill={fill}\n />\n </g>\n {callout}\n </>\n );\n};\n"],"names":["React","Textbox","getColorFromToken","tokens","LabelLink","props","gRef","useRef","showCard","setShowCard","useState","onClick","callout","cards","labelDef","aggregatedIdx","map","i","lineDefs","onRenderCard","filter","c","length","text","fill","textColor","colorNeutralForeground1","event","mergedLabel","g","ref","data-is-focusable","style","cursor","x","y","textY","width","textWidth","lineHeight","textLineHeight","textAnchor","anchor","fontSize","textFontSize"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,MAAM,QAAQ,wBAAwB;AAuB/C,OAAO,MAAMC,YAAqDC,CAAAA;IAChE,MAAMC,OAAON,MAAMO,MAAM,CAAc;IACvC,MAAM,CAACC,UAAUC,YAAY,GAAGT,MAAMU,QAAQ,CAAC;IAC/C,MAAMC,UAAU,IAAMF,YAAY;IAElC,IAAIG,UAA2B;IAC/B,IAAIJ,UAAU;QACZ,MAAMK,QAAQR,MAAMS,QAAQ,CAACC,aAAa,CAACC,GAAG,CAACC,CAAAA,IAAKZ,MAAMa,QAAQ,CAACD,EAAE,CAACE,YAAY,EAAGC,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA;QACnG,IAAIR,MAAMS,MAAM,GAAG,GAAG;YACpBV,UAAU;QACV,8CAA8C;QAC9C;;;;;;;;;;;;;;;;QAgBE,GACJ;IACF;IAEA,IAAIW;IACJ,MAAMC,OAA2BnB,MAAMoB,SAAS,GAC5CvB,kBAAkBG,MAAMoB,SAAS,EAAE,SACnCtB,OAAOuB,uBAAuB;IAElC,IAAIrB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM,KAAK,GAAG;QAC7CC,OAAOlB,MAAMa,QAAQ,CAACb,MAAMS,QAAQ,CAACC,aAAa,CAAC,EAAE,CAAC,CAACY,KAAK;IAC9D,OAAO;QACLJ,OAAOlB,MAAMuB,WAAW,CAACvB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM;IAC9D;IAEA,qBACE,wDACE,oBAACO;QAAEC,KAAKxB;QAAMK,SAASA;QAASoB,qBAAmB;QAAOC,OAAO;YAAEC,QAAQ;QAAU;qBACnF,oBAAChC;QACCsB,MAAMA;QACNW,GAAG7B,MAAMS,QAAQ,CAACoB,CAAC;QACnBC,GAAG9B,MAAM+B,KAAK;QACdC,OAAOhC,MAAMiC,SAAS;QACtBC,YAAYlC,MAAMmC,cAAc;QAChCC,YAAYpC,MAAMS,QAAQ,CAAC4B,MAAM;QACjCC,UAAUtC,MAAMuC,YAAY;QAC5BpB,MAAMA;SAGTZ;AAGP,EAAE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { select } from 'd3-selection';
|
|
3
|
+
export const Textbox = (props)=>{
|
|
4
|
+
const textElementRef = React.useRef(null);
|
|
5
|
+
const wrapWords = ()=>{
|
|
6
|
+
if (!textElementRef.current) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const text = select(textElementRef.current);
|
|
10
|
+
const words = props.text.split(/\s+/);
|
|
11
|
+
let line = [];
|
|
12
|
+
let tspan = text.append('tspan');
|
|
13
|
+
let numLines = 0;
|
|
14
|
+
words.forEach((word)=>{
|
|
15
|
+
line.push(word);
|
|
16
|
+
tspan.text(line.join(' '));
|
|
17
|
+
const node = tspan.node();
|
|
18
|
+
if (node && node.getComputedTextLength() > props.width && line.length > 1) {
|
|
19
|
+
numLines++;
|
|
20
|
+
line.pop();
|
|
21
|
+
tspan.text(line.join(' '));
|
|
22
|
+
line = [
|
|
23
|
+
word
|
|
24
|
+
];
|
|
25
|
+
tspan = text.append('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
// bottom aligns text
|
|
29
|
+
text.attr('dy', -numLines * props.lineHeight);
|
|
30
|
+
return ()=>{
|
|
31
|
+
text.selectAll('tspan').remove();
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
React.useEffect(wrapWords);
|
|
35
|
+
const { lineHeight, ...rest } = props;
|
|
36
|
+
return /*#__PURE__*/ React.createElement("text", {
|
|
37
|
+
ref: textElementRef,
|
|
38
|
+
...rest
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Textbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { select } from 'd3-selection';\n\ninterface TextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<TextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...rest} />;\n};\n"],"names":["React","select","Textbox","props","textElementRef","useRef","wrapWords","current","text","words","split","line","tspan","append","numLines","forEach","word","push","join","node","getComputedTextLength","width","length","pop","attr","lineHeight","x","selectAll","remove","useEffect","rest","ref"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAQ,eAAe;AAatC,OAAO,MAAMC,UAAiDC,CAAAA;IAC5D,MAAMC,iBAAkDJ,MAAMK,MAAM,CAAC;IAErE,MAAMC,YAAY;QAChB,IAAI,CAACF,eAAeG,OAAO,EAAE;YAC3B;QACF;QACA,MAAMC,OAAOP,OAAOG,eAAeG,OAAO;QAC1C,MAAME,QAAQN,MAAMK,IAAI,CAACE,KAAK,CAAC;QAC/B,IAAIC,OAAiB,EAAE;QACvB,IAAIC,QAAQJ,KAAKK,MAAM,CAAkB;QACzC,IAAIC,WAAW;QAEfL,MAAMM,OAAO,CAACC,CAAAA;YACZL,KAAKM,IAAI,CAACD;YACVJ,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;YACrB,MAAMC,OAAOP,MAAMO,IAAI;YACvB,IAAIA,QAAQA,KAAKC,qBAAqB,KAAKjB,MAAMkB,KAAK,IAAIV,KAAKW,MAAM,GAAG,GAAG;gBACzER;gBACAH,KAAKY,GAAG;gBACRX,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;gBACrBP,OAAO;oBAACK;iBAAK;gBACbJ,QAAQJ,KAAKK,MAAM,CAAkB,SAASL,IAAI,CAACQ,MAAMQ,IAAI,CAAC,MAAMrB,MAAMsB,UAAU,EAAED,IAAI,CAAC,KAAKrB,MAAMuB,CAAC;YACzG;QACF;QACA,qBAAqB;QACrBlB,KAAKgB,IAAI,CAAC,MAAM,CAACV,WAAWX,MAAMsB,UAAU;QAE5C,OAAO;YACLjB,KAAKmB,SAAS,CAAC,SAASC,MAAM;QAChC;IACF;IACA5B,MAAM6B,SAAS,CAACvB;IAEhB,MAAM,EAAEmB,UAAU,EAAE,GAAGK,MAAM,GAAG3B;IAEhC,qBAAO,oBAACK;QAAKuB,KAAK3B;QAAiB,GAAG0B,IAAI;;AAC5C,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './LineChart';\nexport * from './LineChart.types';\nexport * from './eventAnnotation/Textbox';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;;","mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,4BAA4B;AAC1C,cAAc,oBAAoB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export const linechartClassNames = {
|
|
7
|
+
tooltip: 'fui-line__tooltip',
|
|
8
|
+
root: 'fui-line__root',
|
|
9
|
+
xAxis: 'fui-line__xAxis',
|
|
10
|
+
yAxis: 'fui-line__yAxis',
|
|
11
|
+
legendContainer: 'fui-line__legendContainer',
|
|
12
|
+
hover: 'fui-line__hover',
|
|
13
|
+
descriptionMessage: 'fui-line__descriptionMessage',
|
|
14
|
+
axisTitle: 'fui-line__axisTitle',
|
|
15
|
+
chartTitle: 'fui-line__chartTitle',
|
|
16
|
+
opacityChangeOnHover: 'fui-line__opacityChangeOnHover',
|
|
17
|
+
shapeStyles: 'fui-line__shapeStyles',
|
|
18
|
+
chartWrapper: 'fui-line__chartWrapper'
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Base Styles
|
|
22
|
+
*/
|
|
23
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
24
|
+
tooltip: {
|
|
25
|
+
mc9l5x: "f22iagw",
|
|
26
|
+
Beiy3e4: "f1vx9l62",
|
|
27
|
+
z8tnut: "f17mpqex",
|
|
28
|
+
z189sj: ["f1vdfbxk", "f1f5gg8d"],
|
|
29
|
+
Byoj8tv: "fdvome7",
|
|
30
|
+
uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
|
|
31
|
+
qhf8xq: "f1euv43f",
|
|
32
|
+
fsow6f: "f17mccla",
|
|
33
|
+
Bhzewxz: "fr6rvge",
|
|
34
|
+
Bkfmm31: "f5q6cfr",
|
|
35
|
+
Beyfa6y: 0,
|
|
36
|
+
Bbmb7ep: 0,
|
|
37
|
+
Btl43ni: 0,
|
|
38
|
+
B7oj6ja: 0,
|
|
39
|
+
Dimara: "fq9zq91",
|
|
40
|
+
Bkecrkj: "f1aehjj5"
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
d: [".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".f5q6cfr{fill:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
|
|
44
|
+
p: -1
|
|
45
|
+
}], ".f1aehjj5{pointer-events:none;}"]
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Apply styling to the Carousel slots based on the state
|
|
49
|
+
*/
|
|
50
|
+
export const useLineChartStyles = props => {
|
|
51
|
+
const baseStyles = useStyles();
|
|
52
|
+
return {
|
|
53
|
+
tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/)
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=useLineChartStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","linechartClassNames","tooltip","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","useStyles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","useLineChartStyles","props","baseStyles"],"sources":["useLineChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C;AACA;AACA;AAAI,OAAO,MAAMC,mBAAmB,GAAG;EACnCC,OAAO,EAAE,mBAAmB;EAC5BC,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,iBAAiB;EACxBC,KAAK,EAAE,iBAAiB;EACxBC,eAAe,EAAE,2BAA2B;EAC5CC,KAAK,EAAE,iBAAiB;EACxBC,kBAAkB,EAAE,8BAA8B;EAClDC,SAAS,EAAE,qBAAqB;EAChCC,UAAU,EAAE,sBAAsB;EAClCC,oBAAoB,EAAE,gCAAgC;EACtDC,WAAW,EAAE,uBAAuB;EACpCC,YAAY,EAAE;AAClB,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGjB,QAAA;EAAAK,OAAA;IAAAa,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;AAAA,CAYrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,kBAAkB,GAAIC,KAAK,IAAG;EAC3C,MAAMC,UAAU,GAAGrB,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHZ,OAAO,EAAEJ,YAAY,CAACG,mBAAmB,CAACC,OAAO,EAAEiC,UAAU,CAACjC,OAAO,CAAC,yBAA0B;EACpG,CAAC;AACL,CAAC","ignoreList":[]}
|