@fluentui/react-charts 0.0.0-nightly-20250423-1342.1 → 0.0.0-nightly-20250423-1415.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -16
- package/dist/index.d.ts +3337 -0
- package/lib/AreaChart.js +1 -0
- package/lib/AreaChart.js.map +1 -0
- package/lib/CartesianChart.js +1 -0
- package/lib/CartesianChart.js.map +1 -0
- package/lib/DeclarativeChart.js +1 -0
- package/lib/DeclarativeChart.js.map +1 -0
- package/lib/DonutChart.js +1 -0
- package/lib/DonutChart.js.map +1 -0
- package/lib/GaugeChart.js +1 -0
- package/lib/GaugeChart.js.map +1 -0
- package/lib/GroupedVerticalBarChart.js +1 -0
- package/lib/GroupedVerticalBarChart.js.map +1 -0
- package/lib/HeatMapChart.js +1 -0
- package/lib/HeatMapChart.js.map +1 -0
- package/lib/HorizontalBarChart.js +1 -0
- package/lib/HorizontalBarChart.js.map +1 -0
- package/lib/HorizontalBarChartWithAxis.js +1 -0
- package/lib/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/Legends.js +1 -0
- package/lib/Legends.js.map +1 -0
- package/lib/LineChart.js +1 -0
- package/lib/LineChart.js.map +1 -0
- package/lib/Popover.js +1 -0
- package/lib/Popover.js.map +1 -0
- package/lib/ResponsiveContainer.js +1 -0
- package/lib/ResponsiveContainer.js.map +1 -0
- package/lib/SankeyChart.js +1 -0
- package/lib/SankeyChart.js.map +1 -0
- package/lib/ScatterChart.js +1 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/Sparkline.js +1 -0
- package/lib/Sparkline.js.map +1 -0
- package/lib/VerticalBarChart.js +1 -0
- package/lib/VerticalBarChart.js.map +1 -0
- package/lib/VerticalStackedBarChart.js +1 -0
- package/lib/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.js +775 -0
- package/lib/components/AreaChart/AreaChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.types.js +4 -0
- package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib/components/AreaChart/index.js +3 -0
- package/lib/components/AreaChart/index.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +64 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +478 -0
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.js +187 -0
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib/components/CommonComponents/index.js +4 -0
- package/lib/components/CommonComponents/index.js.map +1 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +197 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +811 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib/components/DeclarativeChart/imageExporter.js +221 -0
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib/components/DeclarativeChart/index.js +1 -0
- package/lib/components/DeclarativeChart/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.js +110 -0
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib/components/DonutChart/Arc/index.js +2 -0
- package/lib/components/DonutChart/Arc/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.js +291 -0
- package/lib/components/DonutChart/DonutChart.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.types.js +1 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.js +72 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/index.js +2 -0
- package/lib/components/DonutChart/Pie/index.js.map +1 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/index.js +3 -0
- package/lib/components/DonutChart/index.js.map +1 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.js +592 -0
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib/components/GaugeChart/index.js +3 -0
- package/lib/components/GaugeChart/index.js.map +1 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +174 -0
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/index.js +3 -0
- package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +90 -0
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib/components/HeatMapChart/index.js +3 -0
- package/lib/components/HeatMapChart/index.js.map +1 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +46 -0
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib/components/HorizontalBarChart/index.js +3 -0
- package/lib/components/HorizontalBarChart/index.js.map +1 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +76 -0
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib/components/Legends/Legends.js +303 -0
- package/lib/components/Legends/Legends.js.map +1 -0
- package/lib/components/Legends/Legends.types.js +1 -0
- package/lib/components/Legends/Legends.types.js.map +1 -0
- package/lib/components/Legends/OverflowMenu.js +25 -0
- package/lib/components/Legends/OverflowMenu.js.map +1 -0
- package/lib/components/Legends/index.js +3 -0
- package/lib/components/Legends/index.js.map +1 -0
- package/lib/components/Legends/shape.js +35 -0
- package/lib/components/Legends/shape.js.map +1 -0
- package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib/components/LineChart/LineChart.js +1034 -0
- package/lib/components/LineChart/LineChart.js.map +1 -0
- package/lib/components/LineChart/LineChart.types.js +3 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib/components/LineChart/index.js +4 -0
- package/lib/components/LineChart/index.js.map +1 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib/components/ResponsiveContainer/index.js +1 -0
- package/lib/components/ResponsiveContainer/index.js.map +1 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.js +1022 -0
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib/components/SankeyChart/index.js +3 -0
- package/lib/components/SankeyChart/index.js.map +1 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.js +465 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +65 -0
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.js +119 -0
- package/lib/components/Sparkline/Sparkline.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.types.js +4 -0
- package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib/components/Sparkline/index.js +3 -0
- package/lib/components/Sparkline/index.js.map +1 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js +926 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib/components/VerticalBarChart/index.js +3 -0
- package/lib/components/VerticalBarChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/index.js +3 -0
- package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +73 -0
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/lib/types/DataPoint.js +1 -0
- package/lib/types/DataPoint.js.map +1 -0
- package/lib/types/EventAnnotation.js +1 -0
- package/lib/types/EventAnnotation.js.map +1 -0
- package/lib/types/LegendDataItem.js +1 -0
- package/lib/types/LegendDataItem.js.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utilities/FocusableTooltipText.js +65 -0
- package/lib/utilities/FocusableTooltipText.js.map +1 -0
- package/lib/utilities/KeyCodes.js +8 -0
- package/lib/utilities/KeyCodes.js.map +1 -0
- package/lib/utilities/SVGTooltipText.js +183 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -0
- package/lib/utilities/async-utils.js +380 -0
- package/lib/utilities/async-utils.js.map +1 -0
- package/lib/utilities/colors.js +269 -0
- package/lib/utilities/colors.js.map +1 -0
- package/lib/utilities/getWindow.js +25 -0
- package/lib/utilities/getWindow.js.map +1 -0
- package/lib/utilities/index.js +3 -0
- package/lib/utilities/index.js.map +1 -0
- package/lib/utilities/locale-util.js +15 -0
- package/lib/utilities/locale-util.js.map +1 -0
- package/lib/utilities/overflow-utils.js +27 -0
- package/lib/utilities/overflow-utils.js.map +1 -0
- package/lib/utilities/string.js +32 -0
- package/lib/utilities/string.js.map +1 -0
- package/lib/utilities/test-data.js +329 -0
- package/lib/utilities/test-data.js.map +1 -0
- package/lib/utilities/utilities.js +1405 -0
- package/lib/utilities/utilities.js.map +1 -0
- package/lib/utilities/vbc-utils.js +27 -0
- package/lib/utilities/vbc-utils.js.map +1 -0
- package/lib-commonjs/AreaChart.js +6 -0
- package/lib-commonjs/AreaChart.js.map +1 -0
- package/lib-commonjs/CartesianChart.js +6 -0
- package/lib-commonjs/CartesianChart.js.map +1 -0
- package/lib-commonjs/DeclarativeChart.js +6 -0
- package/lib-commonjs/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/DonutChart.js +6 -0
- package/lib-commonjs/DonutChart.js.map +1 -0
- package/lib-commonjs/GaugeChart.js +6 -0
- package/lib-commonjs/GaugeChart.js.map +1 -0
- package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
- package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -0
- package/lib-commonjs/HeatMapChart.js +6 -0
- package/lib-commonjs/HeatMapChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChart.js +6 -0
- package/lib-commonjs/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/Legends.js +6 -0
- package/lib-commonjs/Legends.js.map +1 -0
- package/lib-commonjs/LineChart.js +6 -0
- package/lib-commonjs/LineChart.js.map +1 -0
- package/lib-commonjs/Popover.js +6 -0
- package/lib-commonjs/Popover.js.map +1 -0
- package/lib-commonjs/ResponsiveContainer.js +6 -0
- package/lib-commonjs/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/SankeyChart.js +6 -0
- package/lib-commonjs/SankeyChart.js.map +1 -0
- package/lib-commonjs/ScatterChart.js +6 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/Sparkline.js +6 -0
- package/lib-commonjs/Sparkline.js.map +1 -0
- package/lib-commonjs/VerticalBarChart.js +6 -0
- package/lib-commonjs/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/VerticalStackedBarChart.js +6 -0
- package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib-commonjs/components/AreaChart/index.js +8 -0
- package/lib-commonjs/components/AreaChart/index.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +104 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +484 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/index.js +9 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +205 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +859 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
- package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/index.js +8 -0
- package/lib-commonjs/components/DonutChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +621 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/index.js +8 -0
- package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +252 -0
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +139 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/index.js +8 -0
- package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +68 -0
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +116 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.js +313 -0
- package/lib-commonjs/components/Legends/Legends.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.types.js +6 -0
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
- package/lib-commonjs/components/Legends/index.js +8 -0
- package/lib-commonjs/components/Legends/index.js.map +1 -0
- package/lib-commonjs/components/Legends/shape.js +46 -0
- package/lib-commonjs/components/Legends/shape.js.map +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.js +1040 -0
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib-commonjs/components/LineChart/index.js +9 -0
- package/lib-commonjs/components/LineChart/index.js.map +1 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1038 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/index.js +8 -0
- package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +471 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.js +8 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +96 -0
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib-commonjs/components/Sparkline/index.js +8 -0
- package/lib-commonjs/components/Sparkline/index.js.map +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +928 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +120 -0
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +25 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/types/DataPoint.js +4 -0
- package/lib-commonjs/types/DataPoint.js.map +1 -0
- package/lib-commonjs/types/EventAnnotation.js +6 -0
- package/lib-commonjs/types/EventAnnotation.js.map +1 -0
- package/lib-commonjs/types/LegendDataItem.js +4 -0
- package/lib-commonjs/types/LegendDataItem.js.map +1 -0
- package/lib-commonjs/types/index.js +7 -0
- package/lib-commonjs/types/index.js.map +1 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/KeyCodes.js +18 -0
- package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +193 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/async-utils.js +382 -0
- package/lib-commonjs/utilities/async-utils.js.map +1 -0
- package/lib-commonjs/utilities/colors.js +293 -0
- package/lib-commonjs/utilities/colors.js.map +1 -0
- package/lib-commonjs/utilities/getWindow.js +28 -0
- package/lib-commonjs/utilities/getWindow.js.map +1 -0
- package/lib-commonjs/utilities/index.js +8 -0
- package/lib-commonjs/utilities/index.js.map +1 -0
- package/lib-commonjs/utilities/locale-util.js +25 -0
- package/lib-commonjs/utilities/locale-util.js.map +1 -0
- package/lib-commonjs/utilities/overflow-utils.js +36 -0
- package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
- package/lib-commonjs/utilities/string.js +29 -0
- package/lib-commonjs/utilities/string.js.map +1 -0
- package/lib-commonjs/utilities/test-data.js +383 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +1371 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -0
- package/lib-commonjs/utilities/vbc-utils.js +45 -0
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
- package/package.json +13 -13
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
donutArcClassNames: function() {
|
|
13
|
+
return donutArcClassNames;
|
|
14
|
+
},
|
|
15
|
+
useArcStyles: function() {
|
|
16
|
+
return useArcStyles;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const donutArcClassNames = {
|
|
21
|
+
root: 'fui-donut-arc__root',
|
|
22
|
+
focusRing: 'fui-donut-arc__focusRing',
|
|
23
|
+
arcLabel: 'fui-donut-arc__arcLabel'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Base Styles
|
|
27
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
28
|
+
root: {
|
|
29
|
+
Bceei9c: "f158kwzp",
|
|
30
|
+
Bpd4iqm: "f2cu5sd",
|
|
31
|
+
ojy3ng: "f1yuyku4",
|
|
32
|
+
B4ncu3z: "f138xzbb",
|
|
33
|
+
zxy5zd: [
|
|
34
|
+
"fny96iz",
|
|
35
|
+
"fi0bkha"
|
|
36
|
+
],
|
|
37
|
+
bkw2yb: "f1jv8gm3",
|
|
38
|
+
Bjksbd0: [
|
|
39
|
+
"fi0bkha",
|
|
40
|
+
"fny96iz"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
focusRing: {
|
|
44
|
+
ojy3ng: "frcfrt5",
|
|
45
|
+
Be5yapy: "f9nnx8l",
|
|
46
|
+
Bkfmm31: "f1au8mb3"
|
|
47
|
+
},
|
|
48
|
+
arcLabel: {
|
|
49
|
+
Bahqtrf: "fk6fouc",
|
|
50
|
+
Be2twd7: "fy9rknc",
|
|
51
|
+
Bhrd7zp: "fl43uef",
|
|
52
|
+
Bg96gwp: "fwrc4pm",
|
|
53
|
+
Bkfmm31: "fhuob2q"
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
d: [
|
|
57
|
+
".f158kwzp{cursor:default;}",
|
|
58
|
+
".f2cu5sd{outline-width:transparent;}",
|
|
59
|
+
".f1yuyku4{stroke:var(--colorNeutralBackground1);}",
|
|
60
|
+
".f138xzbb selectors::-moz-focus-inner{border-top-width:0;}",
|
|
61
|
+
".fny96iz selectors::-moz-focus-inner{border-right-width:0;}",
|
|
62
|
+
".fi0bkha selectors::-moz-focus-inner{border-left-width:0;}",
|
|
63
|
+
".f1jv8gm3 selectors::-moz-focus-inner{border-bottom-width:0;}",
|
|
64
|
+
".frcfrt5{stroke:var(--colorStrokeFocus2);}",
|
|
65
|
+
".f9nnx8l{stroke-width:var(--strokeWidthThickest);}",
|
|
66
|
+
".f1au8mb3{fill:transparent;}",
|
|
67
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
68
|
+
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
69
|
+
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
70
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
71
|
+
".fhuob2q{fill:var(--colorNeutralForeground1);}"
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
const useArcStyles = (props)=>{
|
|
75
|
+
var _props_styles, _props_styles1, _props_styles2;
|
|
76
|
+
const { className } = props;
|
|
77
|
+
const baseStyles = useStyles();
|
|
78
|
+
return {
|
|
79
|
+
root: (0, _react.mergeClasses)(donutArcClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
|
|
80
|
+
focusRing: (0, _react.mergeClasses)(donutArcClassNames.focusRing, baseStyles.focusRing, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.focusRing),
|
|
81
|
+
arcLabel: (0, _react.mergeClasses)(donutArcClassNames.arcLabel, baseStyles.arcLabel, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.arcLabel)
|
|
82
|
+
};
|
|
83
|
+
}; //# sourceMappingURL=useArcStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useArcStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const donutArcClassNames = {\n root: 'fui-donut-arc__root',\n focusRing: 'fui-donut-arc__focusRing',\n arcLabel: 'fui-donut-arc__arcLabel'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n cursor: 'default',\n ...shorthands.outline('transparent'),\n stroke: tokens.colorNeutralBackground1,\n '& selectors': {\n '::-moz-focus-inner': {\n ...shorthands.border('0')\n }\n }\n },\n focusRing: {\n stroke: tokens.colorStrokeFocus2,\n strokeWidth: tokens.strokeWidthThickest,\n fill: 'transparent'\n },\n arcLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1\n }\n});\n/**\n * Apply styling to the Arc components\n */ export const useArcStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2;\n const { className } = props;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(donutArcClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n focusRing: mergeClasses(donutArcClassNames.focusRing, baseStyles.focusRing, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.focusRing),\n arcLabel: mergeClasses(donutArcClassNames.arcLabel, baseStyles.arcLabel, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.arcLabel)\n };\n};\n"],"names":["donutArcClassNames","useArcStyles","root","focusRing","arcLabel","useStyles","__styles","Bceei9c","Bpd4iqm","ojy3ng","B4ncu3z","zxy5zd","bkw2yb","Bjksbd0","Be5yapy","Bkfmm31","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","props","_props_styles","_props_styles1","_props_styles2","className","baseStyles","mergeClasses","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIiBA,kBAAkB;eAAlBA;;IA8BAC,YAAY;eAAZA;;;uBAlCoC;AAI1C,MAAMD,qBAAqB;IAClCE,MAAM;IACNC,WAAW;IACXC,UAAU;AACd;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAK,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,SAAA;YAAA;YAAA;SAAA;IAAA;IAAAV,WAAA;QAAAM,QAAA;QAAAK,SAAA;QAAAC,SAAA;IAAA;IAAAX,UAAA;QAAAY,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAJ,SAAA;IAAA;AAAA,GAAA;IAAAK,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAuBX,MAAMnB,eAAgBoB,CAAAA;IAC7B,IAAIC,eAAeC,gBAAgBC;IACnC,MAAM,EAAEC,SAAAA,EAAW,GAAGJ;IACtB,MAAMK,aAAarB;IACnB,OAAO;QACHH,MAAMyB,IAAAA,mBAAY,EAAC3B,mBAAmBE,IAAI,EAAEwB,WAAWxB,IAAI,EAAEuB,WAAW,AAACH,CAAAA,gBAAgBD,MAAMO,MAAM,AAANA,MAAY,QAAQN,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcpB,IAAI;QACzKC,WAAWwB,IAAAA,mBAAY,EAAC3B,mBAAmBG,SAAS,EAAEuB,WAAWvB,SAAS,EAAE,AAACoB,CAAAA,iBAAiBF,MAAMO,MAAM,AAANA,MAAY,QAAQL,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAepB,SAAS;QACrLC,UAAUuB,IAAAA,mBAAY,EAAC3B,mBAAmBI,QAAQ,EAAEsB,WAAWtB,QAAQ,EAAE,AAACoB,CAAAA,iBAAiBH,MAAMO,MAAM,AAANA,MAAY,QAAQJ,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAepB,QAAQ;IACrL;AACJ"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-bind */ "use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DonutChart", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DonutChart;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _index = require("./Pie/index");
|
|
14
|
+
const _useDonutChartStylesstyles = require("./useDonutChartStyles.styles");
|
|
15
|
+
const _localeutil = require("../../utilities/locale-util");
|
|
16
|
+
const _index1 = require("../../utilities/index");
|
|
17
|
+
const _index2 = require("../../index");
|
|
18
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
19
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
20
|
+
const _ChartPopover = require("../CommonComponents/ChartPopover");
|
|
21
|
+
const MIN_LEGEND_CONTAINER_HEIGHT = 40;
|
|
22
|
+
const DonutChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
23
|
+
const _rootElem = _react.useRef(null);
|
|
24
|
+
const _uniqText = (0, _reactutilities.useId)('_Pie_');
|
|
25
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */ let _calloutAnchorPoint;
|
|
26
|
+
let _emptyChartId;
|
|
27
|
+
const legendContainer = _react.useRef(null);
|
|
28
|
+
const prevSize = _react.useRef({});
|
|
29
|
+
const [value, setValue] = _react.useState('');
|
|
30
|
+
const [legend, setLegend] = _react.useState('');
|
|
31
|
+
const [_width, setWidth] = _react.useState(props.width || 200);
|
|
32
|
+
const [_height, setHeight] = _react.useState(props.height || 200);
|
|
33
|
+
const [activeLegend, setActiveLegend] = _react.useState('');
|
|
34
|
+
const [color, setColor] = _react.useState('');
|
|
35
|
+
const [xCalloutValue, setXCalloutValue] = _react.useState('');
|
|
36
|
+
const [yCalloutValue, setYCalloutValue] = _react.useState('');
|
|
37
|
+
const [selectedLegend, setSelectedLegend] = _react.useState('');
|
|
38
|
+
const [focusedArcId, setFocusedArcId] = _react.useState('');
|
|
39
|
+
const [dataPointCalloutProps, setDataPointCalloutProps] = _react.useState();
|
|
40
|
+
const [clickPosition, setClickPosition] = _react.useState({
|
|
41
|
+
x: 0,
|
|
42
|
+
y: 0
|
|
43
|
+
});
|
|
44
|
+
const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
|
|
45
|
+
_react.useEffect(()=>{
|
|
46
|
+
_fitParentContainer();
|
|
47
|
+
}, []);
|
|
48
|
+
_react.useEffect(()=>{
|
|
49
|
+
if (prevSize.current.height !== props.height || prevSize.current.width !== props.width) {
|
|
50
|
+
_fitParentContainer();
|
|
51
|
+
}
|
|
52
|
+
prevSize.current.height = props.height;
|
|
53
|
+
prevSize.current.width = props.width;
|
|
54
|
+
}, [
|
|
55
|
+
props.width,
|
|
56
|
+
props.height
|
|
57
|
+
]);
|
|
58
|
+
_react.useImperativeHandle(props.componentRef, ()=>({
|
|
59
|
+
chartContainer: _rootElem.current
|
|
60
|
+
}), []);
|
|
61
|
+
function _elevateToMinimums(data) {
|
|
62
|
+
let sumOfData = 0;
|
|
63
|
+
const minPercent = 0.01;
|
|
64
|
+
const elevatedData = [];
|
|
65
|
+
data.forEach((item)=>{
|
|
66
|
+
sumOfData += item.data;
|
|
67
|
+
});
|
|
68
|
+
data.forEach((item)=>{
|
|
69
|
+
elevatedData.push(minPercent * sumOfData > item.data && item.data > 0 ? {
|
|
70
|
+
...item,
|
|
71
|
+
data: minPercent * sumOfData,
|
|
72
|
+
yAxisCalloutData: item.yAxisCalloutData === undefined ? item.data.toLocaleString() : item.yAxisCalloutData
|
|
73
|
+
} : item);
|
|
74
|
+
});
|
|
75
|
+
return elevatedData;
|
|
76
|
+
}
|
|
77
|
+
function _createLegends(chartData) {
|
|
78
|
+
const legendDataItems = chartData.map((point, index)=>{
|
|
79
|
+
const color = point.color;
|
|
80
|
+
// mapping data to the format Legends component needs
|
|
81
|
+
const legend = {
|
|
82
|
+
title: point.legend,
|
|
83
|
+
color,
|
|
84
|
+
action: ()=>{
|
|
85
|
+
if (selectedLegend === point.legend) {
|
|
86
|
+
setSelectedLegend('');
|
|
87
|
+
} else {
|
|
88
|
+
setSelectedLegend(point.legend);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
hoverAction: ()=>{
|
|
92
|
+
_handleChartMouseLeave();
|
|
93
|
+
setActiveLegend(point.legend);
|
|
94
|
+
},
|
|
95
|
+
onMouseOutAction: ()=>{
|
|
96
|
+
setActiveLegend('');
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return legend;
|
|
100
|
+
});
|
|
101
|
+
const legends = /*#__PURE__*/ _react.createElement(_index2.Legends, {
|
|
102
|
+
legends: legendDataItems,
|
|
103
|
+
centerLegends: true,
|
|
104
|
+
overflowText: props.legendsOverflowText,
|
|
105
|
+
...props.legendProps
|
|
106
|
+
});
|
|
107
|
+
return legends;
|
|
108
|
+
}
|
|
109
|
+
function _focusCallback(data, id, element) {
|
|
110
|
+
setPopoverOpen(selectedLegend === '' || selectedLegend === data.legend);
|
|
111
|
+
setValue(data.data.toString());
|
|
112
|
+
setLegend(data.legend);
|
|
113
|
+
setColor(data.color);
|
|
114
|
+
setXCalloutValue(data.xAxisCalloutData);
|
|
115
|
+
setYCalloutValue(data.yAxisCalloutData);
|
|
116
|
+
setFocusedArcId(id);
|
|
117
|
+
setDataPointCalloutProps(data);
|
|
118
|
+
}
|
|
119
|
+
function _hoverCallback(data, e) {
|
|
120
|
+
if (_calloutAnchorPoint !== data) {
|
|
121
|
+
_calloutAnchorPoint = data;
|
|
122
|
+
setPopoverOpen(selectedLegend === '' || selectedLegend === data.legend);
|
|
123
|
+
setValue(data.data.toString());
|
|
124
|
+
setLegend(data.legend);
|
|
125
|
+
setColor(data.color);
|
|
126
|
+
setXCalloutValue(data.xAxisCalloutData);
|
|
127
|
+
setYCalloutValue(data.yAxisCalloutData);
|
|
128
|
+
setDataPointCalloutProps(data);
|
|
129
|
+
updatePosition(e.clientX, e.clientY);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function _onBlur() {
|
|
133
|
+
setFocusedArcId('');
|
|
134
|
+
}
|
|
135
|
+
function _hoverLeave() {
|
|
136
|
+
/**/ }
|
|
137
|
+
function _handleChartMouseLeave() {
|
|
138
|
+
_calloutAnchorPoint = null;
|
|
139
|
+
setPopoverOpen(false);
|
|
140
|
+
}
|
|
141
|
+
function _valueInsideDonut(valueInsideDonut, data) {
|
|
142
|
+
const highlightedLegend = _getHighlightedLegend();
|
|
143
|
+
if (valueInsideDonut !== undefined && (highlightedLegend !== '' || isPopoverOpen)) {
|
|
144
|
+
let legendValue = valueInsideDonut;
|
|
145
|
+
data.map((point, index)=>{
|
|
146
|
+
if (point.legend === highlightedLegend || isPopoverOpen && point.legend === legend) {
|
|
147
|
+
legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data;
|
|
148
|
+
}
|
|
149
|
+
return;
|
|
150
|
+
});
|
|
151
|
+
return legendValue;
|
|
152
|
+
} else {
|
|
153
|
+
return valueInsideDonut;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function _toLocaleString(data) {
|
|
157
|
+
const localeString = (0, _localeutil.convertToLocaleString)(data, props.culture);
|
|
158
|
+
if (!localeString) {
|
|
159
|
+
return data;
|
|
160
|
+
}
|
|
161
|
+
return localeString === null || localeString === void 0 ? void 0 : localeString.toString();
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* This function returns
|
|
165
|
+
* the selected legend if there is one
|
|
166
|
+
* or the hovered legend if none of the legends is selected.
|
|
167
|
+
* Note: This won't work in case of multiple legends selection.
|
|
168
|
+
*/ function _getHighlightedLegend() {
|
|
169
|
+
return selectedLegend || activeLegend;
|
|
170
|
+
}
|
|
171
|
+
function _isChartEmpty() {
|
|
172
|
+
return !(props.data && props.data.chartData && props.data.chartData.filter((d)=>d.data > 0).length > 0);
|
|
173
|
+
}
|
|
174
|
+
function _addDefaultColors(donutChartDataPoint) {
|
|
175
|
+
return donutChartDataPoint ? donutChartDataPoint.map((item, index)=>{
|
|
176
|
+
let defaultColor;
|
|
177
|
+
if (typeof item.color === 'undefined') {
|
|
178
|
+
defaultColor = (0, _index1.getNextColor)(index, 0);
|
|
179
|
+
} else {
|
|
180
|
+
defaultColor = (0, _index1.getColorFromToken)(item.color);
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
...item,
|
|
184
|
+
defaultColor
|
|
185
|
+
};
|
|
186
|
+
}) : [];
|
|
187
|
+
}
|
|
188
|
+
function updatePosition(newX, newY) {
|
|
189
|
+
const threshold = 1; // Set a threshold for movement
|
|
190
|
+
const { x, y } = clickPosition;
|
|
191
|
+
// Calculate the distance moved
|
|
192
|
+
const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
|
|
193
|
+
// Update the position only if the distance moved is greater than the threshold
|
|
194
|
+
if (distance > threshold) {
|
|
195
|
+
setClickPosition({
|
|
196
|
+
x: newX,
|
|
197
|
+
y: newY
|
|
198
|
+
});
|
|
199
|
+
setPopoverOpen(true);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* When screen resizes, along with screen, chart also auto adjusted.
|
|
204
|
+
* This method used to adjust height and width of the charts.
|
|
205
|
+
*/ function _fitParentContainer() {
|
|
206
|
+
//_reqID = requestAnimationFrame(() => {
|
|
207
|
+
let legendContainerHeight;
|
|
208
|
+
if (props.hideLegend) {
|
|
209
|
+
// If there is no legend, need not to allocate some space from total chart space.
|
|
210
|
+
legendContainerHeight = 0;
|
|
211
|
+
} else {
|
|
212
|
+
const legendContainerComputedStyles = legendContainer.current && getComputedStyle(legendContainer.current);
|
|
213
|
+
legendContainerHeight = (legendContainer.current && legendContainer.current.getBoundingClientRect().height || MIN_LEGEND_CONTAINER_HEIGHT) + parseFloat(legendContainerComputedStyles && legendContainerComputedStyles.marginTop || '0') + parseFloat(legendContainerComputedStyles && legendContainerComputedStyles.marginBottom || '0');
|
|
214
|
+
}
|
|
215
|
+
if (props.parentRef || _rootElem.current) {
|
|
216
|
+
const container = props.parentRef ? props.parentRef : _rootElem.current;
|
|
217
|
+
const currentContainerWidth = container.getBoundingClientRect().width;
|
|
218
|
+
const currentContainerHeight = container.getBoundingClientRect().height > legendContainerHeight ? container.getBoundingClientRect().height : 200;
|
|
219
|
+
const shouldResize = _width !== currentContainerWidth || _height !== currentContainerHeight - legendContainerHeight;
|
|
220
|
+
if (shouldResize) {
|
|
221
|
+
setWidth(currentContainerWidth);
|
|
222
|
+
setHeight(currentContainerHeight - legendContainerHeight);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
//});
|
|
226
|
+
}
|
|
227
|
+
const { data, hideLegend = false } = props;
|
|
228
|
+
const points = _addDefaultColors(data === null || data === void 0 ? void 0 : data.chartData);
|
|
229
|
+
const classes = (0, _useDonutChartStylesstyles.useDonutChartStyles)(props);
|
|
230
|
+
const legendBars = _createLegends(points);
|
|
231
|
+
const donutMarginHorizontal = props.hideLabels ? 0 : 80;
|
|
232
|
+
const donutMarginVertical = props.hideLabels ? 0 : 40;
|
|
233
|
+
const outerRadius = Math.min(_width - donutMarginHorizontal, _height - donutMarginVertical) / 2;
|
|
234
|
+
const chartData = _elevateToMinimums(points.filter((d)=>d.data >= 0));
|
|
235
|
+
const valueInsideDonut = props.innerRadius !== 0 ? _valueInsideDonut(props.valueInsideDonut, chartData) : '';
|
|
236
|
+
const focusAttributes = (0, _reacttabster.useFocusableGroup)();
|
|
237
|
+
var _props_culture;
|
|
238
|
+
return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement("div", {
|
|
239
|
+
className: classes.root,
|
|
240
|
+
ref: (rootElem)=>_rootElem.current = rootElem,
|
|
241
|
+
onMouseLeave: _handleChartMouseLeave
|
|
242
|
+
}, /*#__PURE__*/ _react.createElement("div", {
|
|
243
|
+
className: classes.chartWrapper,
|
|
244
|
+
...focusAttributes
|
|
245
|
+
}, /*#__PURE__*/ _react.createElement("svg", {
|
|
246
|
+
className: classes.chart,
|
|
247
|
+
"aria-label": data === null || data === void 0 ? void 0 : data.chartTitle,
|
|
248
|
+
width: _width,
|
|
249
|
+
height: _height
|
|
250
|
+
}, /*#__PURE__*/ _react.createElement(_index.Pie, {
|
|
251
|
+
width: _width,
|
|
252
|
+
height: _height,
|
|
253
|
+
outerRadius: outerRadius,
|
|
254
|
+
innerRadius: props.innerRadius,
|
|
255
|
+
data: chartData,
|
|
256
|
+
onFocusCallback: _focusCallback,
|
|
257
|
+
hoverOnCallback: _hoverCallback,
|
|
258
|
+
hoverLeaveCallback: _hoverLeave,
|
|
259
|
+
uniqText: _uniqText,
|
|
260
|
+
onBlurCallback: _onBlur,
|
|
261
|
+
activeArc: _getHighlightedLegend(),
|
|
262
|
+
focusedArcId: focusedArcId || '',
|
|
263
|
+
href: props.href,
|
|
264
|
+
valueInsideDonut: _toLocaleString(valueInsideDonut),
|
|
265
|
+
showLabelsInPercent: props.showLabelsInPercent,
|
|
266
|
+
hideLabels: props.hideLabels
|
|
267
|
+
}))), /*#__PURE__*/ _react.createElement(_ChartPopover.ChartPopover, {
|
|
268
|
+
xCalloutValue: xCalloutValue,
|
|
269
|
+
yCalloutValue: yCalloutValue,
|
|
270
|
+
culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
|
|
271
|
+
clickPosition: clickPosition,
|
|
272
|
+
isPopoverOpen: !props.hideTooltip && isPopoverOpen,
|
|
273
|
+
legend: legend,
|
|
274
|
+
YValue: value,
|
|
275
|
+
color: color,
|
|
276
|
+
isCalloutForStack: false,
|
|
277
|
+
customCallout: {
|
|
278
|
+
customizedCallout: props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps) : undefined,
|
|
279
|
+
customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
|
|
280
|
+
},
|
|
281
|
+
isCartesian: false
|
|
282
|
+
}), !hideLegend && /*#__PURE__*/ _react.createElement("div", {
|
|
283
|
+
ref: (e)=>legendContainer.current = e,
|
|
284
|
+
className: classes.legendContainer
|
|
285
|
+
}, legendBars)) : /*#__PURE__*/ _react.createElement("div", {
|
|
286
|
+
id: _emptyChartId,
|
|
287
|
+
role: 'alert',
|
|
288
|
+
style: {
|
|
289
|
+
opacity: '0'
|
|
290
|
+
},
|
|
291
|
+
"aria-label": 'Graph has no data to display'
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
DonutChart.displayName = 'DonutChart';
|
|
295
|
+
DonutChart.defaultProps = {
|
|
296
|
+
innerRadius: 0,
|
|
297
|
+
hideLabels: true
|
|
298
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["DonutChart.tsx"],"sourcesContent":["/* eslint-disable react/jsx-no-bind */\nimport * as React from 'react';\nimport { Pie } from './Pie/index';\nimport { DonutChartProps } from './DonutChart.types';\nimport { useDonutChartStyles } from './useDonutChartStyles.styles';\nimport { ChartDataPoint } from '../../DonutChart';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport { getColorFromToken, getNextColor } from '../../utilities/index';\nimport { Legend, Legends } from '../../index';\nimport { useId } from '@fluentui/react-utilities';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\n\nconst MIN_LEGEND_CONTAINER_HEIGHT = 40;\n\n// Create a DonutChart variant which uses these default styles and this styled subcomponent.\n/**\n * Donutchart component.\n * {@docCategory DonutChart}\n */\nexport const DonutChart: React.FunctionComponent<DonutChartProps> = React.forwardRef<HTMLDivElement, DonutChartProps>(\n (props, forwardedRef) => {\n const _rootElem = React.useRef<HTMLDivElement | null>(null);\n const _uniqText: string = useId('_Pie_');\n /* eslint-disable @typescript-eslint/no-explicit-any */\n let _calloutAnchorPoint: ChartDataPoint | null;\n let _emptyChartId: string | null;\n const legendContainer = React.useRef<HTMLDivElement | null>(null);\n const prevSize = React.useRef<{ width?: number; height?: number }>({});\n\n const [value, setValue] = React.useState<string | undefined>('');\n const [legend, setLegend] = React.useState<string | undefined>('');\n const [_width, setWidth] = React.useState<number | undefined>(props.width || 200);\n const [_height, setHeight] = React.useState<number | undefined>(props.height || 200);\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [color, setColor] = React.useState<string | undefined>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [focusedArcId, setFocusedArcId] = React.useState<string>('');\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<ChartDataPoint | undefined>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n\n React.useEffect(() => {\n _fitParentContainer();\n }, []);\n\n React.useEffect(() => {\n if (prevSize.current.height !== props.height || prevSize.current.width !== props.width) {\n _fitParentContainer();\n }\n prevSize.current.height = props.height;\n prevSize.current.width = props.width;\n }, [props.width, props.height]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: _rootElem.current,\n }),\n [],\n );\n\n function _elevateToMinimums(data: ChartDataPoint[]) {\n let sumOfData = 0;\n const minPercent = 0.01;\n const elevatedData: ChartDataPoint[] = [];\n data.forEach(item => {\n sumOfData += item.data!;\n });\n data.forEach(item => {\n elevatedData.push(\n minPercent * sumOfData > item.data! && item.data! > 0\n ? {\n ...item,\n data: minPercent * sumOfData,\n yAxisCalloutData:\n item.yAxisCalloutData === undefined ? item.data!.toLocaleString() : item.yAxisCalloutData,\n }\n : item,\n );\n });\n return elevatedData;\n }\n function _createLegends(chartData: ChartDataPoint[]): JSX.Element {\n const legendDataItems = chartData.map((point: ChartDataPoint, index: number) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n action: () => {\n if (selectedLegend === point.legend) {\n setSelectedLegend('');\n } else {\n setSelectedLegend(point.legend!);\n }\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend!);\n },\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n };\n return legend;\n });\n const legends = (\n <Legends\n legends={legendDataItems}\n centerLegends\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n />\n );\n return legends;\n }\n\n function _focusCallback(data: ChartDataPoint, id: string, element: SVGPathElement): void {\n setPopoverOpen(selectedLegend === '' || selectedLegend === data.legend);\n setValue(data.data!.toString());\n setLegend(data.legend);\n setColor(data.color!);\n setXCalloutValue(data.xAxisCalloutData!);\n setYCalloutValue(data.yAxisCalloutData!);\n setFocusedArcId(id);\n setDataPointCalloutProps(data);\n }\n\n function _hoverCallback(data: ChartDataPoint, e: React.MouseEvent<SVGPathElement>): void {\n if (_calloutAnchorPoint !== data) {\n _calloutAnchorPoint = data;\n setPopoverOpen(selectedLegend === '' || selectedLegend === data.legend);\n setValue(data.data!.toString());\n setLegend(data.legend);\n setColor(data.color!);\n setXCalloutValue(data.xAxisCalloutData!);\n setYCalloutValue(data.yAxisCalloutData!);\n setDataPointCalloutProps(data);\n updatePosition(e.clientX, e.clientY);\n }\n }\n function _onBlur(): void {\n setFocusedArcId('');\n }\n\n function _hoverLeave(): void {\n /**/\n }\n\n function _handleChartMouseLeave() {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n }\n\n function _valueInsideDonut(valueInsideDonut: string | number | undefined, data: ChartDataPoint[]) {\n const highlightedLegend = _getHighlightedLegend();\n if (valueInsideDonut !== undefined && (highlightedLegend !== '' || isPopoverOpen)) {\n let legendValue = valueInsideDonut;\n data!.map((point: ChartDataPoint, index: number) => {\n if (point.legend === highlightedLegend || (isPopoverOpen && point.legend === legend)) {\n legendValue = point.yAxisCalloutData ? point.yAxisCalloutData : point.data!;\n }\n return;\n });\n return legendValue;\n } else {\n return valueInsideDonut;\n }\n }\n\n function _toLocaleString(data: string | number | undefined) {\n const localeString = convertToLocaleString(data, props.culture);\n if (!localeString) {\n return data;\n }\n return localeString?.toString();\n }\n\n /**\n * This function returns\n * the selected legend if there is one\n * or the hovered legend if none of the legends is selected.\n * Note: This won't work in case of multiple legends selection.\n */\n function _getHighlightedLegend() {\n return selectedLegend || activeLegend;\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.chartData &&\n props.data.chartData!.filter((d: ChartDataPoint) => d.data! > 0).length > 0\n );\n }\n\n function _addDefaultColors(donutChartDataPoint?: ChartDataPoint[]): ChartDataPoint[] {\n return donutChartDataPoint\n ? donutChartDataPoint.map((item, index) => {\n let defaultColor: string;\n if (typeof item.color === 'undefined') {\n defaultColor = getNextColor(index, 0);\n } else {\n defaultColor = getColorFromToken(item.color);\n }\n return { ...item, defaultColor };\n })\n : [];\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n /**\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.current && getComputedStyle(legendContainer.current);\n legendContainerHeight =\n ((legendContainer.current && legendContainer.current.getBoundingClientRect().height) ||\n MIN_LEGEND_CONTAINER_HEIGHT) +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginTop) || '0') +\n parseFloat((legendContainerComputedStyles && legendContainerComputedStyles.marginBottom) || '0');\n }\n if (props.parentRef || _rootElem.current) {\n const container = props.parentRef ? props.parentRef : _rootElem.current!;\n const currentContainerWidth = container.getBoundingClientRect().width;\n const currentContainerHeight =\n container.getBoundingClientRect().height > legendContainerHeight\n ? container.getBoundingClientRect().height\n : 200;\n const shouldResize =\n _width !== currentContainerWidth || _height !== currentContainerHeight - legendContainerHeight;\n if (shouldResize) {\n setWidth(currentContainerWidth);\n setHeight(currentContainerHeight - legendContainerHeight);\n }\n }\n //});\n }\n\n const { data, hideLegend = false } = props;\n const points = _addDefaultColors(data?.chartData);\n\n const classes = useDonutChartStyles(props);\n\n const legendBars = _createLegends(points);\n const donutMarginHorizontal = props.hideLabels ? 0 : 80;\n const donutMarginVertical = props.hideLabels ? 0 : 40;\n const outerRadius = Math.min(_width! - donutMarginHorizontal, _height! - donutMarginVertical) / 2;\n const chartData = _elevateToMinimums(points.filter((d: ChartDataPoint) => d.data! >= 0));\n const valueInsideDonut = props.innerRadius !== 0 ? _valueInsideDonut(props.valueInsideDonut!, chartData!) : '';\n const focusAttributes = useFocusableGroup();\n return !_isChartEmpty() ? (\n <div\n className={classes.root}\n ref={(rootElem: HTMLDivElement | null) => (_rootElem.current = rootElem)}\n onMouseLeave={_handleChartMouseLeave}\n >\n <div className={classes.chartWrapper} {...focusAttributes}>\n <svg className={classes.chart} aria-label={data?.chartTitle} width={_width} height={_height}>\n <Pie\n width={_width!}\n height={_height!}\n outerRadius={outerRadius}\n innerRadius={props.innerRadius!}\n data={chartData!}\n onFocusCallback={_focusCallback}\n hoverOnCallback={_hoverCallback}\n hoverLeaveCallback={_hoverLeave}\n uniqText={_uniqText}\n onBlurCallback={_onBlur}\n activeArc={_getHighlightedLegend()}\n focusedArcId={focusedArcId || ''}\n href={props.href!}\n valueInsideDonut={_toLocaleString(valueInsideDonut)}\n showLabelsInPercent={props.showLabelsInPercent}\n hideLabels={props.hideLabels}\n />\n </svg>\n </div>\n <ChartPopover\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={!props.hideTooltip && isPopoverOpen}\n legend={legend!}\n YValue={value!}\n color={color}\n isCalloutForStack={false}\n customCallout={{\n customizedCallout: props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps!)\n : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n }}\n isCartesian={false}\n />\n {!hideLegend && (\n <div ref={(e: HTMLDivElement) => (legendContainer.current = e)} className={classes.legendContainer}>\n {legendBars}\n </div>\n )}\n </div>\n ) : (\n <div id={_emptyChartId!} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\n\nDonutChart.displayName = 'DonutChart';\nDonutChart.defaultProps = {\n innerRadius: 0,\n hideLabels: true,\n};\n"],"names":["DonutChart","MIN_LEGEND_CONTAINER_HEIGHT","React","forwardRef","props","forwardedRef","_rootElem","useRef","_uniqText","useId","_calloutAnchorPoint","_emptyChartId","legendContainer","prevSize","value","setValue","useState","legend","setLegend","_width","setWidth","width","_height","setHeight","height","activeLegend","setActiveLegend","color","setColor","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","selectedLegend","setSelectedLegend","focusedArcId","setFocusedArcId","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","useEffect","_fitParentContainer","current","useImperativeHandle","componentRef","chartContainer","_elevateToMinimums","data","sumOfData","minPercent","elevatedData","forEach","item","push","yAxisCalloutData","undefined","toLocaleString","_createLegends","chartData","legendDataItems","map","point","index","title","action","hoverAction","_handleChartMouseLeave","onMouseOutAction","legends","createElement","Legends","centerLegends","overflowText","legendsOverflowText","legendProps","_focusCallback","id","element","toString","xAxisCalloutData","_hoverCallback","e","updatePosition","clientX","clientY","_onBlur","_hoverLeave","_valueInsideDonut","valueInsideDonut","highlightedLegend","_getHighlightedLegend","legendValue","_toLocaleString","localeString","convertToLocaleString","culture","_isChartEmpty","filter","d","length","_addDefaultColors","donutChartDataPoint","defaultColor","getNextColor","getColorFromToken","newX","newY","threshold","distance","Math","sqrt","pow","legendContainerHeight","hideLegend","legendContainerComputedStyles","getComputedStyle","getBoundingClientRect","parseFloat","marginTop","marginBottom","parentRef","container","currentContainerWidth","currentContainerHeight","shouldResize","points","classes","useDonutChartStyles","legendBars","donutMarginHorizontal","hideLabels","donutMarginVertical","outerRadius","min","innerRadius","focusAttributes","useFocusableGroup","div","className","root","ref","rootElem","onMouseLeave","chartWrapper","svg","chart","aria-label","chartTitle","Pie","onFocusCallback","hoverOnCallback","hoverLeaveCallback","uniqText","onBlurCallback","activeArc","href","showLabelsInPercent","ChartPopover","hideTooltip","YValue","isCalloutForStack","customCallout","customizedCallout","onRenderCalloutPerDataPoint","customCalloutProps","calloutPropsPerDataPoint","isCartesian","role","style","opacity","displayName","defaultProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,oCAAoC;;;;+BAoBvBA;;;eAAAA;;;;iEAnBU;uBACH;2CAEgB;4BAEE;wBACU;wBAChB;gCACV;8BACY;8BACL;AAE7B,MAAMC,8BAA8B;AAO7B,MAAMD,aAAAA,WAAAA,GAAuDE,OAAMC,UAAU,CAClF,CAACC,OAAOC;IACN,MAAMC,YAAYJ,OAAMK,MAAM,CAAwB;IACtD,MAAMC,YAAoBC,IAAAA,qBAAAA,EAAM;IAChC,qDAAqD,GACrD,IAAIC;IACJ,IAAIC;IACJ,MAAMC,kBAAkBV,OAAMK,MAAM,CAAwB;IAC5D,MAAMM,WAAWX,OAAMK,MAAM,CAAsC,CAAC;IAEpE,MAAM,CAACO,OAAOC,SAAS,GAAGb,OAAMc,QAAQ,CAAqB;IAC7D,MAAM,CAACC,QAAQC,UAAU,GAAGhB,OAAMc,QAAQ,CAAqB;IAC/D,MAAM,CAACG,QAAQC,SAAS,GAAGlB,OAAMc,QAAQ,CAAqBZ,MAAMiB,KAAK,IAAI;IAC7E,MAAM,CAACC,SAASC,UAAU,GAAGrB,OAAMc,QAAQ,CAAqBZ,MAAMoB,MAAM,IAAI;IAChF,MAAM,CAACC,cAAcC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AChDpK,MAAMoK,2BAA2B,CAACnI,yBAClCuB;YACJ6G,oBAAoBrK,MAAMsK,wBAAwB,GAC9CtK,MAAMsK,wBAAwB,CAACrI,yBAC/BuB;QACN;QACA+G,aAAa;QAEd,CAACrD,cAAAA,WAAAA,GACApH,OAAAwE,aAAA,CAACoE,OAAAA;QAAIG,KAAK,CAAC3D,IAAuB1E,gBAAgBmC,OAAO,GAAGuC;QAAIyD,WAAWZ,QAAQvH,eAAe;OAC/FyH,eAAAA,WAAAA,GAKPnI,OAAAwE,aAAA,CAACoE,OAAAA;QAAI7D,IAAItE;QAAgBiK,MAAM;QAASC,OAAO;YAAEC,SAAS;QAAI;QAAGvB,cAAY;;AAEjF;AAGFvJ,WAAW+K,WAAW,GAAG;AACzB/K,WAAWgL,YAAY,GAAG;IACxBrC,aAAa;IACbJ,YAAY;AACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["DonutChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { CartesianChartStyleProps } from '../CommonComponents/index';\nimport { ChartProps, ChartDataPoint, Chart } from './index';\nimport { ChartPopoverProps } from '../CommonComponents/ChartPopover.types';\nimport { LegendsProps } from '../Legends/index';\n\n/**\n * Donut Chart properties.\n * {@docCategory DonutChart}\n */\nexport interface DonutChartProps {\n /**\n * Data to render in the chart.\n */\n data?: ChartProps;\n\n /**\n * inner radius for donut size\n */\n innerRadius?: number;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: DonutChartStyles;\n\n /**\n * props for inside donut value\n */\n valueInsideDonut?: string | number;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: (dataPointCalloutProps: ChartDataPoint) => JSX.Element | undefined;\n\n /**\n * Define a custom callout props override\n */\n calloutPropsPerDataPoint?: (dataPointCalloutProps: ChartDataPoint) => ChartPopoverProps;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop to show the arc labels in percentage format\n * @default false\n */\n showLabelsInPercent?: boolean;\n\n /**\n * Prop to hide the arc labels\n * @default true\n */\n hideLabels?: boolean;\n\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\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/**\n * Donut Chart style properties\n * {@docCategory DonutChart}\n */\nexport interface DonutChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Donut Chart styles\n * {@docCategory DonutChart}\n */\nexport interface DonutChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the chart.\n */\n chart?: string;\n /**\n * Style for the legend container.\n */\n legendContainer: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable react/jsx-no-bind */ /* eslint-disable @typescript-eslint/no-explicit-any */ "use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Pie", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Pie;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _d3shape = require("d3-shape");
|
|
14
|
+
const _index = require("../Arc/index");
|
|
15
|
+
const _usePieStylesstyles = require("./usePieStyles.styles");
|
|
16
|
+
const _index1 = require("../../../utilities/index");
|
|
17
|
+
const TEXT_PADDING = 5;
|
|
18
|
+
const Pie = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
19
|
+
_react.useEffect(()=>{
|
|
20
|
+
(0, _index1.wrapTextInsideDonut)(classes.insideDonutString, props.innerRadius * 2 - TEXT_PADDING);
|
|
21
|
+
}, []);
|
|
22
|
+
let _totalValue;
|
|
23
|
+
const classes = (0, _usePieStylesstyles.usePieStyles)(props);
|
|
24
|
+
const pieForFocusRing = (0, _d3shape.pie)().sort(null) // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
.value((d)=>d.data).padAngle(0);
|
|
26
|
+
function _focusCallback(data, id, e) {
|
|
27
|
+
props.onFocusCallback(data, id, e);
|
|
28
|
+
}
|
|
29
|
+
function _hoverCallback(data, e) {
|
|
30
|
+
props.hoverOnCallback(data, e);
|
|
31
|
+
}
|
|
32
|
+
function _computeTotalValue() {
|
|
33
|
+
let totalValue = 0;
|
|
34
|
+
props.data.forEach((arc)=>{
|
|
35
|
+
totalValue += arc.data;
|
|
36
|
+
});
|
|
37
|
+
return totalValue;
|
|
38
|
+
}
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
function arcGenerator(d, i, focusData, href) {
|
|
41
|
+
const color = d && d.data && d.data.color;
|
|
42
|
+
return /*#__PURE__*/ _react.createElement(_index.Arc, {
|
|
43
|
+
key: i,
|
|
44
|
+
data: d,
|
|
45
|
+
focusData: focusData,
|
|
46
|
+
innerRadius: props.innerRadius,
|
|
47
|
+
outerRadius: props.outerRadius,
|
|
48
|
+
color: color,
|
|
49
|
+
onFocusCallback: _focusCallback,
|
|
50
|
+
hoverOnCallback: _hoverCallback,
|
|
51
|
+
onBlurCallback: props.onBlurCallback,
|
|
52
|
+
hoverLeaveCallback: props.hoverLeaveCallback,
|
|
53
|
+
uniqText: props.uniqText,
|
|
54
|
+
activeArc: props.activeArc,
|
|
55
|
+
href: href,
|
|
56
|
+
calloutId: props.calloutId,
|
|
57
|
+
valueInsideDonut: props.valueInsideDonut,
|
|
58
|
+
focusedArcId: props.focusedArcId,
|
|
59
|
+
showLabelsInPercent: props.showLabelsInPercent,
|
|
60
|
+
totalValue: _totalValue,
|
|
61
|
+
hideLabels: props.hideLabels
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const { data } = props;
|
|
65
|
+
const focusData = pieForFocusRing(data.map((d)=>d.data));
|
|
66
|
+
const piechart = (0, _d3shape.pie)().sort(null) // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
+
.value((d)=>d.data).padAngle(0.02)(data);
|
|
68
|
+
const translate = `translate(${props.width / 2}, ${props.height / 2})`;
|
|
69
|
+
_totalValue = _computeTotalValue();
|
|
70
|
+
return /*#__PURE__*/ _react.createElement("g", {
|
|
71
|
+
transform: translate
|
|
72
|
+
}, piechart.map((d, i)=>arcGenerator(d, i, focusData[i], props.href)), props.valueInsideDonut && /*#__PURE__*/ _react.createElement("text", {
|
|
73
|
+
y: 5,
|
|
74
|
+
textAnchor: "middle",
|
|
75
|
+
dominantBaseline: "middle",
|
|
76
|
+
className: classes.insideDonutString
|
|
77
|
+
}, props.valueInsideDonut));
|
|
78
|
+
});
|
|
79
|
+
Pie.displayName = 'Pie';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Pie.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable react/jsx-no-bind */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { pie as d3Pie } from 'd3-shape';\nimport { PieProps } from './index';\nimport { Arc } from '../Arc/index';\nimport { ChartDataPoint } from '../index';\nimport { usePieStyles } from './usePieStyles.styles';\nimport { wrapTextInsideDonut } from '../../../utilities/index';\nconst TEXT_PADDING: number = 5;\n\n// Create a Pie within Donut Chart variant which uses these default styles and this styled subcomponent.\n/**\n * Pie component within Donut Chart.\n * {@docCategory PieDonutChart}\n */\nexport const Pie: React.FunctionComponent<PieProps> = React.forwardRef<HTMLDivElement, PieProps>(\n (props, forwardedRef) => {\n React.useEffect(() => {\n wrapTextInsideDonut(classes.insideDonutString, props.innerRadius! * 2 - TEXT_PADDING);\n }, []);\n\n let _totalValue: number;\n const classes = usePieStyles(props);\n const pieForFocusRing = d3Pie()\n .sort(null)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .value((d: any) => d.data)\n .padAngle(0);\n\n function _focusCallback(data: ChartDataPoint, id: string, e: SVGPathElement): void {\n props.onFocusCallback!(data, id, e);\n }\n\n function _hoverCallback(data: ChartDataPoint, e: React.MouseEvent<SVGPathElement>): void {\n props.hoverOnCallback!(data, e);\n }\n\n function _computeTotalValue() {\n let totalValue = 0;\n props.data.forEach((arc: ChartDataPoint) => {\n totalValue += arc.data!;\n });\n return totalValue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function arcGenerator(d: any, i: number, focusData: any, href?: string): JSX.Element {\n const color = d && d.data && d.data.color;\n return (\n <Arc\n key={i}\n data={d}\n focusData={focusData}\n innerRadius={props.innerRadius}\n outerRadius={props.outerRadius}\n color={color!}\n onFocusCallback={_focusCallback}\n hoverOnCallback={_hoverCallback}\n onBlurCallback={props.onBlurCallback}\n hoverLeaveCallback={props.hoverLeaveCallback}\n uniqText={props.uniqText}\n activeArc={props.activeArc}\n href={href}\n calloutId={props.calloutId}\n valueInsideDonut={props.valueInsideDonut}\n focusedArcId={props.focusedArcId}\n showLabelsInPercent={props.showLabelsInPercent}\n totalValue={_totalValue}\n hideLabels={props.hideLabels}\n />\n );\n }\n\n const { data } = props;\n const focusData = pieForFocusRing(data.map(d => d.data!));\n\n const piechart = d3Pie<ChartDataPoint>()\n .sort(null)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .value((d: any) => d.data)\n .padAngle(0.02)(data);\n const translate = `translate(${props.width / 2}, ${props.height / 2})`;\n\n _totalValue = _computeTotalValue();\n\n return (\n <g transform={translate}>\n {piechart.map((d: any, i: number) => arcGenerator(d, i, focusData[i], props.href))}\n {props.valueInsideDonut && (\n <text y={5} textAnchor=\"middle\" dominantBaseline=\"middle\" className={classes.insideDonutString}>\n {props.valueInsideDonut}\n </text>\n )}\n </g>\n );\n },\n);\nPie.displayName = 'Pie';\n"],"names":["Pie","TEXT_PADDING","React","forwardRef","props","forwardedRef","useEffect","wrapTextInsideDonut","classes","insideDonutString","innerRadius","_totalValue","usePieStyles","pieForFocusRing","d3Pie","sort","value","d","data","padAngle","_focusCallback","id","e","onFocusCallback","_hoverCallback","hoverOnCallback","_computeTotalValue","totalValue","forEach","arc","arcGenerator","i","focusData","href","color","createElement","Arc","key","outerRadius","onBlurCallback","hoverLeaveCallback","uniqText","activeArc","calloutId","valueInsideDonut","focusedArcId","showLabelsInPercent","hideLabels","map","piechart","translate","width","height","g","transform","text","y","textAnchor","dominantBaseline","className","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,8CAA8C,GAC9C,oCAAoC,GACpC,qDAAqD;;;;+BAexCA;;;eAAAA;;;;iEAdU;yBACM;uBAET;oCAES;wBACO;AACpC,MAAMC,eAAuB;A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uC,SAAS;YAC1BC,kBAAkBxC,MAAMwC,gBAAgB;YACxCC,cAAczC,MAAMyC,YAAY;YAChCC,qBAAqB1C,MAAM0C,mBAAmB;YAC9CnB,YAAYhB;YACZoC,YAAY3C,MAAM2C,UAAU;;IAGlC;IAEA,MAAM,EAAE7B,IAAI,EAAE,GAAGd;IACjB,MAAM4B,YAAYnB,gBAAgBK,KAAK8B,GAAG,CAAC/B,CAAAA,IAAKA,EAAEC,IAAI;IAEtD,MAAM+B,WAAWnC,IAAAA,YAAAA,IACdC,IAAI,CAAC,MACN,8DAA8D;KAC7DC,KAAK,CAAC,CAACC,IAAWA,EAAEC,IAAI,EACxBC,QAAQ,CAAC,MAAMD;IAClB,MAAMgC,YAAY,CAAC,UAAU,EAAE9C,MAAM+C,KAAK,GAAG,EAAE,EAAE,EAAE/C,MAAMgD,MAAM,GAAG,EAAE,CAAC,CAAC;IAEtEzC,cAAce;IAEd,OAAA,WAAA,GACExB,OAAAiC,aAAA,CAACkB,KAAAA;QAAEC,WAAWJ;OACXD,SAASD,GAAG,CAAC,CAAC/B,GAAQc,IAAcD,aAAab,GAAGc,GAAGC,SAAS,CAACD,EAAE,EAAE3B,MAAM6B,IAAI,IAC/E7B,MAAMwC,gBAAgB,IAAA,WAAA,GACrB1C,OAAAiC,aAAA,CAACoB,QAAAA;QAAKC,GAAG;QAAGC,YAAW;QAASC,kBAAiB;QAASC,WAAWnD,QAAQC,iBAAiB;OAC3FL,MAAMwC,gBAAgB;AAKjC;AAEF5C,IAAI4D,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Pie.types.ts"],"sourcesContent":["import { ChartDataPoint } from '../index';\n\nexport interface PieProps {\n /**\n * Width of the Pie.\n */\n width: number;\n /**\n * Height of the Pie.\n */\n height: number;\n /**\n * outerRadius of the Pie.\n */\n outerRadius: number;\n /**\n * innerRadius of the Pie.\n */\n innerRadius: number;\n /**\n * Data to render in the Pie.\n */\n data: ChartDataPoint[];\n /**\n * shape for pie.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n pie?: any;\n\n pieForFocusRing?: any;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverOnCallback?: Function;\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n onFocusCallback?: Function;\n /**\n * Defines the function that is executed upon hovering Leave the legend\n */\n onBlurCallback?: Function;\n /**\n * Defines the function that is executed upon hovering Leave the legend\n */\n hoverLeaveCallback?: Function;\n /**\n * Uniq string for chart\n */\n uniqText?: string;\n /**\n * Active Arc for chart\n */\n activeArc?: string;\n\n /**\n * string for callout id\n */\n calloutId?: string;\n\n /**\n * internal prop for href\n */\n href?: string;\n\n /**\n * props for inside donut value\n */\n valueInsideDonut?: string | number;\n\n /**\n * id of the focused arc\n */\n focusedArcId?: string;\n\n /**\n * Prop to show the arc labels in percentage format\n */\n showLabelsInPercent?: boolean;\n\n /**\n * Prop to hide the arc labels\n */\n hideLabels?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: PieStyles;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n}\n\nexport interface PieStyles {\n /**\n * Style set for the card header component root\n */\n root: string;\n\n /**\n * Style set for the inside donut string\n */\n insideDonutString: string;\n}\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Pie';\nexport * from './Pie.types';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
donutPieClassNames: function() {
|
|
13
|
+
return donutPieClassNames;
|
|
14
|
+
},
|
|
15
|
+
usePieStyles: function() {
|
|
16
|
+
return usePieStyles;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const donutPieClassNames = {
|
|
21
|
+
root: 'fui-donut-pie__root',
|
|
22
|
+
insideDonutString: 'fui-donut-pie__insideDonutString'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Base Styles
|
|
26
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
27
|
+
root: {},
|
|
28
|
+
insideDonutString: {
|
|
29
|
+
Bahqtrf: "fk6fouc",
|
|
30
|
+
Be2twd7: "fojgt09",
|
|
31
|
+
Bhrd7zp: "fl43uef",
|
|
32
|
+
Bg96gwp: "fcen8rp",
|
|
33
|
+
Bkfmm31: "fhuob2q",
|
|
34
|
+
Bcjfw9x: "fy323tu"
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
d: [
|
|
38
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
39
|
+
".fojgt09{font-size:var(--fontSizeHero700);}",
|
|
40
|
+
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
41
|
+
".fcen8rp{line-height:var(--lineHeightHero700);}",
|
|
42
|
+
".fhuob2q{fill:var(--colorNeutralForeground1);}"
|
|
43
|
+
],
|
|
44
|
+
m: [
|
|
45
|
+
[
|
|
46
|
+
"@media screen and (-ms-high-contrast: white-on-black),screen and (forced-colors: active) and (prefers-color-scheme: dark){.fy323tu{fill:rgb(179, 179, 179);}}",
|
|
47
|
+
{
|
|
48
|
+
m: "screen and (-ms-high-contrast: white-on-black), screen and (forced-colors: active) and (prefers-color-scheme: dark)"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
const usePieStyles = (props)=>{
|
|
54
|
+
var _props_styles, _props_styles1;
|
|
55
|
+
const { className } = props;
|
|
56
|
+
const baseStyles = useStyles();
|
|
57
|
+
return {
|
|
58
|
+
root: (0, _react.mergeClasses)(donutPieClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
|
|
59
|
+
insideDonutString: (0, _react.mergeClasses)(donutPieClassNames.insideDonutString, baseStyles.insideDonutString, className, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.insideDonutString)
|
|
60
|
+
};
|
|
61
|
+
}; //# sourceMappingURL=usePieStyles.styles.js.map
|