@fluentui/react-charts 9.2.4 → 9.3.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 +41 -2
- package/dist/index.d.ts +1 -1
- package/lib/components/AreaChart/AreaChart.js +6 -4
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +11 -7
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +5 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +11 -12
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +14 -5
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +2 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +1 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +5 -3
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +62 -67
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/imageExporter.js +1 -0
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +8 -8
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +4 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +55 -24
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +1 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +1 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +7 -3
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +2 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +1 -0
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +1 -0
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +2 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +13 -7
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +1 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +2 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +2 -2
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +3 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +2 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.js +1 -0
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js +1 -0
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/shape.js +1 -0
- package/lib/components/Legends/shape.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +2 -0
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +1 -0
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +42 -39
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +1 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js +1 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +2 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +1 -0
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +2 -0
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js +1 -0
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -0
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +2 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +7 -6
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +2 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +1 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +1 -0
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +15 -10
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +2 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +1 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -24
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +1 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -0
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +1 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/image-export-utils.js +1 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +12 -11
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +5 -3
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +11 -7
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +4 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +11 -12
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +14 -5
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +4 -3
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +2 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +63 -68
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +8 -8
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +3 -2
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +55 -24
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +7 -3
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +1 -0
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +13 -7
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +2 -2
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +2 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +1 -0
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js +1 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/shape.js +1 -0
- package/lib-commonjs/components/Legends/shape.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +41 -38
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +2 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +6 -5
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +15 -10
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +28 -23
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +2 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +1 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +12 -11
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useChartTableStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["useChartTableStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const chartTableClassNames = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto'\n },\n table: {\n borderCollapse: 'collapse'\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: 'black',\n ...shorthands.padding(tokens.spacingHorizontalS),\n textAlign: 'left',\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText'\n }\n },\n bodyCell: {\n ...typographyStyles.caption1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n color: 'black',\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText'\n }\n }\n});\n/**\n * Apply styling to the ChartTable slots based on the state\n */ export const useChartTableStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/ ),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/ ),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/ ),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/ ),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/ )\n };\n};\n"],"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","a9b677","B68tc82","po53p8","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","De3pzq","sj55zd","z8tnut","z189sj","Byoj8tv","uwmqm3","fsow6f","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2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uBAAY,EAACI,oBAAoB,CAACG,UAAU,EAAEoC,UAAU,CAACpC,UAAU,CAAC,0BAAA,EAA6B,CAAC;QAC9GC,QAAQ,MAAER,mBAAY,EAACI,oBAAoB,CAACI,QAAQ,EAAEmC,UAAU,CAACnC,QAAQ,CAAC,wBAAA,EAA2B,CAAC;QACtGC,KAAK,MAAET,mBAAY,EAACI,oBAAoB,CAACK,KAAK,CAAC,qBAAA,EAAwB;IAC3E,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -37,7 +38,7 @@ const useStyles = (0, _react.makeStyles)({
|
|
|
37
38
|
..._reacttheme.typographyStyles.caption1,
|
|
38
39
|
fontWeight: _reacttheme.tokens.fontWeightSemibold,
|
|
39
40
|
backgroundColor: _reacttheme.tokens.colorNeutralBackground3,
|
|
40
|
-
color:
|
|
41
|
+
color: 'black',
|
|
41
42
|
..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
|
|
42
43
|
textAlign: 'left',
|
|
43
44
|
..._react.shorthands.border(_reacttheme.tokens.strokeWidthThick, 'solid', _reacttheme.tokens.colorNeutralStroke2),
|
|
@@ -50,7 +51,7 @@ const useStyles = (0, _react.makeStyles)({
|
|
|
50
51
|
..._reacttheme.typographyStyles.caption1,
|
|
51
52
|
..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
|
|
52
53
|
..._react.shorthands.border(_reacttheme.tokens.strokeWidthThick, 'solid', _reacttheme.tokens.colorNeutralStroke2),
|
|
53
|
-
color:
|
|
54
|
+
color: 'black',
|
|
54
55
|
textAlign: 'left',
|
|
55
56
|
'@media (forced-colors: active)': {
|
|
56
57
|
color: 'WindowText'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ChartTable/useChartTableStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ChartTable/useChartTableStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { ChartTableProps, ChartTableStyles } from './ChartTable.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\n/**\n * @internal\n */\nexport const chartTableClassNames: SlotClassNames<ChartTableStyles> = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart',\n};\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto',\n },\n table: {\n borderCollapse: 'collapse',\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: 'black',\n ...shorthands.padding(tokens.spacingHorizontalS),\n textAlign: 'left',\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n },\n bodyCell: {\n ...typographyStyles.caption1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n color: 'black',\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText',\n },\n },\n});\n\n/**\n * Apply styling to the ChartTable slots based on the state\n */\nexport const useChartTableStyles = (props: ChartTableProps): ChartTableStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","width","overflowX","borderCollapse","caption1","fontWeight","fontWeightSemibold","backgroundColor","colorNeutralBackground3","color","padding","spacingHorizontalS","textAlign","border","strokeWidthThick","colorNeutralStroke2","useChartTableStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,oBAAAA;;;uBA4CAsB;;;;uBApDwC,iBAAiB;4BAG7B,wBAAwB;AAK1D,6BAA+D;IACpErB,MAAM;IACNC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAYX,iBAAAA,EAAW;IAC3BM,MAAM;QACJM,OAAO;QACPC,WAAW;IACb;IACAN,OAAO;QACLO,gBAAgB;IAClB;IACAN,YAAY;QACV,GAAGJ,4BAAAA,CAAiBW,QAAQ;QAC5BC,YAAYb,kBAAAA,CAAOc,kBAAkB;QACrCC,iBAAiBf,kBAAAA,CAAOgB,uBAAuB;QAC/CC,OAAO;QACP,GAAGlB,iBAAAA,CAAWmB,OAAO,CAAClB,kBAAAA,CAAOmB,kBAAkB,CAAC;QAChDC,WAAW;QACX,GAAGrB,iBAAAA,CAAWsB,MAAM,CAACrB,kBAAAA,CAAOsB,gBAAgB,EAAE,SAAStB,kBAAAA,CAAOuB,mBAAmB,CAAC;QAClF,kCAAkC;YAChCR,iBAAiB;YACjBE,OAAO;QACT;IACF;IACAX,UAAU;QACR,GAAGL,4BAAAA,CAAiBW,QAAQ;QAC5B,GAAGb,iBAAAA,CAAWmB,OAAO,CAAClB,kBAAAA,CAAOmB,kBAAkB,CAAC;QAChD,GAAGpB,iBAAAA,CAAWsB,MAAM,CAACrB,kBAAAA,CAAOsB,gBAAgB,EAAE,SAAStB,kBAAAA,CAAOuB,mBAAmB,CAAC;QAClFN,OAAO;QACPG,WAAW;QACX,kCAAkC;YAChCH,OAAO;QACT;IACF;AACF;AAKO,MAAMO,sBAAsB,CAACC;IAClC,MAAMC,aAAalB;IAEnB,OAAO;QACLL,UAAML,mBAAAA,EAAaI,qBAAqBC,IAAI,EAAEuB,WAAWvB,IAAI,CAAC,oBAAoB;QAClFC,WAAON,mBAAAA,EAAaI,qBAAqBE,KAAK,EAAEsB,WAAWtB,KAAK,CAAC,qBAAqB;QACtFC,gBAAYP,mBAAAA,EAAaI,qBAAqBG,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;QAC1GC,cAAUR,mBAAAA,EAAaI,qBAAqBI,QAAQ,EAAEoB,WAAWpB,QAAQ,CAAC,wBAAwB;QAClGC,WAAOT,mBAAAA,EAAaI,qBAAqBK,KAAK,CAAC,qBAAqB;IACtE;AACF,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -34,7 +35,11 @@ const CartesianChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
34
35
|
const _isFirstRender = _react.useRef(true);
|
|
35
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
37
|
let _xScale;
|
|
37
|
-
|
|
38
|
+
const isIntegralDataset = _react.useMemo(()=>{
|
|
39
|
+
return !props.points.some((point)=>point.y % 1 !== 0);
|
|
40
|
+
}, [
|
|
41
|
+
props.points
|
|
42
|
+
]);
|
|
38
43
|
let _tooltipId = (0, _reactutilities.useId)('tooltip_');
|
|
39
44
|
/* Used for when WrapXAxisLabels props appeared.
|
|
40
45
|
* To display the total word (space separated words), Need to have more space than usual.
|
|
@@ -115,8 +120,6 @@ const CartesianChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
115
120
|
} else if (startFromX !== 0) {
|
|
116
121
|
setStartFromX(0);
|
|
117
122
|
}
|
|
118
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
119
|
-
isIntegralDataset = !props.points.some((point)=>point.y % 1 !== 0);
|
|
120
123
|
return ()=>{
|
|
121
124
|
cancelAnimationFrame(_reqID);
|
|
122
125
|
};
|
|
@@ -138,10 +141,6 @@ const CartesianChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
138
141
|
} else if (startFromX !== 0) {
|
|
139
142
|
setStartFromX(0);
|
|
140
143
|
}
|
|
141
|
-
if (prevProps !== null && prevProps.points !== props.points) {
|
|
142
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
143
|
-
isIntegralDataset = !props.points.some((point)=>point.y % 1 !== 0);
|
|
144
|
-
}
|
|
145
144
|
}, [
|
|
146
145
|
props,
|
|
147
146
|
prevProps
|
|
@@ -228,16 +227,16 @@ const CartesianChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
228
227
|
let tickValues;
|
|
229
228
|
switch(props.xAxisType){
|
|
230
229
|
case _index.XAxisTypes.NumericAxis:
|
|
231
|
-
({ xScale, tickValues } = (0, _index.createNumericXAxis)(XAxisParams, props.tickParams, props.chartType, culture, props.xScaleType));
|
|
230
|
+
({ xScale, tickValues } = (0, _index.createNumericXAxis)(XAxisParams, props.tickParams, props.chartType, culture, props.xScaleType, _useRtl));
|
|
232
231
|
break;
|
|
233
232
|
case _index.XAxisTypes.DateAxis:
|
|
234
233
|
({ xScale, tickValues } = (0, _index.createDateXAxis)(XAxisParams, props.tickParams, culture, dateLocalizeOptions, timeFormatLocale, customDateTimeFormatter, props.useUTC, props.chartType));
|
|
235
234
|
break;
|
|
236
235
|
case _index.XAxisTypes.StringAxis:
|
|
237
|
-
({ xScale, tickValues } = (0, _index.createStringXAxis)(XAxisParams, props.tickParams, props.datasetForXAxisDomain, culture));
|
|
236
|
+
({ xScale, tickValues } = (0, _index.createStringXAxis)(XAxisParams, props.tickParams, props.datasetForXAxisDomain, culture, _useRtl));
|
|
238
237
|
break;
|
|
239
238
|
default:
|
|
240
|
-
({ xScale, tickValues } = (0, _index.createNumericXAxis)(XAxisParams, props.tickParams, props.chartType, culture, props.xScaleType));
|
|
239
|
+
({ xScale, tickValues } = (0, _index.createNumericXAxis)(XAxisParams, props.tickParams, props.chartType, culture, props.xScaleType, _useRtl));
|
|
241
240
|
}
|
|
242
241
|
_xScale = xScale;
|
|
243
242
|
_tickValues = tickValues;
|
|
@@ -298,9 +297,9 @@ const CartesianChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
298
297
|
yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),
|
|
299
298
|
yAxisPadding: props.yAxisPadding
|
|
300
299
|
};
|
|
301
|
-
yScaleSecondary = props.createYAxis(YAxisParamsSecondary, _useRtl, axisData, isIntegralDataset, chartType, true, props.roundedTicks, props.secondaryYScaleType);
|
|
300
|
+
yScaleSecondary = props.createYAxis(YAxisParamsSecondary, _useRtl, axisData, isIntegralDataset, chartType, true, props.roundedTicks, props.secondaryYScaleType, _useRtl);
|
|
302
301
|
}
|
|
303
|
-
yScalePrimary = props.createYAxis(YAxisParams, _useRtl, axisData, isIntegralDataset, chartType, false, props.roundedTicks, props.yScaleType);
|
|
302
|
+
yScalePrimary = props.createYAxis(YAxisParams, _useRtl, axisData, isIntegralDataset, chartType, false, props.roundedTicks, props.yScaleType, _useRtl);
|
|
304
303
|
}
|
|
305
304
|
if (chartTypesWithStringYAxis.includes(props.chartType) && props.yAxisType === _index.YAxisType.StringAxis) {
|
|
306
305
|
// Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/CartesianChart.tsx"],"sourcesContent":["import * as React from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { ModifiedCartesianChartProps } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n createDateXAxis,\n IMargins,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n truncateString,\n tooltipOfAxislabels,\n getSecureProps,\n DEFAULT_WRAP_WIDTH,\n} from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { SVGTooltipText, SVGTooltipTextProps } from '../../utilities/SVGTooltipText';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>((props, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement>();\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElementSecondary = React.useRef<SVGSVGElement>();\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number;\n const _useRtl: boolean = useRtl();\n let _tickValues: (string | number)[];\n const titleMargin: number = 8;\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n let isIntegralDataset: boolean = true;\n let _tooltipId: string = useId('tooltip_');\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n let _removalValueForTextTuncate: number = 0;\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const [prevProps, setPrevProps] = React.useState<ModifiedCartesianChartProps | null>(null);\n\n const chartTypesWithStringYAxis = [\n ChartTypes.HorizontalBarChartWithAxis,\n ChartTypes.HeatMapChart,\n ChartTypes.VerticalStackedBarChart,\n ChartTypes.GanttChart,\n ChartTypes.ScatterChart,\n ];\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n // eslint-disable-next-line prefer-const\n margins = {\n top: props.margins?.top ?? 20,\n bottom: props.margins?.bottom ?? 35,\n right: _useRtl ? props.margins?.left ?? 40 : props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20,\n left: _useRtl ? (props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20) : props.margins?.left ?? 40,\n };\n const TITLE_MARGIN_HORIZONTAL = 24;\n const TITLE_MARGIN_VERTICAL = 20;\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n margins.bottom! = props.margins?.bottom ?? margins.bottom! + TITLE_MARGIN_VERTICAL;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n margins.left! = _useRtl\n ? props.margins?.right ?? props?.secondaryYAxistitle\n ? margins.right! + 2 * TITLE_MARGIN_HORIZONTAL\n : margins.right! + TITLE_MARGIN_HORIZONTAL\n : props.margins?.left ?? margins.left! + TITLE_MARGIN_HORIZONTAL;\n margins.right! = _useRtl\n ? props.margins?.left ?? margins.left! + TITLE_MARGIN_HORIZONTAL\n : props.margins?.right ?? props?.secondaryYAxistitle\n ? margins.right! + 2 * TITLE_MARGIN_HORIZONTAL\n : margins.right! + TITLE_MARGIN_HORIZONTAL;\n }\n if (props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '') {\n margins.top! = props.margins?.top ?? margins.top! + TITLE_MARGIN_VERTICAL;\n }\n if (\n props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '')\n ) {\n if (_useRtl) {\n margins.left! = props.margins?.right ?? margins.right! + TITLE_MARGIN_HORIZONTAL;\n } else {\n margins.right! = props.margins?.right ?? margins.right! + TITLE_MARGIN_HORIZONTAL;\n }\n }\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props !== null) {\n setPrevProps(props);\n }\n if (\n chartTypesWithStringYAxis.includes(props.chartType) &&\n props.showYAxisLables &&\n yAxisElement &&\n props.yAxisType === YAxisType.StringAxis\n ) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n return () => {\n cancelAnimationFrame(_reqID);\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n if (prevProps) {\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _fitParentContainer();\n }\n }\n if (\n chartTypesWithStringYAxis.includes(props.chartType) &&\n props.showYAxisLables &&\n yAxisElement &&\n props.yAxisType === YAxisType.StringAxis\n ) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n if (prevProps !== null && prevProps.points !== props.points) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n isIntegralDataset = !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }\n }, [props, prevProps]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: chartContainer.current ?? null,\n }),\n [],\n );\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _generateCallout(calloutProps: any): JSXElement {\n return <ChartPopover {...calloutProps} />;\n }\n\n function calculateMaxYAxisLabelLength(className: string): number {\n const formatTickLabel = (str: string) => {\n if (props.showYAxisLablesTooltip) {\n return truncateString(str, props.noOfCharsToTruncate || 4);\n }\n\n return str;\n };\n return calculateLongestLabelWidth(\n props.stringDatasetForYAxisDomain!.map(label => formatTickLabel(label)),\n `.${className} text`,\n );\n }\n\n const {\n calloutProps,\n points,\n chartType,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = props;\n if (props.parentRef) {\n _fitParentContainer();\n }\n const margin = { ...margins };\n // Note: This check is unnecessary since startFromX is only set for charts with string y-axis.\n if (chartTypesWithStringYAxis.includes(props.chartType)) {\n if (!_useRtl) {\n margin.left! += startFromX;\n } else {\n margin.right! += startFromX;\n }\n }\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margin);\n\n let callout: JSXElement | null = null;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: props.getDomainNRangeValues(\n points,\n props.getDomainMargins ? props.getDomainMargins(containerWidth) : margins,\n containerWidth,\n chartType,\n _useRtl,\n props.xAxisType,\n props.barwidth!,\n props.tickValues!,\n // This is only used for Horizontal Bar Chart with Axis for y as string axis\n startFromX,\n ),\n // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.\n // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.\n // However, if transformation props are enabled, the updated _removalValueForTextTuncate\n // will only be available in the next render, as it's set after the axis is created.\n // Solution: Delay the creation of gridlines until after the transformation has been applied,\n // or precompute the required height for transformed labels (_removalValueForTextTuncate).\n containerHeight: containerHeight - _removalValueForTextTuncate,\n margins: margins,\n xAxisElement: xAxisElement.current!,\n showRoundOffXTickValues: props.showRoundOffXTickValues ?? true,\n xAxisCount: props.xAxisTickCount,\n xAxistickSize: props.xAxistickSize,\n tickPadding: props.tickPadding || props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: props.xAxisPadding,\n xAxisInnerPadding: props.xAxisInnerPadding,\n xAxisOuterPadding: props.xAxisOuterPadding,\n containerWidth: containerWidth,\n hideTickOverlap: props.rotateXAxisLables ? false : props.hideTickOverlap,\n calcMaxLabelWidth: _calcMaxLabelWidthWithTransform,\n tickStep: props.xAxis?.tickStep,\n tick0: props.xAxis?.tick0,\n };\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: (string | number)[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n props.chartType,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n ));\n }\n _xScale = xScale;\n _tickValues = tickValues;\n\n _transformXAxisLabels();\n\n const YAxisParams = {\n margins: props.getYDomainMargins ? props.getYDomainMargins(containerHeight) : margins,\n containerWidth: containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate,\n yAxisElement: yAxisElement.current!,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.yMinValue || 0,\n yMaxValue: props.yMaxValue || 0,\n tickPadding: 10,\n maxOfYVal: props.maxOfYVal,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: props.yAxisPadding || 0,\n tickValues: props.yAxisTickValues,\n tickStep: props.yAxis?.tickStep,\n tick0: props.yAxis?.tick0,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = props.createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n props.barwidth,\n props.chartType,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: margins,\n containerWidth: containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate!,\n yAxisElement: yAxisElementSecondary.current,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = props.createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n true,\n props.roundedTicks!,\n props.secondaryYScaleType,\n );\n }\n yScalePrimary = props.createYAxis(\n YAxisParams,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n false,\n props.roundedTicks!,\n props.yScaleType,\n );\n }\n\n if (chartTypesWithStringYAxis.includes(props.chartType) && props.yAxisType === YAxisType.StringAxis) {\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with _tooltipId)\n if (!props.showYAxisLablesTooltip) {\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 y axis labels.\n if (props.showYAxisLablesTooltip) {\n // To create y axis tick values by if specified truncating the rest of the text\n // and showing elipsis or showing the whole string,\n yScalePrimary &&\n // Note: This function should be invoked within the showYAxisLablesTooltip check,\n // as its sole purpose is to truncate labels that exceed the noOfCharsToTruncate limit.\n createYAxisLabels(\n yAxisElement.current!,\n yScalePrimary,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n _useRtl,\n );\n const _yAxisElement = d3Select(yAxisElement.current!).call(yScalePrimary);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _yAxisElement,\n };\n _yAxisElement && tooltipOfAxislabels(ytooltipProps);\n }\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScalePrimary,\n containerHeight - _removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n yScaleSecondary,\n );\n };\n\n props.getAxisData && props.getAxisData(axisData);\n // Callback function for chart, returns axis\n _getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = props.children({\n xScale,\n yScalePrimary,\n yScaleSecondary,\n containerHeight,\n containerWidth,\n });\n\n if (!props.hideTooltip && calloutProps!.isPopoverOpen) {\n callout = _generateCallout(calloutProps);\n }\n }\n const svgDimensions = {\n width: containerWidth,\n height: containerHeight,\n };\n\n const xAxisTitleMaximumAllowedWidth = svgDimensions.width - margins.left! - margins.right! - startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height - margins.bottom! - margins.top! - _removalValueForTextTuncate! - titleMargin;\n\n const commonSvgToolTipProps: SVGTooltipTextProps = {\n wrapContent,\n showBackground: true,\n className: classes.svgTooltip,\n content: '',\n };\n /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n function _fitParentContainer(): void {\n //_reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = legendContainer && getComputedStyle(legendContainer);\n legendContainerHeight =\n ((legendContainer && legendContainer.getBoundingClientRect().height) || minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (props.parentRef || chartContainer.current) {\n const container = props.parentRef ? props.parentRef : chartContainer.current!;\n const currentContainerWidth =\n props.reflowProps?.mode === 'min-width' && !_isFirstRender.current\n ? Math.max(container.getBoundingClientRect().width, _calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n setContainerWidth(currentContainerWidth);\n setContainerHeight(currentContainerHeight - legendContainerHeight);\n }\n }\n //});\n }\n\n function _onChartLeave(): void {\n props.onChartMouseLeave && props.onChartMouseLeave();\n }\n\n function _calculateChartMinWidth(): number {\n // Adding 10px for padding on both sides\n const labelWidth = _calcMaxLabelWidthWithTransform(_tickValues) + 10;\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickValues.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n }\n\n function _calcMaxLabelWidthWithTransform(x: (string | number)[]) {\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n\n // Case: truncated labels\n if (props.showXAxisLablesTooltip) {\n const tickValues = x.map(val => {\n const numChars = props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickValues, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n // Case: wrapped labels\n if (props.wrapXAxisLables) {\n // FIXME: Calculate the max width of lines instead of words. This requires applying\n // the wrapping transformation earlier to obtain the actual rendered lines.\n const words: string[] = [];\n x.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n // This approach works well in most cases, since overflow typically occurs only when\n // a single word exceeds the specified width — otherwise, the text will wrap as expected.\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n return Math.max(Math.ceil(longestLabelWidth), DEFAULT_WRAP_WIDTH);\n }\n\n // Default case\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n function _transformXAxisLabels() {\n _removalValueForTextTuncate = 0;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (props.wrapXAxisLables || props.showXAxisLablesTooltip) {\n let maxXAxisLabelWidth: number | undefined;\n if (props.xAxisType === XAxisTypes.StringAxis) {\n if ((props.datasetForXAxisDomain?.length || 0) > 1) {\n maxXAxisLabelWidth = _xScale.step();\n } else {\n maxXAxisLabelWidth = containerWidth;\n }\n }\n\n const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n width: maxXAxisLabelWidth,\n };\n _removalValueForTextTuncate = createWrapOfXLabels(wrapLabelProps) ?? 0;\n }\n\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const rotateLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps) ?? 0;\n // margins.bottom is used as padding here\n _removalValueForTextTuncate = rotatedHeight + margins.bottom!;\n }\n }\n\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={idForGraph}\n className={classes.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => (chartContainer.current = rootElem)}\n onMouseLeave={_onChartLeave}\n >\n <div className={classes.chartWrapper} {...focusAttributes} {...arrowAttributes}>\n {_isFirstRender.current}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n aria-label={props.chartTitle}\n style={{ display: 'block' }}\n className={classes.chart}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n xAxisElement.current = e!;\n }}\n id={`xAxisGElement${idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${svgDimensions.height - margins.bottom! - _removalValueForTextTuncate!})`}\n className={classes.xAxis}\n />\n {props.xAxisTitle !== undefined && props.xAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisTitle}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - titleMargin,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n />\n )}\n {props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisAnnotation}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: titleMargin + 3,\n className: classes.axisAnnotation!,\n textAnchor: 'middle',\n 'aria-hidden': true,\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${\n _useRtl ? svgDimensions.width - margins.right! - startFromX : margins.left! + startFromX\n }, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElementSecondary.current = e!;\n }}\n id={`yAxisGElementSecondary${idForGraph}`}\n transform={`translate(${\n _useRtl ? margins.left! + startFromX : svgDimensions.width - margins.right! - startFromX\n }, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.secondaryYAxistitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisTitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? svgDimensions.width - margins.right! / 2 + titleMargin : margins.left! / 2 - titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n {props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '') && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisAnnotation}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisAnnotation!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n </svg>\n </div>\n\n {!props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (legendContainer = e)} className={classes.legendContainer}>\n {props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n});\nCartesianChart.displayName = 'CartesianChart';\nCartesianChart.defaultProps = {\n hideTickOverlap: true,\n};\n"],"names":["React","useCartesianChartStyles","select","d3Select","createNumericXAxis","createStringXAxis","createDateXAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","truncateString","tooltipOfAxislabels","getSecureProps","DEFAULT_WRAP_WIDTH","useId","SVGTooltipText","ChartPopover","useFocusableGroup","useArrowNavigationGroup","CartesianChart","forwardRef","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickValues","titleMargin","_isFirstRender","_xScale","isIntegralDataset","_tooltipId","_removalValueForTextTuncate","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","startFromX","setStartFromX","prevProps","setPrevProps","chartTypesWithStringYAxis","HorizontalBarChartWithAxis","HeatMapChart","VerticalStackedBarChart","GanttChart","ScatterChart","top","bottom","right","left","secondaryYScaleOptions","TITLE_MARGIN_HORIZONTAL","TITLE_MARGIN_VERTICAL","xAxisTitle","undefined","yAxisTitle","secondaryYAxistitle","xAxisAnnotation","yAxisAnnotation","classes","focusAttributes","arrowAttributes","axis","useEffect","_fitParentContainer","includes","chartType","showYAxisLables","yAxisType","StringAxis","maxYAxisLabelLength","calculateMaxYAxisLabelLength","yAxis","points","some","point","y","cancelAnimationFrame","height","width","useImperativeHandle","componentRef","current","_generateCallout","calloutProps","className","formatTickLabel","str","showYAxisLablesTooltip","noOfCharsToTruncate","stringDatasetForYAxisDomain","map","label","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","margin","getmargins","callout","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainNRangeValues","getDomainMargins","xAxisType","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","hideTickOverlap","rotateXAxisLables","calcMaxLabelWidth","_calcMaxLabelWidthWithTransform","tickStep","xAxis","tick0","xScale","NumericAxis","tickParams","xScaleType","DateAxis","useUTC","datasetForXAxisDomain","_transformXAxisLabels","YAxisParams","getYDomainMargins","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","getMinMaxOfYAxis","yAxisPadding","yAxisTickValues","yScalePrimary","yScaleSecondary","axisData","yAxisDomainValues","createStringYAxis","YAxisParamsSecondary","createYAxis","roundedTicks","secondaryYScaleType","yScaleType","document","getElementById","remove","e","_yAxisElement","call","ytooltipProps","tooltipCls","tooltip","id","_getData","getGraphData","getAxisData","hideTooltip","isPopoverOpen","svgDimensions","xAxisTitleMaximumAllowedWidth","yAxisTitleMaximumAllowedHeight","commonSvgToolTipProps","showBackground","svgTooltip","content","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","container","currentContainerWidth","reflowProps","mode","Math","max","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","labelWidth","minChartWidth","length","GroupedVerticalBarChart","VerticalBarChart","minDomainMargin","x","wrapXAxisLables","longestLabelWidth","ceil","cos","PI","val","numChars","toString","slice","words","forEach","push","split","maxXAxisLabelWidth","step","wrapLabelProps","node","rotateLabelProps","rotatedHeight","div","root","role","ref","rootElem","onMouseLeave","chartWrapper","svg","aria-label","chartTitle","style","display","chart","g","transform","textProps","axisTitle","textAnchor","maxWidth","axisAnnotation","legendBars","Suspense","fallback","displayName","defaultProps"],"mappings":";;;;+BAmCayB;;;;;;;iEAnCU,QAAQ;+CAGS,mCAAmC;6BACxC,eAAe;uBAoB3C,wBAAwB;gCACT,4BAA4B;gCAEE,iCAAiC;8BACxD,iBAAiB;8BACa,0BAA0B;AAM9E,uBAAMA,WAAAA,GAAuEzB,OAAM0B,UAAU,CAGlG,CAACC,OAAOC;QA8CDD,gBACGA,iBACSA,iBAA4BA,iBAC5BA,iBAAmEA;IAhDtF,MAAME,iBAAiB7B,OAAM8B,MAAM;IACnC,IAAIC;IACJ,MAAMC,2BAAmC;IACzC,MAAMC,eAAejC,OAAM8B,MAAM;IACjC,MAAMI,eAAelC,OAAM8B,MAAM;IACjC,MAAMK,wBAAwBnC,OAAM8B,MAAM;IAC1C,IAAIM;IACJ,MAAMC,aAAqB;IAC3B,IAAIC;IACJ,MAAMC,UAAmBxB,iBAAAA;IACzB,IAAIyB;IACJ,MAAMC,cAAsB;IAC5B,MAAMC,iBAAiB1C,OAAM8B,MAAM,CAAU;IAC7C,8DAA8D;IAC9D,IAAIa;IACJ,IAAIC,oBAA6B;IAC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ACE,GAAGyK,qBAAqB;QACzBG,SAAStK,MAAM+C,eAAe;QAC9BoL,WAAW;YACTnC,GAAI9B,kCAAiCzJ,QAAQ2B,MAAM,AAANA,IAAW,IAAIjB;YAC5D8C,GAAGrD,UAAUa,aAAaX,cAAckJ,cAAc5F,KAAK,GAAG3D,QAAQ4B,KAAK;YAC3EgM,YAAY;YACZH,WAAW,CAAC,UAAU,EACpBtN,UAAUH,QAAQ4B,KAAK,GAAI,IAAIvB,cAAcL,QAAQ4B,KAAK,GAAI,IAAIvB,YACnE;mBACA,EAAEkJ,cAAc7F,MAAM,GAAG1D,QAAQ2B,MAAM,GAAI3B,QAAQ0B,GAAG,GAAIrB,YAAY,YAAY,CAAC;YACpF4D,WAAW1B,QAAQuL,cAAc;YACjC,eAAe;QACjB;QACAD,UAAUpE;UAMnB,CAAClK,MAAMwK,UAAU,IAAA,WAAA,GAChB,OAAA,aAAA,CAAC4C,OAAAA;QAAIG,KAAK,CAACnE,IAAuBhJ,kBAAkBgJ;QAAI1E,WAAW1B,QAAQ5C,eAAe;OACvFJ,MAAMwO,UAAU,GAIpB9I,WAAAA,WAAAA,GAAW,OAAA,aAAA,CAACrH,OAAMoQ,QAAQ,EAAA;QAACC,UAAAA,WAAAA,GAAU,OAAA,aAAA,CAACtB,OAAAA,MAAI;OAAmB1H;AAGpE,GAAG;AACH5F,eAAe6O,WAAW,GAAG;AAC7B7O,eAAe8O,YAAY,GAAG;IAC5B/H,iBAAiB;AACnB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/CartesianChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { ModifiedCartesianChartProps } from '../../index';\nimport { useCartesianChartStyles } from './useCartesianChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport {\n createNumericXAxis,\n createStringXAxis,\n IAxisData,\n createDateXAxis,\n IMargins,\n XAxisTypes,\n YAxisType,\n createWrapOfXLabels,\n rotateXAxisLabels,\n calculateLongestLabelWidth,\n createYAxisLabels,\n ChartTypes,\n wrapContent,\n useRtl,\n truncateString,\n tooltipOfAxislabels,\n getSecureProps,\n DEFAULT_WRAP_WIDTH,\n} from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { SVGTooltipText, SVGTooltipTextProps } from '../../utilities/SVGTooltipText';\nimport { ChartPopover } from './ChartPopover';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Cartesian Chart component\n * {@docCategory CartesianChart}\n */\nexport const CartesianChart: React.FunctionComponent<ModifiedCartesianChartProps> = React.forwardRef<\n HTMLDivElement,\n ModifiedCartesianChartProps\n>((props, forwardedRef) => {\n const chartContainer = React.useRef<HTMLDivElement>();\n let legendContainer: HTMLDivElement;\n const minLegendContainerHeight: number = 40;\n const xAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElement = React.useRef<SVGSVGElement>();\n const yAxisElementSecondary = React.useRef<SVGSVGElement>();\n let margins: IMargins;\n const idForGraph: string = 'chart_';\n let _reqID: number;\n const _useRtl: boolean = useRtl();\n let _tickValues: (string | number)[];\n const titleMargin: number = 8;\n const _isFirstRender = React.useRef<boolean>(true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _xScale: any;\n const isIntegralDataset = React.useMemo(() => {\n return !props.points.some((point: { y: number }) => point.y % 1 !== 0);\n }, [props.points]);\n let _tooltipId: string = useId('tooltip_');\n /* Used for when WrapXAxisLabels props appeared.\n * To display the total word (space separated words), Need to have more space than usual.\n * This height will get total height need to disaply total word.\n * These value need to be removed from actual svg height/graph height.\n * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.\n */\n let _removalValueForTextTuncate: number = 0;\n\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerHeight, setContainerHeight] = React.useState<number>(0);\n const [startFromX, setStartFromX] = React.useState<number>(0);\n const [prevProps, setPrevProps] = React.useState<ModifiedCartesianChartProps | null>(null);\n\n const chartTypesWithStringYAxis = [\n ChartTypes.HorizontalBarChartWithAxis,\n ChartTypes.HeatMapChart,\n ChartTypes.VerticalStackedBarChart,\n ChartTypes.GanttChart,\n ChartTypes.ScatterChart,\n ];\n /**\n * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.\n * So that, in RTL, left margins becomes right margins and viceversa.\n * As graph needs to be drawn perfecty, these values consider as default values.\n * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.\n */\n // eslint-disable-next-line prefer-const\n margins = {\n top: props.margins?.top ?? 20,\n bottom: props.margins?.bottom ?? 35,\n right: _useRtl ? props.margins?.left ?? 40 : props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20,\n left: _useRtl ? (props.margins?.right ?? props?.secondaryYScaleOptions ? 40 : 20) : props.margins?.left ?? 40,\n };\n const TITLE_MARGIN_HORIZONTAL = 24;\n const TITLE_MARGIN_VERTICAL = 20;\n if (props.xAxisTitle !== undefined && props.xAxisTitle !== '') {\n margins.bottom! = props.margins?.bottom ?? margins.bottom! + TITLE_MARGIN_VERTICAL;\n }\n if (props.yAxisTitle !== undefined && props.yAxisTitle !== '') {\n margins.left! = _useRtl\n ? props.margins?.right ?? props?.secondaryYAxistitle\n ? margins.right! + 2 * TITLE_MARGIN_HORIZONTAL\n : margins.right! + TITLE_MARGIN_HORIZONTAL\n : props.margins?.left ?? margins.left! + TITLE_MARGIN_HORIZONTAL;\n margins.right! = _useRtl\n ? props.margins?.left ?? margins.left! + TITLE_MARGIN_HORIZONTAL\n : props.margins?.right ?? props?.secondaryYAxistitle\n ? margins.right! + 2 * TITLE_MARGIN_HORIZONTAL\n : margins.right! + TITLE_MARGIN_HORIZONTAL;\n }\n if (props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '') {\n margins.top! = props.margins?.top ?? margins.top! + TITLE_MARGIN_VERTICAL;\n }\n if (\n props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '')\n ) {\n if (_useRtl) {\n margins.left! = props.margins?.right ?? margins.right! + TITLE_MARGIN_HORIZONTAL;\n } else {\n margins.right! = props.margins?.right ?? margins.right! + TITLE_MARGIN_HORIZONTAL;\n }\n }\n\n const classes = useCartesianChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ axis: 'horizontal' });\n // ComponentdidMount and Componentwillunmount logic\n React.useEffect(() => {\n _fitParentContainer();\n if (props !== null) {\n setPrevProps(props);\n }\n if (\n chartTypesWithStringYAxis.includes(props.chartType) &&\n props.showYAxisLables &&\n yAxisElement &&\n props.yAxisType === YAxisType.StringAxis\n ) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n return () => {\n cancelAnimationFrame(_reqID);\n };\n }, [props]);\n\n // ComponentDidUpdate logic\n React.useEffect(() => {\n if (prevProps) {\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _fitParentContainer();\n }\n }\n if (\n chartTypesWithStringYAxis.includes(props.chartType) &&\n props.showYAxisLables &&\n yAxisElement &&\n props.yAxisType === YAxisType.StringAxis\n ) {\n const maxYAxisLabelLength = calculateMaxYAxisLabelLength(classes.yAxis!);\n if (startFromX !== maxYAxisLabelLength) {\n setStartFromX(maxYAxisLabelLength);\n }\n } else if (startFromX !== 0) {\n setStartFromX(0);\n }\n }, [props, prevProps]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: chartContainer.current ?? null,\n }),\n [],\n );\n\n /**\n * Dedicated function to return the Callout JSX Element , which can further be used to only call this when\n * only the calloutprops and charthover props changes.\n * @param calloutProps\n * @param chartHoverProps\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _generateCallout(calloutProps: any): JSXElement {\n return <ChartPopover {...calloutProps} />;\n }\n\n function calculateMaxYAxisLabelLength(className: string): number {\n const formatTickLabel = (str: string) => {\n if (props.showYAxisLablesTooltip) {\n return truncateString(str, props.noOfCharsToTruncate || 4);\n }\n\n return str;\n };\n return calculateLongestLabelWidth(\n props.stringDatasetForYAxisDomain!.map(label => formatTickLabel(label)),\n `.${className} text`,\n );\n }\n\n const {\n calloutProps,\n points,\n chartType,\n svgProps,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n } = props;\n if (props.parentRef) {\n _fitParentContainer();\n }\n const margin = { ...margins };\n // Note: This check is unnecessary since startFromX is only set for charts with string y-axis.\n if (chartTypesWithStringYAxis.includes(props.chartType)) {\n if (!_useRtl) {\n margin.left! += startFromX;\n } else {\n margin.right! += startFromX;\n }\n }\n // Callback for margins to the chart\n props.getmargins && props.getmargins(margin);\n\n let callout: JSXElement | null = null;\n\n let children = null;\n if ((props.enableFirstRenderOptimization && chartContainer.current) || !props.enableFirstRenderOptimization) {\n _isFirstRender.current = false;\n const XAxisParams = {\n domainNRangeValues: props.getDomainNRangeValues(\n points,\n props.getDomainMargins ? props.getDomainMargins(containerWidth) : margins,\n containerWidth,\n chartType,\n _useRtl,\n props.xAxisType,\n props.barwidth!,\n props.tickValues!,\n // This is only used for Horizontal Bar Chart with Axis for y as string axis\n startFromX,\n ),\n // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.\n // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.\n // However, if transformation props are enabled, the updated _removalValueForTextTuncate\n // will only be available in the next render, as it's set after the axis is created.\n // Solution: Delay the creation of gridlines until after the transformation has been applied,\n // or precompute the required height for transformed labels (_removalValueForTextTuncate).\n containerHeight: containerHeight - _removalValueForTextTuncate,\n margins: margins,\n xAxisElement: xAxisElement.current!,\n showRoundOffXTickValues: props.showRoundOffXTickValues ?? true,\n xAxisCount: props.xAxisTickCount,\n xAxistickSize: props.xAxistickSize,\n tickPadding: props.tickPadding || props.showXAxisLablesTooltip ? 5 : 10,\n xAxisPadding: props.xAxisPadding,\n xAxisInnerPadding: props.xAxisInnerPadding,\n xAxisOuterPadding: props.xAxisOuterPadding,\n containerWidth: containerWidth,\n hideTickOverlap: props.rotateXAxisLables ? false : props.hideTickOverlap,\n calcMaxLabelWidth: _calcMaxLabelWidthWithTransform,\n tickStep: props.xAxis?.tickStep,\n tick0: props.xAxis?.tick0,\n };\n\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xScale: any;\n let tickValues: (string | number)[];\n switch (props.xAxisType!) {\n case XAxisTypes.NumericAxis:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n break;\n case XAxisTypes.DateAxis:\n ({ xScale, tickValues } = createDateXAxis(\n XAxisParams,\n props.tickParams!,\n culture,\n dateLocalizeOptions,\n timeFormatLocale,\n customDateTimeFormatter,\n props.useUTC,\n props.chartType,\n ));\n break;\n case XAxisTypes.StringAxis:\n ({ xScale, tickValues } = createStringXAxis(\n XAxisParams,\n props.tickParams!,\n props.datasetForXAxisDomain!,\n culture,\n _useRtl,\n ));\n break;\n default:\n ({ xScale, tickValues } = createNumericXAxis(\n XAxisParams,\n props.tickParams!,\n props.chartType,\n culture,\n props.xScaleType,\n _useRtl,\n ));\n }\n _xScale = xScale;\n _tickValues = tickValues;\n\n _transformXAxisLabels();\n\n const YAxisParams = {\n margins: props.getYDomainMargins ? props.getYDomainMargins(containerHeight) : margins,\n containerWidth: containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate,\n yAxisElement: yAxisElement.current!,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.yMinValue || 0,\n yMaxValue: props.yMaxValue || 0,\n tickPadding: 10,\n maxOfYVal: props.maxOfYVal,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType),\n // please note these padding default values must be consistent in here\n // and the parent chart(HBWA/Vertical etc..) for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n yAxisPadding: props.yAxisPadding || 0,\n tickValues: props.yAxisTickValues,\n tickStep: props.yAxis?.tickStep,\n tick0: props.yAxis?.tick0,\n };\n /**\n * These scales used for 2 purposes.\n * 1. To create x and y axis\n * 2. To draw the graph.\n * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScalePrimary: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let yScaleSecondary: any;\n const axisData: IAxisData = { yAxisDomainValues: [] };\n if (props.yAxisType && props.yAxisType === YAxisType.StringAxis) {\n yScalePrimary = props.createStringYAxis(\n YAxisParams,\n props.stringDatasetForYAxisDomain!,\n _useRtl,\n props.barwidth,\n props.chartType,\n );\n } else {\n // TODO: Since the scale domain values are now computed independently for both the primary and\n // secondary y-axes, the yMinValue and yMaxValue props are no longer necessary for accurately\n // rendering the secondary y-axis. Therefore, rather than checking the secondaryYScaleOptions\n // prop to determine whether to create a secondary y-axis, it's more appropriate to check if any\n // data points are assigned to use the secondary y-scale.\n if (props?.secondaryYScaleOptions) {\n const YAxisParamsSecondary = {\n margins: margins,\n containerWidth: containerWidth,\n containerHeight: containerHeight - _removalValueForTextTuncate!,\n yAxisElement: yAxisElementSecondary.current,\n yAxisTickFormat: props.yAxisTickFormat!,\n yAxisTickCount: props.yAxisTickCount!,\n yMinValue: props.secondaryYScaleOptions?.yMinValue || 0,\n yMaxValue: props.secondaryYScaleOptions?.yMaxValue ?? 100,\n tickPadding: 10,\n yMinMaxValues: props.getMinMaxOfYAxis(points, props.yAxisType, true),\n yAxisPadding: props.yAxisPadding,\n };\n\n yScaleSecondary = props.createYAxis(\n YAxisParamsSecondary,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n true,\n props.roundedTicks!,\n props.secondaryYScaleType,\n _useRtl,\n );\n }\n yScalePrimary = props.createYAxis(\n YAxisParams,\n _useRtl,\n axisData,\n isIntegralDataset,\n chartType,\n false,\n props.roundedTicks!,\n props.yScaleType,\n _useRtl,\n );\n }\n\n if (chartTypesWithStringYAxis.includes(props.chartType) && props.yAxisType === YAxisType.StringAxis) {\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with _tooltipId)\n if (!props.showYAxisLablesTooltip) {\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 y axis labels.\n if (props.showYAxisLablesTooltip) {\n // To create y axis tick values by if specified truncating the rest of the text\n // and showing elipsis or showing the whole string,\n yScalePrimary &&\n // Note: This function should be invoked within the showYAxisLablesTooltip check,\n // as its sole purpose is to truncate labels that exceed the noOfCharsToTruncate limit.\n createYAxisLabels(\n yAxisElement.current!,\n yScalePrimary,\n props.noOfCharsToTruncate || 4,\n props.showYAxisLablesTooltip || false,\n _useRtl,\n );\n const _yAxisElement = d3Select(yAxisElement.current!).call(yScalePrimary);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: _yAxisElement,\n };\n _yAxisElement && tooltipOfAxislabels(ytooltipProps);\n }\n }\n\n // Call back to the chart.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _getData = (xScale: any, yScalePrimary: any, yScaleSecondary: any) => {\n props.getGraphData &&\n props.getGraphData(\n xScale,\n yScalePrimary,\n containerHeight - _removalValueForTextTuncate!,\n containerWidth,\n xAxisElement.current,\n yAxisElement.current,\n yScaleSecondary,\n );\n };\n\n props.getAxisData && props.getAxisData(axisData);\n // Callback function for chart, returns axis\n _getData(xScale, yScalePrimary, yScaleSecondary);\n\n children = props.children({\n xScale,\n yScalePrimary,\n yScaleSecondary,\n containerHeight,\n containerWidth,\n });\n\n if (!props.hideTooltip && calloutProps!.isPopoverOpen) {\n callout = _generateCallout(calloutProps);\n }\n }\n const svgDimensions = {\n width: containerWidth,\n height: containerHeight,\n };\n\n const xAxisTitleMaximumAllowedWidth = svgDimensions.width - margins.left! - margins.right! - startFromX!;\n const yAxisTitleMaximumAllowedHeight =\n svgDimensions.height - margins.bottom! - margins.top! - _removalValueForTextTuncate! - titleMargin;\n\n const commonSvgToolTipProps: SVGTooltipTextProps = {\n wrapContent,\n showBackground: true,\n className: classes.svgTooltip,\n content: '',\n };\n /**\n * When screen resizes, along with screen, chart also auto adjusted.\n * This method used to adjust height and width of the charts.\n */\n function _fitParentContainer(): void {\n //_reqID = requestAnimationFrame(() => {\n let legendContainerHeight;\n if (props.hideLegend) {\n // If there is no legend, need not to allocate some space from total chart space.\n legendContainerHeight = 0;\n } else {\n const legendContainerComputedStyles = legendContainer && getComputedStyle(legendContainer);\n legendContainerHeight =\n ((legendContainer && legendContainer.getBoundingClientRect().height) || minLegendContainerHeight) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (props.parentRef || chartContainer.current) {\n const container = props.parentRef ? props.parentRef : chartContainer.current!;\n const currentContainerWidth =\n props.reflowProps?.mode === 'min-width' && !_isFirstRender.current\n ? Math.max(container.getBoundingClientRect().width, _calculateChartMinWidth())\n : container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 350;\n const shouldResize =\n containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n setContainerWidth(currentContainerWidth);\n setContainerHeight(currentContainerHeight - legendContainerHeight);\n }\n }\n //});\n }\n\n function _onChartLeave(): void {\n props.onChartMouseLeave && props.onChartMouseLeave();\n }\n\n function _calculateChartMinWidth(): number {\n // Adding 10px for padding on both sides\n const labelWidth = _calcMaxLabelWidthWithTransform(_tickValues) + 10;\n\n let minChartWidth = margins.left! + margins.right! + labelWidth * (_tickValues.length - 1);\n\n if (\n [ChartTypes.GroupedVerticalBarChart, ChartTypes.VerticalBarChart, ChartTypes.VerticalStackedBarChart].includes(\n props.chartType,\n )\n ) {\n const minDomainMargin = 8;\n minChartWidth += minDomainMargin * 2;\n }\n\n return minChartWidth;\n }\n\n function _calcMaxLabelWidthWithTransform(x: (string | number)[]) {\n // Case: rotated labels\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth * Math.cos(Math.PI / 4));\n }\n\n // Case: truncated labels\n if (props.showXAxisLablesTooltip) {\n const tickValues = x.map(val => {\n const numChars = props.noOfCharsToTruncate || 4;\n return val.toString().length > numChars ? `${val.toString().slice(0, numChars)}...` : val;\n });\n\n const longestLabelWidth = calculateLongestLabelWidth(tickValues, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n // Case: wrapped labels\n if (props.wrapXAxisLables) {\n // FIXME: Calculate the max width of lines instead of words. This requires applying\n // the wrapping transformation earlier to obtain the actual rendered lines.\n const words: string[] = [];\n x.forEach((val: string) => {\n words.push(...val.toString().split(/\\s+/));\n });\n\n // This approach works well in most cases, since overflow typically occurs only when\n // a single word exceeds the specified width — otherwise, the text will wrap as expected.\n const longestLabelWidth = calculateLongestLabelWidth(words, `.${classes.xAxis} text`);\n return Math.max(Math.ceil(longestLabelWidth), DEFAULT_WRAP_WIDTH);\n }\n\n // Default case\n const longestLabelWidth = calculateLongestLabelWidth(x, `.${classes.xAxis} text`);\n return Math.ceil(longestLabelWidth);\n }\n\n function _transformXAxisLabels() {\n _removalValueForTextTuncate = 0;\n\n /*\n * To enable wrapping of x axis tick values or to display complete x axis tick values,\n * we need to calculate how much space it needed to render the text.\n * No need to re-calculate every time the chart renders and same time need to get an update. So using setState.\n * Required space will be calculated first time chart rendering and if any width/height of chart updated.\n * */\n if (props.wrapXAxisLables || props.showXAxisLablesTooltip) {\n let maxXAxisLabelWidth: number | undefined;\n if (props.xAxisType === XAxisTypes.StringAxis) {\n if ((props.datasetForXAxisDomain?.length || 0) > 1) {\n maxXAxisLabelWidth = _xScale.step();\n } else {\n maxXAxisLabelWidth = containerWidth;\n }\n }\n\n const wrapLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n showXAxisLablesTooltip: props.showXAxisLablesTooltip || false,\n noOfCharsToTruncate: props.noOfCharsToTruncate || 4,\n width: maxXAxisLabelWidth,\n };\n _removalValueForTextTuncate = createWrapOfXLabels(wrapLabelProps) ?? 0;\n }\n\n if (!props.wrapXAxisLables && props.rotateXAxisLables && props.xAxisType! === XAxisTypes.StringAxis) {\n const rotateLabelProps = {\n node: xAxisElement.current!,\n xAxis: _xScale,\n };\n const rotatedHeight = rotateXAxisLabels(rotateLabelProps) ?? 0;\n // margins.bottom is used as padding here\n _removalValueForTextTuncate = rotatedHeight + margins.bottom!;\n }\n }\n\n /**\n * We have use the {@link defaultTabbableElement } to fix\n * the Focus not landing on chart while tabbing, instead goes to legend.\n * This issue is observed in Area, line chart after performance optimization done in the PR {@link https://github.com/microsoft/fluentui/pull/27721 }\n * This issue is observed in Bar charts after the changes done by FocusZone team in the PR: {@link https://github.com/microsoft/fluentui/pull/24175 }\n * The issue in Bar Charts(VB and VSB) is due to a {@link FocusZone } update where previously an event listener was\n * attached on keydown to the window, so that whenever the tab key is pressed all outer FocusZone's\n * tab-indexes are updated (an outer FocusZone is a FocusZone that is not within another one).\n * But now after the above PR : they are attaching the\n * listeners to the FocusZone elements instead of the window. So in the first render cycle in Bar charts\n * bars are not created as in the first render cycle the size of the chart container is not known( or is 0)\n * which creates bars of height 0 so instead we do not create any bars and instead return empty fragments.\n *\n * We have tried 2 Approaches to fix the issue:\n * 1. Using the {@link elementRef} property of FocusZone where we dispatch event for tab keydown\n * after the second render cycle which triggers an update of the tab index in FocusZone.\n * But this is a hacky solution and not a proper fix and also elementRef is deprecated.\n * 2. Using the default tabbable element to fix the issue.\n */\n\n return (\n <div\n id={idForGraph}\n className={classes.root}\n role={'presentation'}\n ref={(rootElem: HTMLDivElement) => (chartContainer.current = rootElem)}\n onMouseLeave={_onChartLeave}\n >\n <div className={classes.chartWrapper} {...focusAttributes} {...arrowAttributes}>\n {_isFirstRender.current}\n <svg\n width={svgDimensions.width}\n height={svgDimensions.height}\n aria-label={props.chartTitle}\n style={{ display: 'block' }}\n className={classes.chart}\n {...getSecureProps(svgProps)}\n >\n <g\n ref={(e: SVGSVGElement | null) => {\n xAxisElement.current = e!;\n }}\n id={`xAxisGElement${idForGraph}`}\n // To add wrap of x axis lables feature, need to remove word height from svg height.\n transform={`translate(0, ${svgDimensions.height - margins.bottom! - _removalValueForTextTuncate!})`}\n className={classes.xAxis}\n />\n {props.xAxisTitle !== undefined && props.xAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisTitle}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: svgDimensions.height - titleMargin,\n className: classes.axisTitle!,\n textAnchor: 'middle',\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n />\n )}\n {props.xAxisAnnotation !== undefined && props.xAxisAnnotation !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.xAxisAnnotation}\n textProps={{\n x: margins.left! + startFromX + xAxisTitleMaximumAllowedWidth / 2,\n y: titleMargin + 3,\n className: classes.axisAnnotation!,\n textAnchor: 'middle',\n 'aria-hidden': true,\n }}\n maxWidth={xAxisTitleMaximumAllowedWidth}\n />\n )}\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElement.current = e!;\n }}\n id={`yAxisGElement${idForGraph}`}\n transform={`translate(${\n _useRtl ? svgDimensions.width - margins.right! - startFromX : margins.left! + startFromX\n }, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYScaleOptions && (\n <g>\n <g\n ref={(e: SVGSVGElement | null) => {\n yAxisElementSecondary.current = e!;\n }}\n id={`yAxisGElementSecondary${idForGraph}`}\n transform={`translate(${\n _useRtl ? margins.left! + startFromX : svgDimensions.width - margins.right! - startFromX\n }, 0)`}\n className={classes.yAxis}\n />\n {props.secondaryYAxistitle !== undefined && props.secondaryYAxistitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.secondaryYAxistitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n </g>\n )}\n {children}\n {props.yAxisTitle !== undefined && props.yAxisTitle !== '' && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisTitle}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? svgDimensions.width - margins.right! / 2 + titleMargin : margins.left! / 2 - titleMargin,\n textAnchor: 'middle',\n transform: `translate(0,\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisTitle!,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n {props.yAxisAnnotation !== undefined &&\n props.yAxisAnnotation !== '' &&\n (props.secondaryYAxistitle === undefined || props.secondaryYAxistitle === '') && (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={props.yAxisAnnotation}\n textProps={{\n x: (yAxisTitleMaximumAllowedHeight - margins.bottom!) / 2 + _removalValueForTextTuncate!,\n y: _useRtl ? startFromX - titleMargin : svgDimensions.width - margins.right!,\n textAnchor: 'middle',\n transform: `translate(${\n _useRtl ? margins.right! / 2 - titleMargin : margins.right! / 2 + titleMargin\n },\n ${svgDimensions.height - margins.bottom! - margins.top! - titleMargin})rotate(-90)`,\n className: classes.axisAnnotation!,\n 'aria-hidden': true,\n }}\n maxWidth={yAxisTitleMaximumAllowedHeight}\n />\n )}\n </svg>\n </div>\n\n {!props.hideLegend && (\n <div ref={(e: HTMLDivElement) => (legendContainer = e)} className={classes.legendContainer}>\n {props.legendBars}\n </div>\n )}\n {/** The callout is used for narration, so keep it mounted on the DOM */}\n {callout && <React.Suspense fallback={<div>Loading...</div>}>{callout}</React.Suspense>}\n </div>\n );\n});\nCartesianChart.displayName = 'CartesianChart';\nCartesianChart.defaultProps = {\n hideTickOverlap: true,\n};\n"],"names":["React","useCartesianChartStyles","select","d3Select","createNumericXAxis","createStringXAxis","createDateXAxis","XAxisTypes","YAxisType","createWrapOfXLabels","rotateXAxisLabels","calculateLongestLabelWidth","createYAxisLabels","ChartTypes","wrapContent","useRtl","truncateString","tooltipOfAxislabels","getSecureProps","DEFAULT_WRAP_WIDTH","useId","SVGTooltipText","ChartPopover","useFocusableGroup","useArrowNavigationGroup","CartesianChart","forwardRef","props","forwardedRef","chartContainer","useRef","legendContainer","minLegendContainerHeight","xAxisElement","yAxisElement","yAxisElementSecondary","margins","idForGraph","_reqID","_useRtl","_tickValues","titleMargin","_isFirstRender","_xScale","isIntegralDataset","useMemo","points","some","point","y","_tooltipId","_removalValueForTextTuncate","containerWidth","setContainerWidth","useState","containerHeight","setContainerHeight","startFromX","setStartFromX","prevProps","setPrevProps","chartTypesWithStringYAxis","HorizontalBarChartWithAxis","HeatMapChart","VerticalStackedBarChart","GanttChart","ScatterChart","top","bottom","right","left","secondaryYScaleOptions","TITLE_MARGIN_HORIZONTAL","TITLE_MARGIN_VERTICAL","xAxisTitle","undefined","yAxisTitle","secondaryYAxistitle","xAxisAnnotation","yAxisAnnotation","classes","focusAttributes","arrowAttributes","axis","useEffect","_fitParentContainer","includes","chartType","showYAxisLables","yAxisType","StringAxis","maxYAxisLabelLength","calculateMaxYAxisLabelLength","yAxis","cancelAnimationFrame","height","width","useImperativeHandle","componentRef","current","_generateCallout","calloutProps","className","formatTickLabel","str","showYAxisLablesTooltip","noOfCharsToTruncate","stringDatasetForYAxisDomain","map","label","svgProps","culture","dateLocalizeOptions","timeFormatLocale","customDateTimeFormatter","parentRef","margin","getmargins","callout","children","enableFirstRenderOptimization","XAxisParams","domainNRangeValues","getDomainNRangeValues","getDomainMargins","xAxisType","barwidth","tickValues","showRoundOffXTickValues","xAxisCount","xAxisTickCount","xAxistickSize","tickPadding","showXAxisLablesTooltip","xAxisPadding","xAxisInnerPadding","xAxisOuterPadding","hideTickOverlap","rotateXAxisLables","calcMaxLabelWidth","_calcMaxLabelWidthWithTransform","tickStep","xAxis","tick0","xScale","NumericAxis","tickParams","xScaleType","DateAxis","useUTC","datasetForXAxisDomain","_transformXAxisLabels","YAxisParams","getYDomainMargins","yAxisTickFormat","yAxisTickCount","yMinValue","yMaxValue","maxOfYVal","yMinMaxValues","getMinMaxOfYAxis","yAxisPadding","yAxisTickValues","yScalePrimary","yScaleSecondary","axisData","yAxisDomainValues","createStringYAxis","YAxisParamsSecondary","createYAxis","roundedTicks","secondaryYScaleType","yScaleType","document","getElementById","remove","e","_yAxisElement","call","ytooltipProps","tooltipCls","tooltip","id","_getData","getGraphData","getAxisData","hideTooltip","isPopoverOpen","svgDimensions","xAxisTitleMaximumAllowedWidth","yAxisTitleMaximumAllowedHeight","commonSvgToolTipProps","showBackground","svgTooltip","content","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","container","currentContainerWidth","reflowProps","mode","Math","max","_calculateChartMinWidth","currentContainerHeight","shouldResize","_onChartLeave","onChartMouseLeave","labelWidth","minChartWidth","length","GroupedVerticalBarChart","VerticalBarChart","minDomainMargin","x","wrapXAxisLables","longestLabelWidth","ceil","cos","PI","val","numChars","toString","slice","words","forEach","push","split","maxXAxisLabelWidth","step","wrapLabelProps","node","rotateLabelProps","rotatedHeight","div","root","role","ref","rootElem","onMouseLeave","chartWrapper","svg","aria-label","chartTitle","style","display","chart","g","transform","textProps","axisTitle","textAnchor","maxWidth","axisAnnotation","legendBars","Suspense","fallback","displayName","defaultProps"],"mappings":"AAAA;;;;;+BAqCayB;;;;;;;iEAnCU,QAAQ;+CAGS,mCAAmC;6BACxC,eAAe;uBAoB3C,wBAAwB;gCACT,4BAA4B;gCAEE,iCAAiC;8BACxD,iBAAiB;8BACa,0BAA0B;AAM9E,uBAAMA,WAAAA,GAAuEzB,OAAM0B,UAAU,CAGlG,CAACC,OAAOC;QAgDDD,gBACGA,iBACSA,iBAA4BA,iBAC5BA,iBAAmEA;IAlDtF,MAAME,iBAAiB7B,OAAM8B,MAAM;IACnC,IAAIC;IACJ,MAAMC,2BAAmC;IACzC,MAAMC,eAAejC,OAAM8B,MAAM;IACjC,MAAMI,eAAelC,OAAM8B,MAAM;IACjC,MAAMK,wBAAwBnC,OAAM8B,MAAM;IAC1C,IAAIM;IACJ,MAAMC,aAAqB;IAC3B,IAAIC;IACJ,MAAMC,cAAmBxB,aAAAA;IACzB,IAAIyB;IACJ,MAAMC,cAAsB;IAC5B,MAAMC,iBAAiB1C,OAAM8B,MAAM,CAAU;IAC7C,8DAA8D;IAC9D,IAAIa;IACJ,MAAMC,oBAAoB5C,OAAM6C,OAAO,CAAC;QACtC,OAAO,CAAClB,MAAMmB,MAAM,CAACC,IAAI,CAAC,CAACC,QAAyBA,MAAMC,CAAC,GAAG,MAAM;IACtE,GAAG;QAACtB,MAAMmB,MAAM;KAAC;IACjB,IAAII,aAAqB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I,IAAI5B,YACnE;mBACA,EAAEmJ,cAAc7F,MAAM,GAAG3D,QAAQgC,MAAM,GAAIhC,QAAQ+B,GAAG,GAAI1B,YAAY,YAAY,CAAC;YACpF6D,WAAWtB,QAAQmL,cAAc;YACjC,eAAe;QACjB;QACAD,UAAUpE;UAMnB,CAACnK,MAAMyK,UAAU,IAAA,WAAA,GAChB,OAAA,aAAA,CAAC4C,OAAAA;QAAIG,KAAK,CAACnE,IAAuBjJ,kBAAkBiJ;QAAI1E,WAAWtB,QAAQjD,eAAe;OACvFJ,MAAMyO,UAAU,GAIpB9I,WAAAA,WAAAA,GAAW,OAAA,aAAA,CAACtH,OAAMqQ,QAAQ,EAAA;QAACC,UAAAA,WAAAA,GAAU,OAAA,aAAA,CAACtB,OAAAA,MAAI;OAAmB1H;AAGpE,GAAG;AACH7F,eAAe8O,WAAW,GAAG;AAC7B9O,eAAe+O,YAAY,GAAG;IAC5B/H,iBAAiB;AACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/CartesianChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { LegendsProps } from '../Legends/index';\nimport {\n AccessibilityProps,\n Chart,\n Margins,\n DataPoint,\n HorizontalBarChartWithAxisDataPoint,\n GroupedVerticalBarChartData,\n HeatMapChartDataPoint,\n LineChartPoints,\n VerticalBarChartDataPoint,\n VerticalStackedBarDataPoint,\n ScatterChartPoints,\n GanttChartDataPoint,\n AxisCategoryOrder,\n AxisProps,\n AxisScaleType,\n} from '../../types/index';\nimport { TimeLocaleDefinition } from 'd3-time-format';\nimport { ChartPopoverProps } from './ChartPopover.types';\nimport { ChartTypes, IAxisData, IDomainNRange, IYAxisParams, XAxisTypes, YAxisType } from '../../utilities/utilities';\nimport { ScaleBand, ScaleLinear } from 'd3-scale';\n/**\n * Cartesian Chart style properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyleProps {\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n useRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @deprecated Use `reflowProps` instead.\n */\n enableReflow?: boolean;\n}\n\n/**\n * Cartesian Chart styles\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: string;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: string;\n\n /**\n * Style for legend container\n */\n legendContainer?: string;\n\n /**\n * line hover box css\n */\n hover?: string;\n\n /**\n * styles for description message\n */\n descriptionMessage?: string;\n\n /**\n * styles for tooltip\n */\n tooltip?: string;\n\n /**\n * styles for axis title\n */\n axisTitle?: string;\n\n /**\n * styles for axis annotation\n */\n axisAnnotation?: string;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n\n /**\n * Styles for the svg tooltip\n */\n svgTooltip?: string;\n\n /**\n * Styles for the chart svg element\n */\n chart?: string;\n}\n\n/**\n * Cartesian Chart properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: Margins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[] | string[] | undefined;\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * Secondary y-scale options\n * By default this is not defined, meaning there will be no secondary y-scale.\n */\n secondaryYScaleOptions?: {\n /** Minimum value (0 by default) */\n yMinValue?: number;\n /** Maximum value (100 by default) */\n yMaxValue?: number;\n };\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: CartesianChartStyles;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ChartPopoverProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @deprecated Use `reflowProps` instead.\n */\n enableReflow?: boolean;\n\n /**\n * Props related to reflow behavior of the chart\n */\n reflowProps?: {\n /**\n * Determines the reflow behavior of the chart.\n * When set to `'min-width'`, the chart will not shrink below a certain width and will enable scrolling if it overflows.\n * @default 'none'\n */\n mode: 'none' | 'min-width';\n };\n\n /**\n * Prop to set the x axis title\n * @default undefined\n * Minimum bottom margin required for x axis title is 55px\n */\n\n xAxisTitle?: string;\n\n /**\n * Prop to set the y axis title\n * @default undefined\n * Minimum left margin required for y axis title is 60px and for RTL is 40px\n * Minimum right margin required for y axis title is 40px and for RTL is 60px\n */\n yAxisTitle?: string;\n\n /**\n * Prop to set the secondary y axis title\n * @default undefined\n * If RTL is enabled, minimum left and right margins required for secondary y axis title is 60px\n */\n secondaryYAxistitle?: string;\n\n /**\n * Whether to use UTC time for axis scale, ticks, and the time display in callouts.\n * When set to `true`, time is displayed equally, regardless of the user's timezone settings.\n * @default true\n */\n useUTC?: string | boolean;\n\n /**\n * @default false\n * The prop used to decide rounded ticks on y axis\n */\n roundedTicks?: boolean;\n\n /**\n * Determines whether overlapping x-axis tick labels should be hidden.\n * @default true\n */\n hideTickOverlap?: boolean;\n\n /**\n * Define a custom callout props override\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPropsPerDataPoint?: (dataPointCalloutProps: any) => ChartPopoverProps;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<Chart>;\n\n /**\n * Prop to set the x axis annotation. Used to display additional information on the x-axis.\n * This is shown on the top of the chart.\n * @default undefined\n */\n xAxisAnnotation?: string;\n\n /**\n * Prop to set the y axis annotation. Used to display additional information on the y-axis.\n * This is shown on the right side of the chart. Not shown if secondary y-axis is enabled.\n * @default undefined\n */\n yAxisAnnotation?: string;\n\n /**\n * Specifies the ordering logic for categories (or string tick labels) on the x-axis.\n * @default 'default'\n */\n xAxisCategoryOrder?: AxisCategoryOrder;\n\n /**\n * Specifies the ordering logic for categories (or string tick labels) on the y-axis.\n * @default 'default'\n */\n yAxisCategoryOrder?: AxisCategoryOrder;\n\n /**\n * Defines the scale type for the x-axis.\n * @default 'default'\n */\n xScaleType?: AxisScaleType;\n\n /**\n * Defines the scale type for the primary y-axis.\n * @default 'default'\n */\n yScaleType?: AxisScaleType;\n\n /**\n * Defines the scale type for the secondary y-axis.\n * @default 'default'\n */\n secondaryYScaleType?: AxisScaleType;\n\n /**\n * Explicit set of tick values for the y-axis.\n * If provided, these values override automatic tick generation.\n */\n yAxisTickValues?: number[] | Date[] | string[];\n\n /**\n * Configuration for the x-axis.\n * Use this to control `tickStep`, `tick0`, etc.\n */\n xAxis?: AxisProps;\n\n /**\n * Configuration for the y-axis.\n * Use this to control `tickStep`, `tick0`, etc.\n */\n yAxis?: AxisProps;\n}\n\nexport interface YValueHover {\n legend?: string;\n y?: number | string;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface ChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any;\n containerHeight?: number;\n containerWidth?: number;\n optimizeLargeData?: boolean;\n}\n\n// Only used for Cartesian chart base\nexport interface ModifiedCartesianChartProps extends CartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSXElement | null;\n\n /**\n * Callout props\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: Margins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[] | string[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: ChildProps): React.ReactNode;\n\n /**\n * To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => Margins;\n\n /** Callback method to get extra margins for Y-axis domain */\n getYDomainMargins?: (containerHeight: number) => Margins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n\n /**\n * @default false\n * Used to control the first render cycle Performance optimization code.\n */\n enableFirstRenderOptimization?: boolean;\n\n /**\n * Get the min and max values of the y-axis\n */\n getMinMaxOfYAxis: (\n points:\n | LineChartPoints[]\n | HorizontalBarChartWithAxisDataPoint[]\n | VerticalBarChartDataPoint[]\n | DataPoint[]\n | ScatterChartPoints[]\n | GanttChartDataPoint[],\n yAxisType: YAxisType | undefined,\n useSecondaryYScale?: boolean,\n ) => { startValue: number; endValue: number };\n\n /**\n * Create the y-axis\n */\n createYAxis: (\n yAxisParams: IYAxisParams,\n isRtl: boolean,\n axisData: IAxisData,\n isIntegralDataset: boolean,\n chartType: ChartTypes,\n useSecondaryYScale?: boolean,\n roundedTicks?: boolean,\n scaleType?: AxisScaleType,\n ) => ScaleLinear<number, number, never>;\n\n /**\n * Get the domain and range values\n */\n getDomainNRangeValues: (\n points:\n | LineChartPoints[]\n | VerticalBarChartDataPoint[]\n | VerticalStackedBarDataPoint[]\n | HorizontalBarChartWithAxisDataPoint[]\n | GroupedVerticalBarChartData[]\n | HeatMapChartDataPoint[]\n | GanttChartDataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | string[] | undefined,\n shiftX: number,\n ) => IDomainNRange;\n\n /**\n * Create the string y-axis\n */\n createStringYAxis: (\n yAxisParams: IYAxisParams,\n dataPoints: string[],\n isRtl: boolean,\n barWidth: number | undefined,\n chartType?: ChartTypes,\n ) => ScaleBand<string>;\n\n /**\n * Controls whether the numeric x-axis domain should be extended to start and end at nice rounded values.\n * @default true\n */\n showRoundOffXTickValues?: boolean;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/CartesianChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { LegendsProps } from '../Legends/index';\nimport {\n AccessibilityProps,\n Chart,\n Margins,\n DataPoint,\n HorizontalBarChartWithAxisDataPoint,\n GroupedVerticalBarChartData,\n HeatMapChartDataPoint,\n LineChartPoints,\n VerticalBarChartDataPoint,\n VerticalStackedBarDataPoint,\n ScatterChartPoints,\n GanttChartDataPoint,\n AxisCategoryOrder,\n AxisProps,\n AxisScaleType,\n} from '../../types/index';\nimport { TimeLocaleDefinition } from 'd3-time-format';\nimport { ChartPopoverProps } from './ChartPopover.types';\nimport { ChartTypes, IAxisData, IDomainNRange, IYAxisParams, XAxisTypes, YAxisType } from '../../utilities/utilities';\nimport { ScaleBand, ScaleLinear } from 'd3-scale';\n/**\n * Cartesian Chart style properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyleProps {\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n useRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @deprecated Use `reflowProps` instead.\n */\n enableReflow?: boolean;\n}\n\n/**\n * Cartesian Chart styles\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: string;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: string;\n\n /**\n * Style for legend container\n */\n legendContainer?: string;\n\n /**\n * line hover box css\n */\n hover?: string;\n\n /**\n * styles for description message\n */\n descriptionMessage?: string;\n\n /**\n * styles for tooltip\n */\n tooltip?: string;\n\n /**\n * styles for axis title\n */\n axisTitle?: string;\n\n /**\n * styles for axis annotation\n */\n axisAnnotation?: string;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n\n /**\n * Styles for the svg tooltip\n */\n svgTooltip?: string;\n\n /**\n * Styles for the chart svg element\n */\n chart?: string;\n}\n\n/**\n * Cartesian Chart properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: Margins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[] | string[] | undefined;\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * Secondary y-scale options\n * By default this is not defined, meaning there will be no secondary y-scale.\n */\n secondaryYScaleOptions?: {\n /** Minimum value (0 by default) */\n yMinValue?: number;\n /** Maximum value (100 by default) */\n yMaxValue?: number;\n };\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: CartesianChartStyles;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ChartPopoverProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n\n /**\n * Prop to disable shrinking of the chart beyond a certain limit and enable scrolling when the chart overflows\n * @deprecated Use `reflowProps` instead.\n */\n enableReflow?: boolean;\n\n /**\n * Props related to reflow behavior of the chart\n */\n reflowProps?: {\n /**\n * Determines the reflow behavior of the chart.\n * When set to `'min-width'`, the chart will not shrink below a certain width and will enable scrolling if it overflows.\n * @default 'none'\n */\n mode: 'none' | 'min-width';\n };\n\n /**\n * Prop to set the x axis title\n * @default undefined\n * Minimum bottom margin required for x axis title is 55px\n */\n\n xAxisTitle?: string;\n\n /**\n * Prop to set the y axis title\n * @default undefined\n * Minimum left margin required for y axis title is 60px and for RTL is 40px\n * Minimum right margin required for y axis title is 40px and for RTL is 60px\n */\n yAxisTitle?: string;\n\n /**\n * Prop to set the secondary y axis title\n * @default undefined\n * If RTL is enabled, minimum left and right margins required for secondary y axis title is 60px\n */\n secondaryYAxistitle?: string;\n\n /**\n * Whether to use UTC time for axis scale, ticks, and the time display in callouts.\n * When set to `true`, time is displayed equally, regardless of the user's timezone settings.\n * @default true\n */\n useUTC?: string | boolean;\n\n /**\n * @default false\n * The prop used to decide rounded ticks on y axis\n */\n roundedTicks?: boolean;\n\n /**\n * Determines whether overlapping x-axis tick labels should be hidden.\n * @default true\n */\n hideTickOverlap?: boolean;\n\n /**\n * Define a custom callout props override\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPropsPerDataPoint?: (dataPointCalloutProps: any) => ChartPopoverProps;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<Chart>;\n\n /**\n * Prop to set the x axis annotation. Used to display additional information on the x-axis.\n * This is shown on the top of the chart.\n * @default undefined\n */\n xAxisAnnotation?: string;\n\n /**\n * Prop to set the y axis annotation. Used to display additional information on the y-axis.\n * This is shown on the right side of the chart. Not shown if secondary y-axis is enabled.\n * @default undefined\n */\n yAxisAnnotation?: string;\n\n /**\n * Specifies the ordering logic for categories (or string tick labels) on the x-axis.\n * @default 'default'\n */\n xAxisCategoryOrder?: AxisCategoryOrder;\n\n /**\n * Specifies the ordering logic for categories (or string tick labels) on the y-axis.\n * @default 'default'\n */\n yAxisCategoryOrder?: AxisCategoryOrder;\n\n /**\n * Defines the scale type for the x-axis.\n * @default 'default'\n */\n xScaleType?: AxisScaleType;\n\n /**\n * Defines the scale type for the primary y-axis.\n * @default 'default'\n */\n yScaleType?: AxisScaleType;\n\n /**\n * Defines the scale type for the secondary y-axis.\n * @default 'default'\n */\n secondaryYScaleType?: AxisScaleType;\n\n /**\n * Explicit set of tick values for the y-axis.\n * If provided, these values override automatic tick generation.\n */\n yAxisTickValues?: number[] | Date[] | string[];\n\n /**\n * Configuration for the x-axis.\n * Use this to control `tickStep`, `tick0`, etc.\n */\n xAxis?: AxisProps;\n\n /**\n * Configuration for the y-axis.\n * Use this to control `tickStep`, `tick0`, etc.\n */\n yAxis?: AxisProps;\n}\n\nexport interface YValueHover {\n legend?: string;\n y?: number | string;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface ChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any;\n containerHeight?: number;\n containerWidth?: number;\n optimizeLargeData?: boolean;\n}\n\n// Only used for Cartesian chart base\nexport interface ModifiedCartesianChartProps extends CartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSXElement | null;\n\n /**\n * Callout props\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: Margins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[] | string[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: ChildProps): React.ReactNode;\n\n /**\n * To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => Margins;\n\n /** Callback method to get extra margins for Y-axis domain */\n getYDomainMargins?: (containerHeight: number) => Margins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n\n /**\n * @default false\n * Used to control the first render cycle Performance optimization code.\n */\n enableFirstRenderOptimization?: boolean;\n\n /**\n * Get the min and max values of the y-axis\n */\n getMinMaxOfYAxis: (\n points:\n | LineChartPoints[]\n | HorizontalBarChartWithAxisDataPoint[]\n | VerticalBarChartDataPoint[]\n | DataPoint[]\n | ScatterChartPoints[]\n | GanttChartDataPoint[],\n yAxisType: YAxisType | undefined,\n useSecondaryYScale?: boolean,\n ) => { startValue: number; endValue: number };\n\n /**\n * Create the y-axis\n */\n createYAxis: (\n yAxisParams: IYAxisParams,\n isRtl: boolean,\n axisData: IAxisData,\n isIntegralDataset: boolean,\n chartType: ChartTypes,\n useSecondaryYScale?: boolean,\n roundedTicks?: boolean,\n scaleType?: AxisScaleType,\n _useRtl?: boolean,\n ) => ScaleLinear<number, number, never>;\n\n /**\n * Get the domain and range values\n */\n getDomainNRangeValues: (\n points:\n | LineChartPoints[]\n | VerticalBarChartDataPoint[]\n | VerticalStackedBarDataPoint[]\n | HorizontalBarChartWithAxisDataPoint[]\n | GroupedVerticalBarChartData[]\n | HeatMapChartDataPoint[]\n | GanttChartDataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | string[] | undefined,\n shiftX: number,\n ) => IDomainNRange;\n\n /**\n * Create the string y-axis\n */\n createStringYAxis: (\n yAxisParams: IYAxisParams,\n dataPoints: string[],\n isRtl: boolean,\n barWidth: number | undefined,\n chartType?: ChartTypes,\n ) => ScaleBand<string>;\n\n /**\n * Controls whether the numeric x-axis domain should be extended to start and end at nice rounded values.\n * @default true\n */\n showRoundOffXTickValues?: boolean;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -75,7 +76,8 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
75
76
|
}, (0, _chartutilities.formatToLocaleString)(legend, props.culture)), /*#__PURE__*/ _react.createElement("div", {
|
|
76
77
|
className: classes.calloutContentY,
|
|
77
78
|
style: {
|
|
78
|
-
color: props.color ? props.color : _reacttheme.tokens.colorNeutralForeground1
|
|
79
|
+
color: props.color ? props.color : _reacttheme.tokens.colorNeutralForeground1,
|
|
80
|
+
fontSize: _reacttheme.tokens.fontSizeHero700
|
|
79
81
|
}
|
|
80
82
|
}, (0, _chartutilities.formatToLocaleString)(YValue, props.culture))), !!props.ratio && /*#__PURE__*/ _react.createElement("div", {
|
|
81
83
|
className: classes.ratio
|
|
@@ -106,7 +108,8 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
106
108
|
} : {}
|
|
107
109
|
}, props.YValueHover && props.YValueHover.map((yValue, index, yValues)=>{
|
|
108
110
|
const isLast = index + 1 === yValues.length;
|
|
109
|
-
|
|
111
|
+
var _yValue_shouldDrawBorderBottom;
|
|
112
|
+
const shouldDrawBorderBottom = isLast ? false : (_yValue_shouldDrawBorderBottom = yValue.shouldDrawBorderBottom) !== null && _yValue_shouldDrawBorderBottom !== void 0 ? _yValue_shouldDrawBorderBottom : false;
|
|
110
113
|
return /*#__PURE__*/ _react.createElement("div", {
|
|
111
114
|
...(0, _index.getAccessibleDataObject)(yValue.callOutAccessibilityData, 'text', false),
|
|
112
115
|
key: `callout-content-${index}`,
|
|
@@ -150,7 +153,6 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
150
153
|
id: `${index}_${xValue.y}`,
|
|
151
154
|
className: classes.calloutBlockContainer,
|
|
152
155
|
style: {
|
|
153
|
-
marginTop: props.XValue ? '13px' : 'unset',
|
|
154
156
|
...!toDrawShape ? {
|
|
155
157
|
borderInlineStart: `4px solid ${xValue.color}`
|
|
156
158
|
} : {}
|
|
@@ -164,11 +166,18 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
164
166
|
},
|
|
165
167
|
shape: _index.Points[xValue.index % Object.keys(_index.pointTypes).length]
|
|
166
168
|
}), /*#__PURE__*/ _react.createElement("div", {
|
|
167
|
-
className: (0, _react1.mergeClasses)(classes.calloutBlockContainer, toDrawShape ? classes.calloutBlockContainertoDrawShapetrue : classes.calloutBlockContainertoDrawShapefalse)
|
|
169
|
+
className: (0, _react1.mergeClasses)(classes.calloutBlockContainer, toDrawShape ? classes.calloutBlockContainertoDrawShapetrue : classes.calloutBlockContainertoDrawShapefalse),
|
|
170
|
+
style: {
|
|
171
|
+
marginTop: xValue ? '13px' : 'unset'
|
|
172
|
+
}
|
|
168
173
|
}, /*#__PURE__*/ _react.createElement("div", {
|
|
169
174
|
className: classes.calloutlegendText
|
|
170
175
|
}, " ", xValue.legend), /*#__PURE__*/ _react.createElement("div", {
|
|
171
|
-
className: classes.calloutContentY
|
|
176
|
+
className: classes.calloutContentY,
|
|
177
|
+
style: {
|
|
178
|
+
direction: 'ltr',
|
|
179
|
+
unicodeBidi: 'isolate'
|
|
180
|
+
}
|
|
172
181
|
}, (0, _chartutilities.formatToLocaleString)(xValue.yAxisCalloutData ? xValue.yAxisCalloutData : (_xValue_y = xValue.y) !== null && _xValue_y !== void 0 ? _xValue_y : xValue.data, culture)))));
|
|
173
182
|
} else {
|
|
174
183
|
const subcounts = xValue.yAxisCalloutData;
|