@fluentui/react-charts 1.1.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +181 -11
- package/LICENSE +11 -17
- package/README.md +174 -23
- package/dist/index.d.ts +2143 -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/HorizontalBarChart.js +1 -0
- package/lib/HorizontalBarChart.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/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/components/CommonComponents/CartesianChart.js +462 -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 +150 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchema.js +7 -0
- package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +400 -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/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/Legends/Legends.js +302 -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 +1026 -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/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 +849 -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/index.js +12 -8
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +3 -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 -2
- package/lib/types/index.js.map +1 -1
- 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 +138 -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 +249 -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/test-data.js +276 -0
- package/lib/utilities/test-data.js.map +1 -0
- package/lib/utilities/utilities.js +1215 -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/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/HorizontalBarChart.js +6 -0
- package/lib-commonjs/HorizontalBarChart.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/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/components/CommonComponents/CartesianChart.js +469 -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 +158 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +10 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +445 -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/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/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 +1032 -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/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 +851 -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/index.js +17 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/types/DataPoint.js +6 -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 +148 -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 +270 -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/test-data.js +324 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +1184 -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 +80 -71
- package/CHANGELOG.json +0 -50
- package/lib/chart/chart-legend.d.ts +0 -6
- package/lib/chart/chart-legend.js +0 -446
- package/lib/chart/chart-legend.js.map +0 -1
- package/lib/chart/chart-render.d.ts +0 -3
- package/lib/chart/chart-render.js +0 -50
- package/lib/chart/chart-render.js.map +0 -1
- package/lib/chart/chart.d.ts +0 -3
- package/lib/chart/chart.js +0 -11
- package/lib/chart/chart.js.map +0 -1
- package/lib/chart/index.d.ts +0 -1
- package/lib/chart/index.js +0 -2
- package/lib/chart/index.js.map +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/lib/builder.d.ts +0 -82
- package/lib/lib/builder.js +0 -341
- package/lib/lib/builder.js.map +0 -1
- package/lib/lib/datasets.d.ts +0 -99
- package/lib/lib/datasets.js +0 -240
- package/lib/lib/datasets.js.map +0 -1
- package/lib/lib/patterns.d.ts +0 -43
- package/lib/lib/patterns.js +0 -433
- package/lib/lib/patterns.js.map +0 -1
- package/lib/lib/plugins.d.ts +0 -11
- package/lib/lib/plugins.js +0 -403
- package/lib/lib/plugins.js.map +0 -1
- package/lib/lib/settings.d.ts +0 -11
- package/lib/lib/settings.js +0 -342
- package/lib/lib/settings.js.map +0 -1
- package/lib/lib/storybook.d.ts +0 -11
- package/lib/lib/storybook.js +0 -13
- package/lib/lib/storybook.js.map +0 -1
- package/lib/lib/utils.d.ts +0 -34
- package/lib/lib/utils.js +0 -253
- package/lib/lib/utils.js.map +0 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/types.d.ts +0 -94
- package/lib/types/types.js +0 -41
- package/lib/types/types.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useCartesianChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { HighContrastSelectorBlack, HighContrastSelector } from '../../utilities/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useRtl } from '../../utilities/utilities';\n/**\n * @internal\n */ export const cartesianchartClassNames = {\n root: 'fui-cart__root',\n chartWrapper: 'fui-cart__chartWrapper',\n axisTitle: 'fui-cart__axisTitle',\n xAxis: 'fui-cart__xAxis',\n yAxis: 'fui-cart__yAxis',\n opacityChangeOnHover: 'fui-cart__opacityChangeOnHover',\n legendContainer: 'fui-cart__legendContainer',\n calloutContentRoot: 'fui-cart__calloutContentRoot',\n calloutDateTimeContainer: 'fui-cart__calloutDateTimeContainer',\n calloutContentX: 'fui-cart__calloutContentX',\n calloutBlockContainer: 'fui-cart__calloutBlockContainer',\n calloutBlockContainertoDrawShapefalse: 'fui-cart__calloutBlockContainertoDrawShapefalse',\n calloutBlockContainertoDrawShapetrue: 'fui-cart__calloutBlockContainertoDrawShapetrue',\n shapeStyles: 'fui-cart__shapeStyles',\n calloutlegendText: 'fui-cart__calloutlegendText',\n calloutContentY: 'fui-cart__calloutContentY',\n descriptionMessage: 'fui-cart__descriptionMessage',\n hover: 'fui-cart__hover',\n calloutInfoContainer: 'fui-cart__calloutInfoContainer',\n tooltip: 'fui-cart__tooltip',\n chartTitle: 'fui-cart__chartTitle'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden'\n },\n chartWrapper: {\n overflow: 'auto'\n },\n axisTitle: {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1\n },\n xAxis: {\n '& text': {\n fill: tokens.colorNeutralForeground1,\n ...typographyStyles.caption2Strong,\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n forcedColorAdjust: 'none'\n }\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n width: '1px',\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n forcedColorAdjust: 'none'\n }\n },\n '& path': {\n display: 'none'\n }\n },\n yAxis: {\n '& text': {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelectorBlack]: {\n fill: 'rgb(179, 179, 179)',\n forcedColorAdjust: 'none'\n }\n },\n '& line': {\n opacity: 0.2,\n stroke: tokens.colorNeutralForeground1,\n [HighContrastSelectorBlack]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n forcedColorAdjust: 'none'\n }\n },\n '& path': {\n display: 'none'\n }\n },\n rtl: {\n '& g': {\n textAnchor: 'end'\n }\n },\n ltr: {},\n opacityChangeOnHover: {\n opacity: '0.1',\n cursor: 'default'\n },\n legendContainer: {\n marginTop: tokens.spacingVerticalS,\n marginLeft: tokens.spacingHorizontalXL\n },\n calloutContentRoot: {\n display: 'grid',\n overflow: 'hidden',\n ...shorthands.padding('11px 16px 10px 16px'),\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundBlendMode: 'normal, luminosity'\n },\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between'\n },\n calloutContentX: {\n ...typographyStyles.caption1,\n opacity: '0.8',\n color: tokens.colorNeutralForeground2\n },\n calloutBlockContainer: {\n ...typographyStyles.body2,\n marginTop: '13px',\n color: tokens.colorNeutralForeground2\n },\n calloutBlockContainertoDrawShapefalse: {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none'\n },\n ...shorthands.borderLeft('4px solid'),\n paddingLeft: tokens.spacingHorizontalS\n },\n calloutBlockContainertoDrawShapetrue: {\n display: 'flex'\n },\n shapeStyles: {\n marginRight: tokens.spacingHorizontalS\n },\n calloutLegendText: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground2,\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n forcedColorAdjust: 'none'\n }\n },\n calloutContentY: {\n ...typographyStyles.subtitle2Stronger,\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)',\n forcedColorAdjust: 'none'\n }\n },\n descriptionMessage: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground2,\n marginTop: tokens.spacingVerticalMNudge,\n paddingTop: tokens.spacingVerticalMNudge,\n ...shorthands.borderTop(`1px solid ${tokens.colorNeutralStroke2}`)\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useCartesianChartStyles = (props)=>{\n const _useRtl = useRtl();\n const baseStyles = useStyles();\n return {\n root: mergeClasses(cartesianchartClassNames.root, baseStyles.root /*props.styles?.root*/ ),\n chartWrapper: mergeClasses(cartesianchartClassNames.chartWrapper, baseStyles.chartWrapper /*props.styles?.chartWrapper*/ ),\n axisTitle: mergeClasses(cartesianchartClassNames.axisTitle, baseStyles.axisTitle /*props.styles?.axisTitle*/ ),\n xAxis: mergeClasses(cartesianchartClassNames.xAxis, baseStyles.xAxis /*props.styles?.xAxis*/ ),\n yAxis: mergeClasses(cartesianchartClassNames.yAxis, baseStyles.yAxis, _useRtl ? baseStyles.rtl : baseStyles.ltr /*props.styles?.yAxis*/ ),\n opacityChangeOnHover: mergeClasses(cartesianchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n legendContainer: mergeClasses(cartesianchartClassNames.legendContainer, baseStyles.legendContainer /*props.styles?.legendContainer*/ ),\n calloutContentRoot: mergeClasses(cartesianchartClassNames.calloutContentRoot, baseStyles.calloutContentRoot /*props.styles?. calloutContentRoot*/ ),\n calloutDateTimeContainer: mergeClasses(cartesianchartClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer /*props.styles?.calloutDateTimeContainer*/ ),\n calloutContentX: mergeClasses(cartesianchartClassNames.calloutContentX, baseStyles.calloutContentX /*props.styles?.calloutContentX*/ ),\n calloutBlockContainer: mergeClasses(cartesianchartClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer /*props.styles?.calloutBlockContainer*/ ),\n calloutBlockContainertoDrawShapefalse: mergeClasses(cartesianchartClassNames.calloutBlockContainertoDrawShapefalse, baseStyles.calloutBlockContainertoDrawShapefalse /*props.styles?.calloutBlockContainertoDrawShapefalse*/ ),\n calloutBlockContainertoDrawShapetrue: mergeClasses(cartesianchartClassNames.calloutBlockContainertoDrawShapetrue, baseStyles.calloutBlockContainertoDrawShapetrue /*props.styles?.calloutBlockContainertoDrawShapetrue*/ ),\n shapeStyles: mergeClasses(cartesianchartClassNames.shapeStyles, baseStyles.shapeStyles /*props.styles?.shapeStyles*/ ),\n calloutlegendText: mergeClasses(cartesianchartClassNames.calloutlegendText, baseStyles.calloutLegendText /*props.styles?.calloutlegendText*/ ),\n calloutContentY: mergeClasses(cartesianchartClassNames.calloutContentY, baseStyles.calloutContentY /*props.styles?.calloutContentY*/ ),\n descriptionMessage: mergeClasses(cartesianchartClassNames.descriptionMessage, baseStyles.descriptionMessage /*props.styles?. descriptionMessage*/ )\n };\n};\n"],"names":["cartesianchartClassNames","useCartesianChartStyles","root","chartWrapper","axisTitle","xAxis","yAxis","opacityChangeOnHover","legendContainer","calloutContentRoot","calloutDateTimeContainer","calloutContentX","calloutBlockContainer","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","shapeStyles","calloutlegendText","calloutContentY","descriptionMessage","hover","calloutInfoContainer","tooltip","chartTitle","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","a9b677","Bqenvij","Beiy3e4","B68tc82","Bmxbyg5","Bpg54ce","B80ckks","fsow6f","sj55zd","Bkfmm31","Bifops1","lr70ht","D01gh","vxuu72","lclgl4","Dzfv0s","s17mou","jxu3ei","B3i31d3","Bhcy8il","t7r2jy","Bpf2t2a","J19x1g","se2xxg","rtl","Bkw34lo","ltr","abs64n","Bceei9c","B6of3ja","Frg6f3","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","jy2i9i","Brf1p80","B93v9kj","ibv6hh","t21cq0","calloutLegendText","Bd6j3yi","hbub2c","B4j52fo","d","p","m","props","_useRtl","useRtl","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAW,CAAC,2BAAA;QACvFC,mBAAmBkE,IAAAA,mBAAY,EAAClF,yBAAyBgB,iBAAiB,EAAEiE,WAAWV,iBAAiB,CAAC,iCAAA;QACzGtD,iBAAiBiE,IAAAA,mBAAY,EAAClF,yBAAyBiB,eAAe,EAAEgE,WAAWhE,eAAe,CAAC,+BAAA;QACnGC,oBAAoBgE,IAAAA,mBAAY,EAAClF,yBAAyBkB,kBAAkB,EAAE+D,WAAW/D,kBAAkB,CAAC,mCAAA;IAChH;AACJ"}
|
|
@@ -0,0 +1,261 @@
|
|
|
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
|
+
popoverClassNames: function() {
|
|
13
|
+
return popoverClassNames;
|
|
14
|
+
},
|
|
15
|
+
usePopoverStyles_unstable: function() {
|
|
16
|
+
return usePopoverStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const popoverClassNames = {
|
|
21
|
+
calloutContentRoot: 'fui-cart__calloutContentRoot',
|
|
22
|
+
calloutDateTimeContainer: 'fui-cart__calloutDateTimeContainer',
|
|
23
|
+
calloutContentX: 'fui-cart__calloutContentX',
|
|
24
|
+
calloutBlockContainer: 'fui-cart__calloutBlockContainer',
|
|
25
|
+
calloutBlockContainertoDrawShapefalse: 'fui-cart__calloutBlockContainertoDrawShapefalse',
|
|
26
|
+
calloutBlockContainertoDrawShapetrue: 'fui-cart__calloutBlockContainertoDrawShapetrue',
|
|
27
|
+
shapeStyles: 'fui-cart__shapeStyles',
|
|
28
|
+
calloutlegendText: 'fui-cart__calloutlegendText',
|
|
29
|
+
calloutContentY: 'fui-cart__calloutContentY',
|
|
30
|
+
descriptionMessage: 'fui-cart__descriptionMessage',
|
|
31
|
+
ratio: 'fui-cart__ratio',
|
|
32
|
+
numerator: 'fui-cart__numerator',
|
|
33
|
+
denominator: 'fui-cart__denominator',
|
|
34
|
+
calloutInfoContainer: 'fui-cart__calloutInfoContainer',
|
|
35
|
+
calloutContainer: 'fui-cart__calloutContainer'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Base Styles
|
|
39
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
40
|
+
calloutContentRoot: {
|
|
41
|
+
mc9l5x: "f1bxpd7w",
|
|
42
|
+
B68tc82: 0,
|
|
43
|
+
Bmxbyg5: 0,
|
|
44
|
+
Bpg54ce: "f1a3p1vp",
|
|
45
|
+
z8tnut: "f1dvrhzg",
|
|
46
|
+
z189sj: [
|
|
47
|
+
"fjnv7mu",
|
|
48
|
+
"fae8789"
|
|
49
|
+
],
|
|
50
|
+
Byoj8tv: "f1av7aef",
|
|
51
|
+
uwmqm3: [
|
|
52
|
+
"fae8789",
|
|
53
|
+
"fjnv7mu"
|
|
54
|
+
],
|
|
55
|
+
De3pzq: "fxugw4r",
|
|
56
|
+
jy2i9i: "fronft5"
|
|
57
|
+
},
|
|
58
|
+
calloutDateTimeContainer: {
|
|
59
|
+
mc9l5x: "f22iagw",
|
|
60
|
+
Beiy3e4: "f1063pyq",
|
|
61
|
+
Brf1p80: "f1869bpl"
|
|
62
|
+
},
|
|
63
|
+
calloutContentX: {
|
|
64
|
+
Bahqtrf: "fk6fouc",
|
|
65
|
+
Be2twd7: "fy9rknc",
|
|
66
|
+
Bhrd7zp: "figsok6",
|
|
67
|
+
Bg96gwp: "fwrc4pm",
|
|
68
|
+
abs64n: "fp25eh",
|
|
69
|
+
sj55zd: "fkfq4zb"
|
|
70
|
+
},
|
|
71
|
+
calloutBlockContainer: {
|
|
72
|
+
sj55zd: "fkfq4zb"
|
|
73
|
+
},
|
|
74
|
+
calloutBlockContainerCartesian: {
|
|
75
|
+
Bahqtrf: "fk6fouc",
|
|
76
|
+
Be2twd7: "fy9rknc",
|
|
77
|
+
Bhrd7zp: "figsok6",
|
|
78
|
+
Bg96gwp: "fwrc4pm",
|
|
79
|
+
B6of3ja: "f7jvbu2"
|
|
80
|
+
},
|
|
81
|
+
calloutBlockContainerNonCartesian: {
|
|
82
|
+
Be2twd7: "fojgt09",
|
|
83
|
+
Bg96gwp: "f82itaf",
|
|
84
|
+
bo4z9n: "fg7a56h"
|
|
85
|
+
},
|
|
86
|
+
calloutBlockContainertoDrawShapefalse: {
|
|
87
|
+
bo4z9n: "fg7a56h",
|
|
88
|
+
uwmqm3: [
|
|
89
|
+
"f1f5gg8d",
|
|
90
|
+
"f1vdfbxk"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
calloutBlockContainertoDrawShapetrue: {
|
|
94
|
+
mc9l5x: "fwk3njj"
|
|
95
|
+
},
|
|
96
|
+
shapeStyles: {
|
|
97
|
+
t21cq0: [
|
|
98
|
+
"f1vcna3q",
|
|
99
|
+
"foyynoy"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
calloutLegendText: {
|
|
103
|
+
Bahqtrf: "fk6fouc",
|
|
104
|
+
Be2twd7: "fy9rknc",
|
|
105
|
+
Bhrd7zp: "figsok6",
|
|
106
|
+
Bg96gwp: "fwrc4pm",
|
|
107
|
+
sj55zd: "fkfq4zb",
|
|
108
|
+
B1cpy0k: "fig6os7"
|
|
109
|
+
},
|
|
110
|
+
calloutContentY: {
|
|
111
|
+
B1cpy0k: "fig6os7"
|
|
112
|
+
},
|
|
113
|
+
calloutContentYCartesian: {
|
|
114
|
+
Bahqtrf: "fk6fouc",
|
|
115
|
+
Be2twd7: "fod5ikn",
|
|
116
|
+
Bhrd7zp: "flh3ekv",
|
|
117
|
+
Bg96gwp: "faaz57k"
|
|
118
|
+
},
|
|
119
|
+
calloutContentYNonCartesian: {
|
|
120
|
+
Bahqtrf: "fk6fouc",
|
|
121
|
+
Be2twd7: "fojgt09",
|
|
122
|
+
Bhrd7zp: "fl43uef",
|
|
123
|
+
Bg96gwp: "fcen8rp"
|
|
124
|
+
},
|
|
125
|
+
descriptionMessage: {
|
|
126
|
+
Bahqtrf: "fk6fouc",
|
|
127
|
+
Be2twd7: "fy9rknc",
|
|
128
|
+
Bhrd7zp: "figsok6",
|
|
129
|
+
Bg96gwp: "fwrc4pm",
|
|
130
|
+
sj55zd: "fkfq4zb",
|
|
131
|
+
B6of3ja: "f1gaxbfw",
|
|
132
|
+
z8tnut: "f1ngh7ph",
|
|
133
|
+
B4j52fo: "f1pgliyk"
|
|
134
|
+
},
|
|
135
|
+
ratio: {
|
|
136
|
+
Bahqtrf: "fk6fouc",
|
|
137
|
+
Be2twd7: "f13mqy1h",
|
|
138
|
+
Bhrd7zp: "figsok6",
|
|
139
|
+
Bg96gwp: "fcpl73t",
|
|
140
|
+
Frg6f3: [
|
|
141
|
+
"f1t5qyk5",
|
|
142
|
+
"f1ikr372"
|
|
143
|
+
],
|
|
144
|
+
sj55zd: "f19n0e5"
|
|
145
|
+
},
|
|
146
|
+
numerator: {
|
|
147
|
+
Bahqtrf: "fk6fouc",
|
|
148
|
+
Be2twd7: "f13mqy1h",
|
|
149
|
+
Bhrd7zp: "fl43uef",
|
|
150
|
+
Bg96gwp: "fcpl73t"
|
|
151
|
+
},
|
|
152
|
+
denominator: {
|
|
153
|
+
Bahqtrf: "fk6fouc",
|
|
154
|
+
Be2twd7: "f13mqy1h",
|
|
155
|
+
Bhrd7zp: "fl43uef",
|
|
156
|
+
Bg96gwp: "fcpl73t"
|
|
157
|
+
},
|
|
158
|
+
calloutInfoContainer: {
|
|
159
|
+
uwmqm3: [
|
|
160
|
+
"f1f5gg8d",
|
|
161
|
+
"f1vdfbxk"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
calloutContainer: {
|
|
165
|
+
a6j6cd: "f1j86lqe",
|
|
166
|
+
B93v9kj: "f15mrrko"
|
|
167
|
+
}
|
|
168
|
+
}, {
|
|
169
|
+
d: [
|
|
170
|
+
".f1bxpd7w{display:contents;}",
|
|
171
|
+
[
|
|
172
|
+
".f1a3p1vp{overflow:hidden;}",
|
|
173
|
+
{
|
|
174
|
+
p: -1
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
".f1dvrhzg{padding-top:11px 16px 10px 16px;}",
|
|
178
|
+
".fjnv7mu{padding-right:11px 16px 10px 16px;}",
|
|
179
|
+
".fae8789{padding-left:11px 16px 10px 16px;}",
|
|
180
|
+
".f1av7aef{padding-bottom:11px 16px 10px 16px;}",
|
|
181
|
+
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
|
182
|
+
".fronft5{background-blend-mode:normal,luminosity;}",
|
|
183
|
+
".f22iagw{display:flex;}",
|
|
184
|
+
".f1063pyq{flex-direction:row;}",
|
|
185
|
+
".f1869bpl{justify-content:space-between;}",
|
|
186
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
187
|
+
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
188
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
189
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
190
|
+
".fp25eh{opacity:0.8;}",
|
|
191
|
+
".fkfq4zb{color:var(--colorNeutralForeground2);}",
|
|
192
|
+
".f7jvbu2{margin-top:13px;}",
|
|
193
|
+
".fojgt09{font-size:var(--fontSizeHero700);}",
|
|
194
|
+
".f82itaf{line-height:22px;}",
|
|
195
|
+
".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
|
|
196
|
+
".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
|
|
197
|
+
".fwk3njj{display:inline-grid;}",
|
|
198
|
+
".f1vcna3q{margin-right:var(--spacingHorizontalS);}",
|
|
199
|
+
".foyynoy{margin-left:var(--spacingHorizontalS);}",
|
|
200
|
+
".fod5ikn{font-size:var(--fontSizeBase400);}",
|
|
201
|
+
".flh3ekv{font-weight:var(--fontWeightBold);}",
|
|
202
|
+
".faaz57k{line-height:var(--lineHeightBase400);}",
|
|
203
|
+
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
204
|
+
".fcen8rp{line-height:var(--lineHeightHero700);}",
|
|
205
|
+
".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}",
|
|
206
|
+
".f1ngh7ph{padding-top:var(--spacingVerticalMNudge);}",
|
|
207
|
+
".f1pgliyk{border-top-width:1px solid var(--colorNeutralStroke2);}",
|
|
208
|
+
".f13mqy1h{font-size:var(--fontSizeBase100);}",
|
|
209
|
+
".fcpl73t{line-height:var(--lineHeightBase100);}",
|
|
210
|
+
".f1t5qyk5{margin-left:var(--spacingHorizontalSNudge);}",
|
|
211
|
+
".f1ikr372{margin-right:var(--spacingHorizontalSNudge);}",
|
|
212
|
+
".f19n0e5{color:var(--colorNeutralForeground1);}"
|
|
213
|
+
],
|
|
214
|
+
m: [
|
|
215
|
+
[
|
|
216
|
+
"@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fg7a56h selectors{forced-color-adjust:none;}}",
|
|
217
|
+
{
|
|
218
|
+
m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
[
|
|
222
|
+
"@media screen and (-ms-high-contrast: white-on-black),screen and (forced-colors: active) and (prefers-color-scheme: dark){.fig6os7 selectors{color:rgb(255, 255, 255);}}",
|
|
223
|
+
{
|
|
224
|
+
m: "screen and (-ms-high-contrast: white-on-black), screen and (forced-colors: active) and (prefers-color-scheme: dark)"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
[
|
|
228
|
+
"@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f1j86lqe{fill:WindowText;}}",
|
|
229
|
+
{
|
|
230
|
+
m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
[
|
|
234
|
+
"@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f15mrrko{forced-color-adjust:none;}}",
|
|
235
|
+
{
|
|
236
|
+
m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
const usePopoverStyles_unstable = (props)=>{
|
|
242
|
+
const { isCartesian } = props;
|
|
243
|
+
const baseStyles = useStyles();
|
|
244
|
+
return {
|
|
245
|
+
calloutContentRoot: (0, _react.mergeClasses)(popoverClassNames.calloutContentRoot, baseStyles.calloutContentRoot /*props.styles?. calloutContentRoot*/ ),
|
|
246
|
+
calloutDateTimeContainer: (0, _react.mergeClasses)(popoverClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer /*props.styles?.calloutDateTimeContainer*/ ),
|
|
247
|
+
calloutContentX: (0, _react.mergeClasses)(popoverClassNames.calloutContentX, baseStyles.calloutContentX /*props.styles?.calloutContentX*/ ),
|
|
248
|
+
calloutBlockContainer: (0, _react.mergeClasses)(popoverClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer /*props.styles?.calloutBlockContainerCartesian*/ , isCartesian ? baseStyles.calloutBlockContainerCartesian : baseStyles.calloutBlockContainerNonCartesian),
|
|
249
|
+
calloutBlockContainertoDrawShapefalse: (0, _react.mergeClasses)(popoverClassNames.calloutBlockContainertoDrawShapefalse, baseStyles.calloutBlockContainertoDrawShapefalse /*props.styles?.calloutBlockContainertoDrawShapefalse*/ ),
|
|
250
|
+
calloutBlockContainertoDrawShapetrue: (0, _react.mergeClasses)(popoverClassNames.calloutBlockContainertoDrawShapetrue, baseStyles.calloutBlockContainertoDrawShapetrue /*props.styles?.calloutBlockContainertoDrawShapetrue*/ ),
|
|
251
|
+
shapeStyles: (0, _react.mergeClasses)(popoverClassNames.shapeStyles, baseStyles.shapeStyles /*props.styles?.shapeStyles*/ ),
|
|
252
|
+
calloutlegendText: (0, _react.mergeClasses)(popoverClassNames.calloutlegendText, baseStyles.calloutLegendText /*props.styles?.calloutlegendText*/ ),
|
|
253
|
+
calloutContentY: (0, _react.mergeClasses)(popoverClassNames.calloutContentY, baseStyles.calloutContentY /*props.styles?.calloutContentYNonCartesian*/ , isCartesian ? baseStyles.calloutContentYCartesian : baseStyles.calloutContentYNonCartesian),
|
|
254
|
+
descriptionMessage: (0, _react.mergeClasses)(popoverClassNames.descriptionMessage, baseStyles.descriptionMessage /*props.styles?. descriptionMessage*/ ),
|
|
255
|
+
ratio: (0, _react.mergeClasses)(popoverClassNames.ratio, baseStyles.ratio /*props.styles?.ratio*/ ),
|
|
256
|
+
numerator: (0, _react.mergeClasses)(popoverClassNames.numerator, baseStyles.numerator /*props.styles?.numerator*/ ),
|
|
257
|
+
denominator: (0, _react.mergeClasses)(popoverClassNames.denominator, baseStyles.denominator /*props.styles?.denominator*/ ),
|
|
258
|
+
calloutInfoContainer: (0, _react.mergeClasses)(popoverClassNames.calloutInfoContainer, baseStyles.calloutInfoContainer),
|
|
259
|
+
calloutContainer: (0, _react.mergeClasses)(popoverClassNames.calloutContainer, baseStyles.calloutContainer)
|
|
260
|
+
};
|
|
261
|
+
}; //# sourceMappingURL=useChartPopoverStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChartPopoverStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { HighContrastSelectorBlack, HighContrastSelector } from '../../utilities/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const popoverClassNames = {\n calloutContentRoot: 'fui-cart__calloutContentRoot',\n calloutDateTimeContainer: 'fui-cart__calloutDateTimeContainer',\n calloutContentX: 'fui-cart__calloutContentX',\n calloutBlockContainer: 'fui-cart__calloutBlockContainer',\n calloutBlockContainertoDrawShapefalse: 'fui-cart__calloutBlockContainertoDrawShapefalse',\n calloutBlockContainertoDrawShapetrue: 'fui-cart__calloutBlockContainertoDrawShapetrue',\n shapeStyles: 'fui-cart__shapeStyles',\n calloutlegendText: 'fui-cart__calloutlegendText',\n calloutContentY: 'fui-cart__calloutContentY',\n descriptionMessage: 'fui-cart__descriptionMessage',\n ratio: 'fui-cart__ratio',\n numerator: 'fui-cart__numerator',\n denominator: 'fui-cart__denominator',\n calloutInfoContainer: 'fui-cart__calloutInfoContainer',\n calloutContainer: 'fui-cart__calloutContainer'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n calloutContentRoot: {\n display: 'contents',\n overflow: 'hidden',\n ...shorthands.padding('11px 16px 10px 16px'),\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundBlendMode: 'normal, luminosity'\n },\n calloutDateTimeContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between'\n },\n calloutContentX: {\n ...typographyStyles.caption1,\n opacity: '0.8',\n color: tokens.colorNeutralForeground2\n },\n calloutBlockContainer: {\n color: tokens.colorNeutralForeground2\n },\n calloutBlockContainerCartesian: {\n ...typographyStyles.caption1,\n marginTop: '13px'\n },\n calloutBlockContainerNonCartesian: {\n fontSize: tokens.fontSizeHero700,\n lineHeight: '22px',\n '& selectors': {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none'\n }\n }\n },\n calloutBlockContainertoDrawShapefalse: {\n '& selectors': {\n [HighContrastSelector]: {\n forcedColorAdjust: 'none'\n }\n },\n paddingLeft: tokens.spacingHorizontalS\n },\n calloutBlockContainertoDrawShapetrue: {\n display: 'inline-grid'\n },\n shapeStyles: {\n marginRight: tokens.spacingHorizontalS\n },\n calloutLegendText: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground2,\n '& selectors': {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)'\n }\n }\n },\n calloutContentY: {\n '& selectors': {\n [HighContrastSelectorBlack]: {\n color: 'rgb(255, 255, 255)'\n }\n }\n },\n calloutContentYCartesian: {\n ...typographyStyles.subtitle2Stronger\n },\n calloutContentYNonCartesian: {\n ...typographyStyles.title2\n },\n descriptionMessage: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground2,\n marginTop: tokens.spacingVerticalMNudge,\n paddingTop: tokens.spacingVerticalMNudge,\n ...shorthands.borderTop(`1px solid ${tokens.colorNeutralStroke2}`)\n },\n ratio: {\n ...typographyStyles.caption2,\n marginLeft: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1\n },\n numerator: {\n ...typographyStyles.caption2Strong\n },\n denominator: {\n ...typographyStyles.caption2Strong\n },\n calloutInfoContainer: {\n paddingLeft: tokens.spacingHorizontalS\n },\n calloutContainer: {\n [HighContrastSelector]: {\n fill: 'WindowText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const usePopoverStyles_unstable = (props)=>{\n const { isCartesian } = props;\n const baseStyles = useStyles();\n return {\n calloutContentRoot: mergeClasses(popoverClassNames.calloutContentRoot, baseStyles.calloutContentRoot /*props.styles?. calloutContentRoot*/ ),\n calloutDateTimeContainer: mergeClasses(popoverClassNames.calloutDateTimeContainer, baseStyles.calloutDateTimeContainer /*props.styles?.calloutDateTimeContainer*/ ),\n calloutContentX: mergeClasses(popoverClassNames.calloutContentX, baseStyles.calloutContentX /*props.styles?.calloutContentX*/ ),\n calloutBlockContainer: mergeClasses(popoverClassNames.calloutBlockContainer, baseStyles.calloutBlockContainer /*props.styles?.calloutBlockContainerCartesian*/ , isCartesian ? baseStyles.calloutBlockContainerCartesian : baseStyles.calloutBlockContainerNonCartesian),\n calloutBlockContainertoDrawShapefalse: mergeClasses(popoverClassNames.calloutBlockContainertoDrawShapefalse, baseStyles.calloutBlockContainertoDrawShapefalse /*props.styles?.calloutBlockContainertoDrawShapefalse*/ ),\n calloutBlockContainertoDrawShapetrue: mergeClasses(popoverClassNames.calloutBlockContainertoDrawShapetrue, baseStyles.calloutBlockContainertoDrawShapetrue /*props.styles?.calloutBlockContainertoDrawShapetrue*/ ),\n shapeStyles: mergeClasses(popoverClassNames.shapeStyles, baseStyles.shapeStyles /*props.styles?.shapeStyles*/ ),\n calloutlegendText: mergeClasses(popoverClassNames.calloutlegendText, baseStyles.calloutLegendText /*props.styles?.calloutlegendText*/ ),\n calloutContentY: mergeClasses(popoverClassNames.calloutContentY, baseStyles.calloutContentY /*props.styles?.calloutContentYNonCartesian*/ , isCartesian ? baseStyles.calloutContentYCartesian : baseStyles.calloutContentYNonCartesian),\n descriptionMessage: mergeClasses(popoverClassNames.descriptionMessage, baseStyles.descriptionMessage /*props.styles?. descriptionMessage*/ ),\n ratio: mergeClasses(popoverClassNames.ratio, baseStyles.ratio /*props.styles?.ratio*/ ),\n numerator: mergeClasses(popoverClassNames.numerator, baseStyles.numerator /*props.styles?.numerator*/ ),\n denominator: mergeClasses(popoverClassNames.denominator, baseStyles.denominator /*props.styles?.denominator*/ ),\n calloutInfoContainer: mergeClasses(popoverClassNames.calloutInfoContainer, baseStyles.calloutInfoContainer),\n calloutContainer: mergeClasses(popoverClassNames.calloutContainer, baseStyles.calloutContainer)\n };\n};\n"],"names":["popoverClassNames","usePopoverStyles_unstable","calloutContentRoot","calloutDateTimeContainer","calloutContentX","calloutBlockContainer","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","shapeStyles","calloutlegendText","calloutContentY","descriptionMessage","ratio","numerator","denominator","calloutInfoContainer","calloutContainer","useStyles","__styles","mc9l5x","B68tc82","Bmxbyg5","Bpg54ce","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","jy2i9i","Beiy3e4","Brf1p80","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","abs64n","sj55zd","calloutBlockContainerCartesian","B6of3ja","calloutBlockContainerNonCartesian","bo4z9n","t21cq0","calloutLegendText","B1cpy0k","calloutContentYCartesian","calloutContentYNonCartesian","B4j52fo","Frg6f3","a6j6cd","B93v9kj","d","p","m","props","isCartesian","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAGW,WAAWV,2BAA2B;QACtOlC,oBAAoB6C,IAAAA,mBAAY,EAACxD,kBAAkBW,kBAAkB,EAAE4C,WAAW5C,kBAAkB,CAAC,mCAAA;QACrGC,OAAO4C,IAAAA,mBAAY,EAACxD,kBAAkBY,KAAK,EAAE2C,WAAW3C,KAAK,CAAC,qBAAA;QAC9DC,WAAW2C,IAAAA,mBAAY,EAACxD,kBAAkBa,SAAS,EAAE0C,WAAW1C,SAAS,CAAC,yBAAA;QAC1EC,aAAa0C,IAAAA,mBAAY,EAACxD,kBAAkBc,WAAW,EAAEyC,WAAWzC,WAAW,CAAC,2BAAA;QAChFC,sBAAsByC,IAAAA,mBAAY,EAACxD,kBAAkBe,oBAAoB,EAAEwC,WAAWxC,oBAAoB;QAC1GC,kBAAkBwC,IAAAA,mBAAY,EAACxD,kBAAkBgB,gBAAgB,EAAEuC,WAAWvC,gBAAgB;IAClG;AACJ"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */ "use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DeclarativeChart", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DeclarativeChart;
|
|
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("../DonutChart/index");
|
|
14
|
+
const _PlotlySchemaAdapter = require("./PlotlySchemaAdapter");
|
|
15
|
+
const _index1 = require("../LineChart/index");
|
|
16
|
+
const _index2 = require("../VerticalBarChart/index");
|
|
17
|
+
const _imageExporter = require("./imageExporter");
|
|
18
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
19
|
+
const useColorMapping = ()=>{
|
|
20
|
+
const colorMap = _react.useRef(new Map());
|
|
21
|
+
return colorMap;
|
|
22
|
+
};
|
|
23
|
+
const DeclarativeChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
24
|
+
const { plotlySchema } = (0, _PlotlySchemaAdapter.sanitizeJson)(props.chartSchema);
|
|
25
|
+
const plotlyInput = plotlySchema;
|
|
26
|
+
let { selectedLegends } = plotlySchema;
|
|
27
|
+
const colorMap = useColorMapping();
|
|
28
|
+
const isDarkTheme = false;
|
|
29
|
+
const chartRef = _react.useRef(null);
|
|
30
|
+
if (!(0, _PlotlySchemaAdapter.isArrayOrTypedArray)(selectedLegends)) {
|
|
31
|
+
selectedLegends = [];
|
|
32
|
+
}
|
|
33
|
+
const [activeLegends, setActiveLegends] = _react.useState(selectedLegends);
|
|
34
|
+
const onActiveLegendsChange = (keys)=>{
|
|
35
|
+
setActiveLegends(keys);
|
|
36
|
+
if (props.onSchemaChange) {
|
|
37
|
+
props.onSchemaChange({
|
|
38
|
+
plotlySchema: {
|
|
39
|
+
plotlyInput,
|
|
40
|
+
selectedLegends: keys
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
_react.useEffect(()=>{
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
47
|
+
const { plotlySchema } = (0, _PlotlySchemaAdapter.sanitizeJson)(props.chartSchema);
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
49
|
+
const { selectedLegends } = plotlySchema;
|
|
50
|
+
setActiveLegends(selectedLegends !== null && selectedLegends !== void 0 ? selectedLegends : []);
|
|
51
|
+
}, [
|
|
52
|
+
props.chartSchema
|
|
53
|
+
]);
|
|
54
|
+
const multiSelectLegendProps = {
|
|
55
|
+
canSelectMultipleLegends: true,
|
|
56
|
+
onChange: onActiveLegendsChange,
|
|
57
|
+
selectedLegends: activeLegends
|
|
58
|
+
};
|
|
59
|
+
const commonProps = {
|
|
60
|
+
legendProps: multiSelectLegendProps,
|
|
61
|
+
componentRef: chartRef
|
|
62
|
+
};
|
|
63
|
+
const checkAndRenderChart = (renderChartJsx, isAreaChart = false)=>{
|
|
64
|
+
var _plotlyInput_data_;
|
|
65
|
+
const xValues = plotlyInput.data[0].x;
|
|
66
|
+
const isXDate = (0, _PlotlySchemaAdapter.isDateArray)(xValues);
|
|
67
|
+
const isXNumber = (0, _PlotlySchemaAdapter.isNumberArray)(xValues);
|
|
68
|
+
const isXMonth = (0, _PlotlySchemaAdapter.isMonthArray)(xValues);
|
|
69
|
+
if (isXDate || isXNumber) {
|
|
70
|
+
const chartProps = {
|
|
71
|
+
...(0, _PlotlySchemaAdapter.transformPlotlyJsonToScatterChartProps)({
|
|
72
|
+
data: plotlyInput.data,
|
|
73
|
+
layout: plotlyInput.layout
|
|
74
|
+
}, isAreaChart, colorMap, isDarkTheme),
|
|
75
|
+
...commonProps
|
|
76
|
+
};
|
|
77
|
+
return renderChartJsx(chartProps);
|
|
78
|
+
} else if (isXMonth) {
|
|
79
|
+
const updatedData = plotlyInput.data.map((dataPoint)=>({
|
|
80
|
+
...dataPoint,
|
|
81
|
+
x: (0, _PlotlySchemaAdapter.updateXValues)(dataPoint.x)
|
|
82
|
+
}));
|
|
83
|
+
const chartProps = {
|
|
84
|
+
...(0, _PlotlySchemaAdapter.transformPlotlyJsonToScatterChartProps)({
|
|
85
|
+
data: updatedData,
|
|
86
|
+
layout: plotlyInput.layout
|
|
87
|
+
}, isAreaChart, colorMap, isDarkTheme),
|
|
88
|
+
...commonProps
|
|
89
|
+
};
|
|
90
|
+
return renderChartJsx(chartProps);
|
|
91
|
+
}
|
|
92
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_ = plotlyInput.data[0]) === null || _plotlyInput_data_ === void 0 ? void 0 : _plotlyInput_data_.type}`);
|
|
93
|
+
};
|
|
94
|
+
const exportAsImage = _react.useCallback((opts)=>{
|
|
95
|
+
var _chartRef_current;
|
|
96
|
+
return (0, _imageExporter.toImage)((_chartRef_current = chartRef.current) === null || _chartRef_current === void 0 ? void 0 : _chartRef_current.chartContainer, {
|
|
97
|
+
background: _reacttheme.tokens.colorNeutralBackground1,
|
|
98
|
+
scale: 5,
|
|
99
|
+
...opts
|
|
100
|
+
});
|
|
101
|
+
}, []);
|
|
102
|
+
_react.useImperativeHandle(props.componentRef, ()=>({
|
|
103
|
+
exportAsImage
|
|
104
|
+
}), [
|
|
105
|
+
exportAsImage
|
|
106
|
+
]);
|
|
107
|
+
switch(plotlyInput.data[0].type){
|
|
108
|
+
case 'pie':
|
|
109
|
+
return /*#__PURE__*/ _react.createElement(_index.DonutChart, {
|
|
110
|
+
...(0, _PlotlySchemaAdapter.transformPlotlyJsonToDonutProps)(plotlySchema, colorMap, isDarkTheme),
|
|
111
|
+
...commonProps
|
|
112
|
+
});
|
|
113
|
+
case 'bar':
|
|
114
|
+
var _plotlyInput_data_;
|
|
115
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_ = plotlyInput.data[0]) === null || _plotlyInput_data_ === void 0 ? void 0 : _plotlyInput_data_.type}`);
|
|
116
|
+
case 'scatter':
|
|
117
|
+
if (plotlyInput.data[0].mode === 'markers') {
|
|
118
|
+
var _plotlyInput_data_1, _plotlyInput_data_2;
|
|
119
|
+
throw new Error(`Unsupported chart - type :${(_plotlyInput_data_1 = plotlyInput.data[0]) === null || _plotlyInput_data_1 === void 0 ? void 0 : _plotlyInput_data_1.type}, mode: ${(_plotlyInput_data_2 = plotlyInput.data[0]) === null || _plotlyInput_data_2 === void 0 ? void 0 : _plotlyInput_data_2.mode}`);
|
|
120
|
+
}
|
|
121
|
+
const isAreaChart = plotlyInput.data.some((series)=>series.fill === 'tonexty' || series.fill === 'tozeroy');
|
|
122
|
+
const renderChartJsx = (chartProps)=>{
|
|
123
|
+
if (isAreaChart) {
|
|
124
|
+
var _plotlyInput_data_, _plotlyInput_data_1;
|
|
125
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_ = plotlyInput.data[0]) === null || _plotlyInput_data_ === void 0 ? void 0 : _plotlyInput_data_.type}, fill: ${(_plotlyInput_data_1 = plotlyInput.data[0]) === null || _plotlyInput_data_1 === void 0 ? void 0 : _plotlyInput_data_1.fill}`);
|
|
126
|
+
}
|
|
127
|
+
return /*#__PURE__*/ _react.createElement(_index1.LineChart, chartProps);
|
|
128
|
+
};
|
|
129
|
+
return checkAndRenderChart(renderChartJsx, isAreaChart);
|
|
130
|
+
case 'heatmap':
|
|
131
|
+
var _plotlyInput_data_3;
|
|
132
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_3 = plotlyInput.data[0]) === null || _plotlyInput_data_3 === void 0 ? void 0 : _plotlyInput_data_3.type}`);
|
|
133
|
+
case 'sankey':
|
|
134
|
+
var _plotlyInput_data_4;
|
|
135
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_4 = plotlyInput.data[0]) === null || _plotlyInput_data_4 === void 0 ? void 0 : _plotlyInput_data_4.type}`);
|
|
136
|
+
case 'indicator':
|
|
137
|
+
case 'gauge':
|
|
138
|
+
var _plotlyInput_data_5, _plotlyInput_data_6;
|
|
139
|
+
throw new Error(`Unsupported chart - type: ${(_plotlyInput_data_5 = plotlyInput.data[0]) === null || _plotlyInput_data_5 === void 0 ? void 0 : _plotlyInput_data_5.type}, mode: ${(_plotlyInput_data_6 = plotlyInput.data[0]) === null || _plotlyInput_data_6 === void 0 ? void 0 : _plotlyInput_data_6.mode}`);
|
|
140
|
+
case 'histogram':
|
|
141
|
+
return /*#__PURE__*/ _react.createElement(_index2.VerticalBarChart, {
|
|
142
|
+
...(0, _PlotlySchemaAdapter.transformPlotlyJsonToVBCProps)(plotlySchema, colorMap, isDarkTheme),
|
|
143
|
+
...commonProps
|
|
144
|
+
});
|
|
145
|
+
default:
|
|
146
|
+
var _plotlyInput_data_7;
|
|
147
|
+
const xValues = plotlyInput.data[0].x;
|
|
148
|
+
const yValues = plotlyInput.data[0].y;
|
|
149
|
+
if (xValues && yValues && xValues.length > 0 && yValues.length > 0) {
|
|
150
|
+
const renderLineChartJsx = (chartProps)=>{
|
|
151
|
+
return /*#__PURE__*/ _react.createElement(_index1.LineChart, chartProps);
|
|
152
|
+
};
|
|
153
|
+
return checkAndRenderChart(renderLineChartJsx);
|
|
154
|
+
}
|
|
155
|
+
throw new Error(`Unsupported chart type :${(_plotlyInput_data_7 = plotlyInput.data[0]) === null || _plotlyInput_data_7 === void 0 ? void 0 : _plotlyInput_data_7.type}`);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
DeclarativeChart.displayName = 'DeclarativeChart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["DeclarativeChart.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport * as React from 'react';\nimport { DonutChart } from '../DonutChart/index';\nimport { PlotData, PlotlySchema } from './PlotlySchema';\nimport {\n isArrayOrTypedArray,\n isDateArray,\n isNumberArray,\n isMonthArray,\n sanitizeJson,\n updateXValues,\n transformPlotlyJsonToDonutProps,\n transformPlotlyJsonToScatterChartProps,\n transformPlotlyJsonToVBCProps,\n} from './PlotlySchemaAdapter';\nimport { LineChart, LineChartProps } from '../LineChart/index';\nimport { VerticalBarChart } from '../VerticalBarChart/index';\nimport { ImageExportOptions, toImage } from './imageExporter';\nimport { Chart } from '../../types/index';\nimport { tokens } from '@fluentui/react-theme';\n\n/**\n * DeclarativeChart schema.\n * {@docCategory DeclarativeChart}\n */\nexport interface Schema {\n /**\n * Plotly schema represented as JSON object\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n plotlySchema: any;\n}\n\n/**\n * DeclarativeChart props.\n * {@docCategory DeclarativeChart}\n */\nexport interface DeclarativeChartProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * The schema representing the chart data, layout and configuration\n */\n chartSchema: Schema;\n\n /**\n * Callback when an event occurs\n */\n onSchemaChange?: (eventData: Schema) => void;\n\n /**\n * Optional callback to access the IDeclarativeChart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<IDeclarativeChart>;\n}\n\n/**\n * {@docCategory DeclarativeChart}\n */\nexport interface IDeclarativeChart {\n exportAsImage: (opts?: ImageExportOptions) => Promise<string>;\n}\n\nconst useColorMapping = () => {\n const colorMap = React.useRef(new Map<string, string>());\n return colorMap;\n};\n\n/**\n * DeclarativeChart component.\n * {@docCategory DeclarativeChart}\n */\nexport const DeclarativeChart: React.FunctionComponent<DeclarativeChartProps> = React.forwardRef<\n HTMLDivElement,\n DeclarativeChartProps\n>((props, forwardedRef) => {\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n const plotlyInput = plotlySchema as PlotlySchema;\n let { selectedLegends } = plotlySchema;\n const colorMap = useColorMapping();\n const isDarkTheme = false;\n const chartRef = React.useRef<Chart>(null);\n\n if (!isArrayOrTypedArray(selectedLegends)) {\n selectedLegends = [];\n }\n\n const [activeLegends, setActiveLegends] = React.useState<string[]>(selectedLegends);\n const onActiveLegendsChange = (keys: string[]) => {\n setActiveLegends(keys);\n if (props.onSchemaChange) {\n props.onSchemaChange({ plotlySchema: { plotlyInput, selectedLegends: keys } });\n }\n };\n\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { plotlySchema } = sanitizeJson(props.chartSchema);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { selectedLegends } = plotlySchema;\n setActiveLegends(selectedLegends ?? []);\n }, [props.chartSchema]);\n\n const multiSelectLegendProps = {\n canSelectMultipleLegends: true,\n onChange: onActiveLegendsChange,\n selectedLegends: activeLegends,\n };\n\n const commonProps = {\n legendProps: multiSelectLegendProps,\n componentRef: chartRef,\n };\n\n const checkAndRenderChart = (\n renderChartJsx: (chartProps: LineChartProps) => JSX.Element,\n isAreaChart: boolean = false,\n ) => {\n const xValues = (plotlyInput.data[0] as PlotData).x;\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const isXMonth = isMonthArray(xValues);\n if (isXDate || isXNumber) {\n const chartProps: LineChartProps = {\n ...transformPlotlyJsonToScatterChartProps(\n { data: plotlyInput.data, layout: plotlyInput.layout },\n isAreaChart,\n colorMap,\n isDarkTheme,\n ),\n ...commonProps,\n };\n return renderChartJsx(chartProps);\n } else if (isXMonth) {\n const updatedData = plotlyInput.data.map((dataPoint: PlotData) => ({\n ...dataPoint,\n x: updateXValues(dataPoint.x),\n }));\n const chartProps: LineChartProps = {\n ...transformPlotlyJsonToScatterChartProps(\n { data: updatedData, layout: plotlyInput.layout },\n isAreaChart,\n colorMap,\n isDarkTheme,\n ),\n ...commonProps,\n };\n return renderChartJsx(chartProps);\n }\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n };\n\n const exportAsImage = React.useCallback((opts?: ImageExportOptions) => {\n return toImage(chartRef.current?.chartContainer, {\n background: tokens.colorNeutralBackground1,\n scale: 5,\n ...opts,\n });\n }, []);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n exportAsImage,\n }),\n [exportAsImage],\n );\n\n switch (plotlyInput.data[0].type) {\n case 'pie':\n return <DonutChart {...transformPlotlyJsonToDonutProps(plotlySchema, colorMap, isDarkTheme)} {...commonProps} />;\n case 'bar':\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n case 'scatter':\n if (plotlyInput.data[0].mode === 'markers') {\n throw new Error(`Unsupported chart - type :${plotlyInput.data[0]?.type}, mode: ${plotlyInput.data[0]?.mode}`);\n }\n const isAreaChart = plotlyInput.data.some(\n (series: PlotData) => series.fill === 'tonexty' || series.fill === 'tozeroy',\n );\n const renderChartJsx = (chartProps: LineChartProps) => {\n if (isAreaChart) {\n throw new Error(\n `Unsupported chart type :${plotlyInput.data[0]?.type}, fill: ${\n (plotlyInput.data[0] as Partial<PlotData>)?.fill\n }`,\n );\n }\n return <LineChart {...chartProps} />;\n };\n return checkAndRenderChart(renderChartJsx, isAreaChart);\n case 'heatmap':\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n case 'sankey':\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n case 'indicator':\n case 'gauge':\n throw new Error(`Unsupported chart - type: ${plotlyInput.data[0]?.type}, mode: ${plotlyInput.data[0]?.mode}`);\n case 'histogram':\n return (\n <VerticalBarChart {...transformPlotlyJsonToVBCProps(plotlySchema, colorMap, isDarkTheme)} {...commonProps} />\n );\n default:\n const xValues = (plotlyInput.data[0] as PlotData).x;\n const yValues = (plotlyInput.data[0] as PlotData).y;\n if (xValues && yValues && xValues.length > 0 && yValues.length > 0) {\n const renderLineChartJsx = (chartProps: LineChartProps) => {\n return <LineChart {...chartProps} />;\n };\n return checkAndRenderChart(renderLineChartJsx);\n }\n throw new Error(`Unsupported chart type :${plotlyInput.data[0]?.type}`);\n }\n});\nDeclarativeChart.displayName = 'DeclarativeChart';\n"],"names":["DeclarativeChart","useColorMapping","colorMap","React","useRef","Map","forwardRef","props","forwardedRef","plotlySchema","sanitizeJson","chartSchema","plotlyInput","selectedLegends","isDarkTheme","chartRef","isArrayOrTypedArray","activeLegends","setActiveLegends","useState","onActiveLegendsChange","keys","onSchemaChange","useEffect","multiSelectLegendProps","canSelectMultipleLegends","onChange","commonProps","legendProps","componentRef","checkAndRenderChart","renderChartJsx","isAreaChart","xValues","data","x","isXDate","isDateArray","isXNumber","isNumberArray","isXMonth","isMonthArray","chartProps","transformPlotlyJsonToScatterChartProps","layout","updatedData","map","dataPoint","updateXValues","Error","type","exportAsImage","useCallback","opts","toImage","current","chartContainer","background","tokens","colorNeutralBackground1","scale","useImperativeHandle","createElement","DonutChart","transformPlotlyJsonToDonutProps","mode","some","series","fill","_plotlyInput_data_1","LineChart","VerticalBarChart","transformPlotlyJsonToVBCProps","yValues","y","length","renderLineChartJsx","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAAA,oBAAqBqD,IAAI,CAAC,CAAC;QAC9G,KAAK;YACH,OAAA,WAAA,GACE9D,OAAA2D,aAAA,CAACS,wBAAAA,EAAAA;gBAAkB,GAAGC,IAAAA,kDAAAA,EAA8B/D,cAAcP,UAAUY,YAAY;gBAAG,GAAGa,WAAW;;QAE7G;gBAS6Cf;YAR3C,MAAMqB,UAAUrB,YAAasB,IAAI,CAAC,EAAE,CAAcC,CAAC;YACnD,MAAMsC,UAAU7D,YAAasB,IAAI,CAAC,EAAE,CAAcwC,CAAC;YACnD,IAAIzC,WAAWwC,WAAWxC,QAAQ0C,MAAM,GAAG,KAAKF,QAAQE,MAAM,GAAG,GAAG;gBAClE,MAAMC,qBAAqB,CAAClC;oBAC1B,OAAA,WAAA,GAAOvC,OAAA2D,aAAA,CAACQ,iBAAAA,EAAc5B;gBACxB;gBACA,OAAOZ,oBAAoB8C;YAC7B;YACA,MAAM,IAAI3B,MAAM,CAAC,wBAAwB,EAAA,AAAErC,CAAAA,sBAAAA,YAAYsB,IAAI,CAAC,EAAE,AAAF,MAAE,QAAnBtB,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAqBsC,IAAI,CAAC,CAAC;IAC1E;AACF;AACAlD,iBAAiB6E,WAAW,GAAG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-explicit-any */ /**
|
|
2
|
+
* This interface is extracted from Plotly.js typescript definitions.
|
|
3
|
+
* All the unsupported types are removed to align with fluent charts.
|
|
4
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts
|
|
5
|
+
*/ /**
|
|
6
|
+
* 'Sets the pattern within the marker.
|
|
7
|
+
*/ "use strict";
|
|
8
|
+
Object.defineProperty(exports, "__esModule", {
|
|
9
|
+
value: true
|
|
10
|
+
});
|