@fluentui/react-charting 5.24.9 → 5.24.11
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.json +69 -1
- package/CHANGELOG.md +25 -2
- package/dist/react-charting.d.ts +167 -3
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +47 -3
- package/lib/FunnelChart.d.ts +1 -0
- package/lib/FunnelChart.js +2 -0
- package/lib/FunnelChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +4 -0
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.js +2 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +121 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +1 -0
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +5 -6
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +2 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib/components/FunnelChart/FunnelChart.base.js +266 -0
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib/components/FunnelChart/FunnelChart.js +9 -0
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib/components/FunnelChart/funnelGeometry.js +194 -0
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib/components/FunnelChart/index.d.ts +2 -0
- package/lib/components/FunnelChart/index.js +3 -0
- package/lib/components/FunnelChart/index.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +5 -16
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +5 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib/components/LineChart/LineChart.base.js +36 -11
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +2 -0
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js +2 -0
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js +1 -0
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +12 -2
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js +17 -2
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib/utilities/utilities.d.ts +3 -0
- package/lib/utilities/utilities.js +14 -0
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/FunnelChart.d.ts +1 -0
- package/lib-amd/FunnelChart.js +6 -0
- package/lib-amd/FunnelChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +4 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js +2 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib-amd/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +8 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +1 -0
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +5 -6
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +2 -0
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +260 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-amd/components/FunnelChart/index.d.ts +2 -0
- package/lib-amd/components/FunnelChart/index.js +7 -0
- package/lib-amd/components/FunnelChart/index.js.map +1 -0
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +5 -15
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +5 -1
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib-amd/components/LineChart/LineChart.base.js +36 -11
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +2 -0
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.js +2 -0
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.js +1 -0
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +12 -2
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js +17 -2
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/index.d.ts +2 -0
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +3 -0
- package/lib-amd/utilities/utilities.js +17 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/FunnelChart.d.ts +1 -0
- package/lib-commonjs/FunnelChart.js +5 -0
- package/lib-commonjs/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js +2 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +8 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +5 -6
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +269 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/index.js +6 -0
- package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +4 -15
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +5 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib-commonjs/components/LineChart/LineChart.base.js +36 -11
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +2 -0
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js +2 -0
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js +1 -0
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +12 -2
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +17 -2
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +3 -0
- package/lib-commonjs/utilities/utilities.js +17 -1
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +4 -4
- package/src/components/ChartTable/ChartTable.types.ts +1 -0
- package/src/components/CommonComponents/CartesianChart.types.ts +6 -0
- package/src/components/DonutChart/DonutChart.types.ts +5 -0
- package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
- package/src/components/GaugeChart/GaugeChart.types.ts +5 -0
- package/src/components/LineChart/LineChart.types.ts +7 -0
- package/src/components/ResponsiveContainer/ResponsiveContainer.types.ts +3 -2
- package/src/components/SankeyChart/SankeyChart.types.ts +5 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getSegmentTextProps = exports.getStackedVerticalFunnelSegmentGeometry = exports.getStackedHorizontalFunnelSegmentGeometry = exports.getVerticalFunnelSegmentGeometry = exports.getHorizontalFunnelSegmentGeometry = void 0;
|
|
5
|
+
function getHorizontalFunnelSegmentGeometry(_a) {
|
|
6
|
+
var d = _a.d, i = _a.i, data = _a.data, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight, isRTL = _a.isRTL;
|
|
7
|
+
var segmentHeight = funnelHeight / data.length;
|
|
8
|
+
var widthScale = function (value) { return (value / Math.max.apply(Math, data.map(function (dataPoint) { return dataPoint.value; }))) * funnelWidth; };
|
|
9
|
+
var topWidth = widthScale(d.value);
|
|
10
|
+
var bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value) : 0;
|
|
11
|
+
var xOffset = (funnelWidth - topWidth) / 2;
|
|
12
|
+
var nextXOffset = (funnelWidth - bottomWidth) / 2;
|
|
13
|
+
var xStart = isRTL ? funnelWidth - xOffset : xOffset;
|
|
14
|
+
var xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;
|
|
15
|
+
var isLastSegment = i === data.length - 1;
|
|
16
|
+
var textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;
|
|
17
|
+
var textX = funnelWidth / 2;
|
|
18
|
+
var availableWidth = topWidth;
|
|
19
|
+
if (isLastSegment) {
|
|
20
|
+
var yFromTop = textY - i * segmentHeight;
|
|
21
|
+
var widthAtY = topWidth * (1 - yFromTop / segmentHeight);
|
|
22
|
+
availableWidth = Math.max(widthAtY * 0.8, 0);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
availableWidth = Math.min(topWidth, bottomWidth) * 0.9;
|
|
26
|
+
}
|
|
27
|
+
var pathD = "M".concat(xStart, ",").concat(i * segmentHeight, "\n L").concat(funnelWidth - xStart, ",").concat(i * segmentHeight, "\n L").concat(funnelWidth - xEnd, ",").concat((i + 1) * segmentHeight, "\n L").concat(xEnd, ",").concat((i + 1) * segmentHeight, "\n Z");
|
|
28
|
+
return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
|
|
29
|
+
}
|
|
30
|
+
exports.getHorizontalFunnelSegmentGeometry = getHorizontalFunnelSegmentGeometry;
|
|
31
|
+
function getVerticalFunnelSegmentGeometry(_a) {
|
|
32
|
+
var d = _a.d, i = _a.i, data = _a.data, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight, isRTL = _a.isRTL;
|
|
33
|
+
var segmentWidth = funnelWidth / data.length;
|
|
34
|
+
var heightScale = function (value) { return (value / Math.max.apply(Math, data.map(function (dataPoint) { return dataPoint.value; }))) * funnelHeight; };
|
|
35
|
+
var leftHeight = heightScale(d.value);
|
|
36
|
+
var rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value) : 0;
|
|
37
|
+
var yOffset = (funnelHeight - leftHeight) / 2;
|
|
38
|
+
var nextYOffset = (funnelHeight - rightHeight) / 2;
|
|
39
|
+
var x0 = i * segmentWidth;
|
|
40
|
+
var x1 = (i + 1) * segmentWidth;
|
|
41
|
+
var isLastSegment = i === data.length - 1;
|
|
42
|
+
var textX;
|
|
43
|
+
var textY;
|
|
44
|
+
var availableWidth = segmentWidth * 0.8;
|
|
45
|
+
if (isLastSegment) {
|
|
46
|
+
// For the triangular last segment, position text at 1/4 from the left edge
|
|
47
|
+
textX = x0 + (x1 - x0) * 0.25;
|
|
48
|
+
textY = funnelHeight / 2;
|
|
49
|
+
// For triangular segments, we need to check both height and width constraints
|
|
50
|
+
// The segment needs to be large enough to contain text
|
|
51
|
+
var segmentArea = (leftHeight * segmentWidth) / 2; // Area of triangle
|
|
52
|
+
var minAreaForText = 800; // Minimum area needed to show text
|
|
53
|
+
if (leftHeight < 40 || segmentArea < minAreaForText) {
|
|
54
|
+
// Hide text if height is too small or area is insufficient
|
|
55
|
+
availableWidth = 0;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// Calculate available width at text position
|
|
59
|
+
var widthAtTextPosition = (x1 - x0) * 0.75;
|
|
60
|
+
availableWidth = widthAtTextPosition * 0.6;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
textX = (x0 + x1) / 2;
|
|
65
|
+
textY = funnelHeight / 2;
|
|
66
|
+
var minHeight = Math.min(leftHeight, rightHeight);
|
|
67
|
+
availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;
|
|
68
|
+
}
|
|
69
|
+
var pathD = "M".concat(x0, ",").concat(yOffset, "\n L").concat(x1, ",").concat(nextYOffset, "\n L").concat(x1, ",").concat(funnelHeight - nextYOffset, "\n L").concat(x0, ",").concat(funnelHeight - yOffset, "\n Z");
|
|
70
|
+
return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
|
|
71
|
+
}
|
|
72
|
+
exports.getVerticalFunnelSegmentGeometry = getVerticalFunnelSegmentGeometry;
|
|
73
|
+
function getStackedHorizontalFunnelSegmentGeometry(_a) {
|
|
74
|
+
var _b, _c;
|
|
75
|
+
var i = _a.i, k = _a.k, stages = _a.stages, totals = _a.totals, maxTotal = _a.maxTotal, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight;
|
|
76
|
+
var segmentHeight = funnelHeight / stages.length;
|
|
77
|
+
var cur = stages[i];
|
|
78
|
+
var next = stages[i + 1] || { subValues: [] };
|
|
79
|
+
var curTotal = totals[i] || 1;
|
|
80
|
+
var nextTotal = totals[i + 1] || 0;
|
|
81
|
+
var cumTop = 0;
|
|
82
|
+
var cumBot = 0;
|
|
83
|
+
var _loop_1 = function (idx) {
|
|
84
|
+
var v_1 = cur.subValues[idx];
|
|
85
|
+
var vNext_1 = (_b = next.subValues) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.category === v_1.category; });
|
|
86
|
+
var val_1 = v_1.value;
|
|
87
|
+
var nextVal_1 = vNext_1 ? vNext_1.value : 0;
|
|
88
|
+
cumTop += (val_1 / curTotal) * (curTotal / maxTotal) * funnelWidth;
|
|
89
|
+
cumBot += (nextVal_1 / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
|
|
90
|
+
};
|
|
91
|
+
for (var idx = 0; idx < k; idx++) {
|
|
92
|
+
_loop_1(idx);
|
|
93
|
+
}
|
|
94
|
+
var v = cur.subValues[k];
|
|
95
|
+
var vNext = (_c = next.subValues) === null || _c === void 0 ? void 0 : _c.find(function (x) { return x.category === v.category; });
|
|
96
|
+
var val = v.value;
|
|
97
|
+
var nextVal = vNext ? vNext.value : 0;
|
|
98
|
+
var topW = (val / curTotal) * (curTotal / maxTotal) * funnelWidth;
|
|
99
|
+
var botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;
|
|
100
|
+
var topStart = (funnelWidth - (curTotal / maxTotal) * funnelWidth) / 2 + cumTop;
|
|
101
|
+
var topEnd = topStart + topW;
|
|
102
|
+
var botStart = (funnelWidth - (nextTotal / maxTotal) * funnelWidth) / 2 + cumBot;
|
|
103
|
+
var botEnd = botStart + botW;
|
|
104
|
+
var textX = (topStart + topEnd + botStart + botEnd) / 4;
|
|
105
|
+
var isLastSegment = i === stages.length - 1;
|
|
106
|
+
var textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;
|
|
107
|
+
// Calculate available width based on this specific segment's width
|
|
108
|
+
var availableWidth;
|
|
109
|
+
if (isLastSegment) {
|
|
110
|
+
// For triangular last segment, use the width at text Y position
|
|
111
|
+
var yFromTop = textY - i * segmentHeight;
|
|
112
|
+
var widthRatio = 1 - yFromTop / segmentHeight;
|
|
113
|
+
availableWidth = topW * widthRatio;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
// For trapezoidal segments, use the actual segment width
|
|
117
|
+
availableWidth = Math.min(topW, botW);
|
|
118
|
+
}
|
|
119
|
+
var pathD = "M".concat(topStart, ",").concat(i * segmentHeight, "\n L").concat(topEnd, ",").concat(i * segmentHeight, "\n L").concat(botEnd, ",").concat((i + 1) * segmentHeight, "\n L").concat(botStart, ",").concat((i + 1) * segmentHeight, "\n Z");
|
|
120
|
+
return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
|
|
121
|
+
}
|
|
122
|
+
exports.getStackedHorizontalFunnelSegmentGeometry = getStackedHorizontalFunnelSegmentGeometry;
|
|
123
|
+
function getStackedVerticalFunnelSegmentGeometry(_a) {
|
|
124
|
+
var _b, _c;
|
|
125
|
+
var i = _a.i, k = _a.k, stages = _a.stages, totals = _a.totals, maxTotal = _a.maxTotal, funnelWidth = _a.funnelWidth, funnelHeight = _a.funnelHeight;
|
|
126
|
+
var segmentWidth = funnelWidth / stages.length;
|
|
127
|
+
var cur = stages[i];
|
|
128
|
+
var next = stages[i + 1] || { subValues: [] };
|
|
129
|
+
var curTotal = totals[i] || 1;
|
|
130
|
+
var nextTotal = totals[i + 1] || 0;
|
|
131
|
+
var cumTop = 0;
|
|
132
|
+
var cumBot = 0;
|
|
133
|
+
var _loop_2 = function (idx) {
|
|
134
|
+
var v_2 = cur.subValues[idx];
|
|
135
|
+
var vNext_2 = (_b = next.subValues) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.category === v_2.category; });
|
|
136
|
+
var val_2 = v_2.value;
|
|
137
|
+
var nextVal_2 = vNext_2 ? vNext_2.value : 0;
|
|
138
|
+
cumTop += (val_2 / curTotal) * (curTotal / maxTotal) * funnelHeight;
|
|
139
|
+
cumBot += (nextVal_2 / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
|
|
140
|
+
};
|
|
141
|
+
for (var idx = 0; idx < k; idx++) {
|
|
142
|
+
_loop_2(idx);
|
|
143
|
+
}
|
|
144
|
+
var v = cur.subValues[k];
|
|
145
|
+
var vNext = (_c = next.subValues) === null || _c === void 0 ? void 0 : _c.find(function (x) { return x.category === v.category; });
|
|
146
|
+
var val = v.value;
|
|
147
|
+
var nextVal = vNext ? vNext.value : 0;
|
|
148
|
+
var topH = (val / curTotal) * (curTotal / maxTotal) * funnelHeight;
|
|
149
|
+
var botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;
|
|
150
|
+
var leftStart = i * segmentWidth;
|
|
151
|
+
var leftEnd = (i + 1) * segmentWidth;
|
|
152
|
+
var topStart = (funnelHeight - (curTotal / maxTotal) * funnelHeight) / 2 + cumTop;
|
|
153
|
+
var topEnd = topStart + topH;
|
|
154
|
+
var botStart = (funnelHeight - (nextTotal / maxTotal) * funnelHeight) / 2 + cumBot;
|
|
155
|
+
var botEnd = botStart + botH;
|
|
156
|
+
var isLastSegment = i === stages.length - 1;
|
|
157
|
+
var textX;
|
|
158
|
+
var textY;
|
|
159
|
+
var availableWidth;
|
|
160
|
+
if (isLastSegment) {
|
|
161
|
+
textX = leftStart + (leftEnd - leftStart) * 0.25;
|
|
162
|
+
textY = (topStart + topEnd) / 2;
|
|
163
|
+
// For triangular segments, calculate available width at text position
|
|
164
|
+
var segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;
|
|
165
|
+
availableWidth = segmentWidthAtTextPos * 0.8;
|
|
166
|
+
// For triangular last segments, also check if there's enough height
|
|
167
|
+
// The segment area should be large enough to contain text
|
|
168
|
+
var segmentArea = (topH * segmentWidth) / 2;
|
|
169
|
+
if (topH < 24 || segmentArea < 600) {
|
|
170
|
+
availableWidth = 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
textX = (leftStart + leftEnd) / 2;
|
|
175
|
+
textY = (topStart + topEnd + botStart + botEnd) / 4;
|
|
176
|
+
// For trapezoidal segments, use full segment width
|
|
177
|
+
availableWidth = Math.abs(leftEnd - leftStart) * 0.9;
|
|
178
|
+
// Check if the segment has sufficient height for text
|
|
179
|
+
// For non-last segments, we need to ensure there's enough vertical space
|
|
180
|
+
var avgHeight = (topH + botH) / 2;
|
|
181
|
+
if (avgHeight < 20) {
|
|
182
|
+
availableWidth = 0;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
var pathD = "M".concat(leftStart, ",").concat(topStart, "\n L").concat(leftEnd, ",").concat(botStart, "\n L").concat(leftEnd, ",").concat(botEnd, "\n L").concat(leftStart, ",").concat(topEnd, "\n Z");
|
|
186
|
+
return { pathD: pathD, textX: textX, textY: textY, availableWidth: availableWidth };
|
|
187
|
+
}
|
|
188
|
+
exports.getStackedVerticalFunnelSegmentGeometry = getStackedVerticalFunnelSegmentGeometry;
|
|
189
|
+
function getSegmentTextProps(_a) {
|
|
190
|
+
var availableWidth = _a.availableWidth, _b = _a.minTextWidth, minTextWidth = _b === void 0 ? 24 : _b, textX = _a.textX, textY = _a.textY, value = _a.value, culture = _a.culture, onMouseOver = _a.onMouseOver, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut;
|
|
191
|
+
return {
|
|
192
|
+
show: availableWidth > minTextWidth && availableWidth > 0,
|
|
193
|
+
x: textX,
|
|
194
|
+
y: textY,
|
|
195
|
+
value: value,
|
|
196
|
+
culture: culture,
|
|
197
|
+
onMouseOver: onMouseOver,
|
|
198
|
+
onMouseMove: onMouseMove,
|
|
199
|
+
onMouseOut: onMouseOut,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
exports.getSegmentTextProps = getSegmentTextProps;
|
|
203
|
+
});
|
|
204
|
+
//# sourceMappingURL=funnelGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"funnelGeometry.js","sourceRoot":"../src/","sources":["components/FunnelChart/funnelGeometry.ts"],"names":[],"mappings":";;;;IA2BA,SAAgB,kCAAkC,CAAC,EAclD;YAbC,CAAC,OAAA,EACD,CAAC,OAAA,EACD,IAAI,UAAA,EACJ,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,KAAK,WAAA;QASL,IAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CA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;YACrB,CAAC;QACH,CAAC;QAED,IAAM,KAAK,GAAG,WAAI,SAAS,cAAI,QAAQ,oBAClC,OAAO,cAAI,QAAQ,oBACnB,OAAO,cAAI,MAAM,oBACjB,SAAS,cAAI,MAAM,YACpB,CAAC;QACL,OAAO,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,cAAc,gBAAA,EAAE,CAAC;IACjD,CAAC;IApFD,0FAoFC;IAED,SAAgB,mBAAmB,CAAC,EAoBnC;YAnBC,cAAc,oBAAA,EACd,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EACjB,KAAK,WAAA,EACL,KAAK,WAAA,EACL,KAAK,WAAA,EACL,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,UAAU,gBAAA;QAYV,OAAO;YACL,IAAI,EAAE,cAAc,GAAG,YAAY,IAAI,cAAc,GAAG,CAAC;YACzD,CAAC,EAAE,KAAK;YACR,CAAC,EAAE,KAAK;YACR,KAAK,OAAA;YACL,OAAO,SAAA;YACP,WAAW,aAAA;YACX,WAAW,aAAA;YACX,UAAU,YAAA;SACX,CAAC;IACJ,CAAC;IA/BD,kDA+BC","sourcesContent":["import * as React from 'react';\nimport { IFunnelChartDataPoint } from './FunnelChart.types';\n\nexport interface IFunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\nexport interface IStackedFunnelSegmentGeometry {\n pathD: string;\n textX: number;\n textY: number;\n availableWidth: number;\n}\n\ninterface ISubValue {\n category: string;\n value: number;\n color: string;\n}\n\ninterface IStage {\n subValues: ISubValue[];\n}\n\nexport function getHorizontalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: IFunnelChartDataPoint;\n i: number;\n data: IFunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): IFunnelSegmentGeometry {\n const segmentHeight = funnelHeight / data.length;\n const widthScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelWidth;\n const topWidth = widthScale(d.value!);\n const bottomWidth = i < data.length - 1 ? widthScale(data[i + 1].value!) : 0;\n const xOffset = (funnelWidth - topWidth) / 2;\n const nextXOffset = (funnelWidth - bottomWidth) / 2;\n const xStart = isRTL ? funnelWidth - xOffset : xOffset;\n const xEnd = isRTL ? funnelWidth - nextXOffset : nextXOffset;\n\n const isLastSegment = i === data.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : i * segmentHeight + segmentHeight / 2;\n\n const textX = funnelWidth / 2;\n let availableWidth = topWidth;\n if (isLastSegment) {\n const yFromTop = textY - i * segmentHeight;\n const widthAtY = topWidth * (1 - yFromTop / segmentHeight);\n availableWidth = Math.max(widthAtY * 0.8, 0);\n } else {\n availableWidth = Math.min(topWidth, bottomWidth) * 0.9;\n }\n const pathD = `M${xStart},${i * segmentHeight}\n L${funnelWidth - xStart},${i * segmentHeight}\n L${funnelWidth - xEnd},${(i + 1) * segmentHeight}\n L${xEnd},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getVerticalFunnelSegmentGeometry({\n d,\n i,\n data,\n funnelWidth,\n funnelHeight,\n isRTL,\n}: {\n d: IFunnelChartDataPoint;\n i: number;\n data: IFunnelChartDataPoint[];\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n}): IFunnelSegmentGeometry {\n const segmentWidth = funnelWidth / data.length;\n const heightScale = (value: number) => (value / Math.max(...data.map(dataPoint => dataPoint.value!))) * funnelHeight;\n const leftHeight = heightScale(d.value!);\n const rightHeight = i < data.length - 1 ? heightScale(data[i + 1].value!) : 0;\n const yOffset = (funnelHeight - leftHeight) / 2;\n const nextYOffset = (funnelHeight - rightHeight) / 2;\n const x0 = i * segmentWidth;\n const x1 = (i + 1) * segmentWidth;\n\n const isLastSegment = i === data.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth = segmentWidth * 0.8;\n\n if (isLastSegment) {\n // For the triangular last segment, position text at 1/4 from the left edge\n textX = x0 + (x1 - x0) * 0.25;\n textY = funnelHeight / 2;\n\n // For triangular segments, we need to check both height and width constraints\n // The segment needs to be large enough to contain text\n const segmentArea = (leftHeight * segmentWidth) / 2; // Area of triangle\n const minAreaForText = 800; // Minimum area needed to show text\n\n if (leftHeight < 40 || segmentArea < minAreaForText) {\n // Hide text if height is too small or area is insufficient\n availableWidth = 0;\n } else {\n // Calculate available width at text position\n const widthAtTextPosition = (x1 - x0) * 0.75;\n availableWidth = widthAtTextPosition * 0.6;\n }\n } else {\n textX = (x0 + x1) / 2;\n textY = funnelHeight / 2;\n const minHeight = Math.min(leftHeight, rightHeight);\n availableWidth = minHeight > 20 ? segmentWidth * 0.8 : 0;\n }\n\n const pathD = `M${x0},${yOffset}\n L${x1},${nextYOffset}\n L${x1},${funnelHeight - nextYOffset}\n L${x0},${funnelHeight - yOffset}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedHorizontalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: IStage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): IStackedFunnelSegmentGeometry {\n const segmentHeight = funnelHeight / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topW = (val / curTotal) * (curTotal / maxTotal) * funnelWidth;\n const botW = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelWidth;\n const topStart = (funnelWidth - (curTotal / maxTotal) * funnelWidth) / 2 + cumTop;\n const topEnd = topStart + topW;\n const botStart = (funnelWidth - (nextTotal / maxTotal) * funnelWidth) / 2 + cumBot;\n const botEnd = botStart + botW;\n const textX = (topStart + topEnd + botStart + botEnd) / 4;\n\n const isLastSegment = i === stages.length - 1;\n const textY = isLastSegment ? i * segmentHeight + segmentHeight * 0.33 : (i + 0.5) * segmentHeight;\n\n // Calculate available width based on this specific segment's width\n let availableWidth: number;\n if (isLastSegment) {\n // For triangular last segment, use the width at text Y position\n const yFromTop = textY - i * segmentHeight;\n const widthRatio = 1 - yFromTop / segmentHeight;\n availableWidth = topW * widthRatio;\n } else {\n // For trapezoidal segments, use the actual segment width\n availableWidth = Math.min(topW, botW);\n }\n\n const pathD = `M${topStart},${i * segmentHeight}\n L${topEnd},${i * segmentHeight}\n L${botEnd},${(i + 1) * segmentHeight}\n L${botStart},${(i + 1) * segmentHeight}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getStackedVerticalFunnelSegmentGeometry({\n i,\n k,\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n}: {\n i: number;\n k: number;\n stages: IStage[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n}): IStackedFunnelSegmentGeometry {\n const segmentWidth = funnelWidth / stages.length;\n const cur = stages[i];\n const next = stages[i + 1] || { subValues: [] };\n const curTotal = totals[i] || 1;\n const nextTotal = totals[i + 1] || 0;\n\n let cumTop = 0;\n let cumBot = 0;\n for (let idx = 0; idx < k; idx++) {\n const v = cur.subValues[idx];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n cumTop += (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n cumBot += (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n }\n const v = cur.subValues[k];\n const vNext = next.subValues?.find((x: ISubValue) => x.category === v.category);\n const val = v.value;\n const nextVal = vNext ? vNext.value : 0;\n const topH = (val / curTotal) * (curTotal / maxTotal) * funnelHeight;\n const botH = (nextVal / nextTotal || 0) * (nextTotal / maxTotal) * funnelHeight;\n const leftStart = i * segmentWidth;\n const leftEnd = (i + 1) * segmentWidth;\n const topStart = (funnelHeight - (curTotal / maxTotal) * funnelHeight) / 2 + cumTop;\n const topEnd = topStart + topH;\n const botStart = (funnelHeight - (nextTotal / maxTotal) * funnelHeight) / 2 + cumBot;\n const botEnd = botStart + botH;\n\n const isLastSegment = i === stages.length - 1;\n let textX: number;\n let textY: number;\n let availableWidth: number;\n\n if (isLastSegment) {\n textX = leftStart + (leftEnd - leftStart) * 0.25;\n textY = (topStart + topEnd) / 2;\n // For triangular segments, calculate available width at text position\n const segmentWidthAtTextPos = (leftEnd - leftStart) * 0.5;\n availableWidth = segmentWidthAtTextPos * 0.8;\n\n // For triangular last segments, also check if there's enough height\n // The segment area should be large enough to contain text\n const segmentArea = (topH * segmentWidth) / 2;\n if (topH < 24 || segmentArea < 600) {\n availableWidth = 0;\n }\n } else {\n textX = (leftStart + leftEnd) / 2;\n textY = (topStart + topEnd + botStart + botEnd) / 4;\n // For trapezoidal segments, use full segment width\n availableWidth = Math.abs(leftEnd - leftStart) * 0.9;\n\n // Check if the segment has sufficient height for text\n // For non-last segments, we need to ensure there's enough vertical space\n const avgHeight = (topH + botH) / 2;\n if (avgHeight < 20) {\n availableWidth = 0;\n }\n }\n\n const pathD = `M${leftStart},${topStart}\n L${leftEnd},${botStart}\n L${leftEnd},${botEnd}\n L${leftStart},${topEnd}\n Z`;\n return { pathD, textX, textY, availableWidth };\n}\n\nexport function getSegmentTextProps({\n availableWidth,\n minTextWidth = 24,\n textX,\n textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n}: {\n availableWidth: number;\n minTextWidth?: number;\n textX: number;\n textY: number;\n value: number;\n culture: string | undefined;\n onMouseOver: (event: React.MouseEvent<SVGElement>) => void;\n onMouseMove: (event: React.MouseEvent<SVGElement>) => void;\n onMouseOut: () => void;\n}) {\n return {\n show: availableWidth > minTextWidth && availableWidth > 0,\n x: textX,\n y: textY,\n value,\n culture,\n onMouseOver,\n onMouseMove,\n onMouseOut,\n };\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./FunnelChart", "./FunnelChart.types"], function (require, exports, tslib_1, FunnelChart_1, FunnelChart_types_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(FunnelChart_1, exports);
|
|
5
|
+
tslib_1.__exportStar(FunnelChart_types_1, exports);
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/FunnelChart/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B;IAC9B,mDAAoC","sourcesContent":["export * from './FunnelChart';\nexport * from './FunnelChart.types';\n"]}
|
|
@@ -332,13 +332,11 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
|
|
|
332
332
|
this._classNames = getClassNames(this.props.styles, {
|
|
333
333
|
theme: this.props.theme,
|
|
334
334
|
className: this.props.className,
|
|
335
|
-
chartWidth: width,
|
|
336
|
-
chartHeight: height - this._legendsHeight,
|
|
337
335
|
chartValueSize: chartValueSize,
|
|
338
336
|
});
|
|
339
337
|
return (React.createElement("div", { className: this._classNames.root, ref: function (el) { return (_this._rootElem = el); } },
|
|
340
|
-
React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal },
|
|
341
|
-
React.createElement("svg", { className: this._classNames.chart, role: "region", "aria-label": this._getChartTitle(), onMouseLeave: this._handleMouseOut },
|
|
338
|
+
React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, className: this._classNames.chartWrapper },
|
|
339
|
+
React.createElement("svg", { className: this._classNames.chart, role: "region", "aria-label": this._getChartTitle(), onMouseLeave: this._handleMouseOut, width: width, height: height - this._legendsHeight },
|
|
342
340
|
React.createElement("g", { transform: "translate(".concat(width / 2, ", ").concat(height - (this._margins.bottom + this._legendsHeight), ")") },
|
|
343
341
|
this.props.chartTitle && (React.createElement("text", { x: 0, y: -(this._outerRadius + TITLE_OFFSET), textAnchor: "middle", className: this._classNames.chartTitle, "aria-hidden": true }, this.props.chartTitle)),
|
|
344
342
|
!this.props.hideMinMax && (React.createElement(React.Fragment, null,
|
|
@@ -454,7 +452,7 @@ define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib
|
|
|
454
452
|
Object.keys(subcounts_1).map(function (subcountName) {
|
|
455
453
|
return (React.createElement("div", { key: subcountName, className: _classNames.calloutBlockContainer },
|
|
456
454
|
React.createElement("div", { className: _classNames.calloutlegendText },
|
|
457
|
-
|
|
455
|
+
' ',
|
|
458
456
|
(0, chart_utilities_1.formatToLocaleString)(subcountName, culture)),
|
|
459
457
|
React.createElement("div", { className: _classNames.calloutContentY }, (0, chart_utilities_1.formatToLocaleString)(subcounts_1[subcountName], culture))));
|
|
460
458
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;IAgCA,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,YAAY,GAAG,CAAC,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,mBAAmB,GAAG,CAAC,CAA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Y,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number) => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n) => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartWidth: width,\n chartHeight: height - this._legendsHeight,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture)}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture);\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n )}\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}> {formatToLocaleString(subcountName, culture)}</div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture)}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GaugeChart.base.js","sourceRoot":"../src/","sources":["components/GaugeChart/GaugeChart.base.tsx"],"names":[],"mappings":";;;;IAgCA,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,YAAY,GAAG,CAAC,CAAC;IACvB,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAM,mBAAmB,GAAG,CAAC,CAAC;IACjB,QAAA,WAAW,GAAG,CAAC,CAAC;IAChB,QAAA,WAAW,GAAG;QACzB,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC7C,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9C,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9C,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC/C,CAAC;IAEF,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4C,CAAC;IAE9E,IAAM,kBAAkB,GAAG,UAAC,UAAkB,EAAE,QAAgB,EAAE,QAAgB;QACvF,IAAI,cAAc,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AAI,MAAM;4BACrB;oBACL,MAAM,CAAC,IAAI,CAAC,WAAS,CAAC,CAAC,GAAG,CAAC,UAAC,YAAoB;wBAC/C,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,qBAAqB;4BAClE,6BAAK,SAAS,EAAE,WAAW,CAAC,iBAAiB;gCAC1C,GAAG;gCACH,IAAA,sCAAoB,EAAC,YAAY,EAAE,OAAO,CAAoB,CAC3D;4BACN,6BAAK,SAAS,EAAE,WAAW,CAAC,eAAe,IACxC,IAAA,sCAAoB,EAAC,WAAS,CAAC,YAAY,CAAC,EAAE,OAAO,CAAoB,CACtE,CACF,CACP,CAAC;oBACJ,CAAC,CAAC,CACE,CACP,CAAC;YACJ,CAAC;QACH,CAAC;QAMH,qBAAC;IAAD,CAAC,AA/pBD,CAAoC,KAAK,CAAC,SAAS,GA+pBlD;IA/pBY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getId, getRTL, initializeComponentRef } from '@fluentui/react/lib/Utilities';\nimport {\n IGaugeChartProps,\n IGaugeChartSegment,\n IGaugeChartStyleProps,\n IGaugeChartStyles,\n GaugeValueFormat,\n GaugeChartVariant,\n} from './GaugeChart.types';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport {\n Points,\n areArraysEqual,\n formatScientificLimitWidth,\n getAccessibleDataObject,\n getColorFromToken,\n getNextColor,\n getNextGradient,\n pointTypes,\n} from '../../utilities/index';\nimport { ILegend, ILegendContainer, LegendShape, Legends, Shape } from '../Legends/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { IYValueHover } from '../../index';\nimport { SVGTooltipText } from '../../utilities/SVGTooltipText';\nimport { select as d3Select } from 'd3-selection';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst GAUGE_MARGIN = 16;\nconst LABEL_WIDTH = 36;\nconst LABEL_HEIGHT = 16;\nconst LABEL_OFFSET = 4;\nconst TITLE_OFFSET = 11;\nconst EXTRA_NEEDLE_LENGTH = 4;\nexport const ARC_PADDING = 2;\nexport const BREAKPOINTS = [\n { minRadius: 52, arcWidth: 12, fontSize: 20 },\n { minRadius: 70, arcWidth: 16, fontSize: 24 },\n { minRadius: 88, arcWidth: 20, fontSize: 32 },\n { minRadius: 106, arcWidth: 24, fontSize: 32 },\n { minRadius: 124, arcWidth: 28, fontSize: 40 },\n { minRadius: 142, arcWidth: 32, fontSize: 40 },\n];\n\nconst getClassNames = classNamesFunction<IGaugeChartStyleProps, IGaugeChartStyles>();\n\nexport const calcNeedleRotation = (chartValue: number, minValue: number, maxValue: number) => {\n let needleRotation = ((chartValue - minValue) / (maxValue - minValue)) * 180;\n if (needleRotation < 0) {\n needleRotation = 0;\n } else if (needleRotation > 180) {\n needleRotation = 180;\n }\n\n return needleRotation;\n};\n\nexport const getSegmentLabel = (\n segment: IExtendedSegment,\n minValue: number,\n maxValue: number,\n variant?: GaugeChartVariant,\n isAriaLabel: boolean = false,\n) => {\n if (isAriaLabel) {\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.legend}, ${segment.size} out of ${maxValue} or ${((segment.size / maxValue) * 100).toFixed()}%`\n : `${segment.legend}, ${segment.start} to ${segment.end}`;\n }\n\n return minValue === 0 && variant === GaugeChartVariant.SingleSegment\n ? `${segment.size} (${((segment.size / maxValue) * 100).toFixed()}%)`\n : `${segment.start} - ${segment.end}`;\n};\n\nexport const getChartValueLabel = (\n chartValue: number,\n minValue: number,\n maxValue: number,\n chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string),\n forCallout: boolean = false,\n): string => {\n if (forCallout) {\n // When displaying the chart value as a percentage, use fractions in the callout, and vice versa.\n // This helps clarify the actual value and avoid repetition.\n return minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${((chartValue / maxValue) * 100).toFixed()}%`\n : `${chartValue}/${maxValue}`;\n }\n\n return typeof chartValueFormat === 'function'\n ? chartValueFormat([chartValue - minValue, maxValue - minValue])\n : minValue !== 0\n ? chartValue.toString()\n : chartValueFormat === GaugeValueFormat.Fraction\n ? `${chartValue}/${maxValue}`\n : `${((chartValue / maxValue) * 100).toFixed()}%`;\n};\n\ninterface IYValue extends Omit<IYValueHover, 'y'> {\n y?: string | number;\n}\nexport interface IGaugeChartState {\n hoveredLegend: string;\n selectedLegends: string[];\n focusedElement?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutTarget: any;\n isCalloutVisible: boolean;\n hoverXValue: string | number;\n hoverYValues: IYValue[];\n width: number;\n height: number;\n}\nexport interface IExtendedSegment extends IGaugeChartSegment {\n start: number;\n end: number;\n}\n\nexport class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChartState> implements IChart {\n private _classNames: IProcessedStyleSet<IGaugeChartStyles>;\n private _isRTL: boolean;\n private _innerRadius: number;\n private _outerRadius: number;\n private _minValue: number;\n private _maxValue: number;\n private _segments: IExtendedSegment[];\n private _calloutAnchor: string;\n private _rootElem: HTMLDivElement | null;\n private _margins: { left: number; right: number; top: number; bottom: number };\n private _legendsHeight: number;\n private _legendsRef: React.RefObject<ILegendContainer>;\n\n constructor(props: IGaugeChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this._margins = this._getMargins();\n this._legendsHeight = !props.hideLegend ? 24 : 0;\n\n this.state = {\n hoveredLegend: '',\n selectedLegends: props.legendProps?.selectedLegends || [],\n focusedElement: '',\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n width: 140 + this._margins.left + this._margins.right,\n height: 70 + this._margins.top + this._margins.bottom + this._legendsHeight,\n };\n\n this._isRTL = getRTL(props.theme);\n this._calloutAnchor = '';\n this._legendsRef = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this._rootElem) {\n this.setState({\n width: this._rootElem.clientWidth,\n height: this._rootElem.clientHeight,\n });\n }\n }\n\n public componentDidUpdate(prevProps: IGaugeChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n }\n\n public render(): React.ReactNode {\n this._margins = this._getMargins();\n this._legendsHeight = !this.props.hideLegend ? 24 : 0;\n\n const width = this.props.width || this.state.width;\n const height = this.props.height || this.state.height;\n\n this._outerRadius = Math.min(\n (width - (this._margins.left + this._margins.right)) / 2,\n height - (this._margins.top + this._margins.bottom + this._legendsHeight),\n );\n\n const { arcWidth, chartValueSize } = this._getStylesBasedOnBreakpoint();\n this._innerRadius = this._outerRadius - arcWidth;\n\n const { arcs } = this._processProps();\n\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n className: this.props.className,\n chartValueSize,\n });\n\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg\n className={this._classNames.chart}\n role=\"region\"\n aria-label={this._getChartTitle()}\n onMouseLeave={this._handleMouseOut}\n width={width}\n height={height - this._legendsHeight}\n >\n <g transform={`translate(${width / 2}, ${height - (this._margins.bottom + this._legendsHeight)})`}>\n {this.props.chartTitle && (\n <text\n x={0}\n y={-(this._outerRadius + TITLE_OFFSET)}\n textAnchor=\"middle\"\n className={this._classNames.chartTitle}\n aria-hidden={true}\n >\n {this.props.chartTitle}\n </text>\n )}\n {!this.props.hideMinMax && (\n <>\n <text\n x={(this._isRTL ? 1 : -1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"end\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Min value: ${this._minValue}`}\n >\n {formatScientificLimitWidth(this._minValue)}\n </text>\n <text\n x={(this._isRTL ? -1 : 1) * (this._outerRadius + LABEL_OFFSET)}\n y={0}\n textAnchor=\"start\"\n className={this._classNames.limits}\n role=\"img\"\n aria-label={`Max value: ${this._maxValue}`}\n >\n {formatScientificLimitWidth(this._maxValue)}\n </text>\n </>\n )}\n {arcs.map((arc, index) => {\n const segment = this._segments[arc.segmentIndex];\n\n const clipId = getId('Arc_clip') + `${index}_${arc.startAngle}_${arc.endAngle}`;\n\n const arcClassNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n solidFill: this.props.enableGradient ? 'transparent' : segment.color!,\n gradientFill: `conic-gradient(\n from ${arc.startAngle}rad at 50% 100%,\n ${segment.gradient?.[0]},\n ${segment.gradient?.[1]} ${arc.endAngle - arc.startAngle}rad\n )`,\n opacity: this._legendHighlighted(segment.legend) || this._noLegendHighlighted() ? 1 : 0.1,\n });\n\n return (\n <React.Fragment key={index}>\n <path\n d={arc.d}\n strokeWidth={this.state.focusedElement === segment.legend ? ARC_PADDING : 0}\n className={arcClassNames.segment}\n {...getAccessibleDataObject(\n {\n ariaLabel: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant, true),\n ...segment.accessibilityData,\n },\n 'img',\n true,\n )}\n onFocus={e => this._handleFocus(e, segment.legend)}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, segment.legend)}\n onMouseMove={e => this._handleMouseOver(e, segment.legend)}\n data-is-focusable={this._legendHighlighted(segment.legend) || this._noLegendHighlighted()}\n />\n\n {this.props.enableGradient && (\n <>\n <clipPath id={clipId}>\n <path d={arc.d} />\n </clipPath>\n <foreignObject x=\"-50%\" y=\"-100%\" width=\"100%\" height=\"100%\" clipPath={`url(#${clipId})`}>\n <div className={arcClassNames.gradientSegment} />\n </foreignObject>\n </>\n )}\n </React.Fragment>\n );\n })}\n {this._renderNeedle()}\n <g\n onMouseEnter={e => this._handleMouseOver(e, 'Chart value')}\n onMouseMove={e => this._handleMouseOver(e, 'Chart value')}\n >\n <SVGTooltipText\n content={getChartValueLabel(\n this.props.chartValue,\n this._minValue,\n this._maxValue,\n this.props.chartValueFormat,\n )}\n textProps={{\n x: 0,\n y: 0,\n textAnchor: 'middle',\n className: this._classNames.chartValue,\n 'aria-hidden': 'true',\n }}\n maxWidth={this._innerRadius * 2 - 24}\n wrapContent={this._wrapContent}\n />\n </g>\n {this.props.sublabel && (\n <SVGTooltipText\n content={this.props.sublabel}\n textProps={{\n x: 0,\n y: 4,\n textAnchor: 'middle',\n dominantBaseline: 'hanging',\n className: this._classNames.sublabel,\n }}\n maxWidth={this._innerRadius * 2}\n wrapContent={this._wrapContent}\n />\n )}\n </g>\n </svg>\n </FocusZone>\n {this._renderLegends()}\n {!this.props.hideTooltip && this.state.isCalloutVisible && (\n <Callout\n target={this.state.calloutTarget}\n directionalHint={DirectionalHint.topAutoEdge}\n gapSpace={15}\n isBeakVisible={false}\n onDismiss={this._handleCalloutDismiss}\n {...this.props.calloutProps}\n >\n {this._multiValueCallout({\n hoverXValue: this.state.hoverXValue,\n YValueHover: this.state.hoverYValues,\n })}\n </Callout>\n )}\n </div>\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._rootElem;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._rootElem, this._legendsRef.current?.toSVG, this._isRTL, opts);\n };\n\n private _getMargins = () => {\n const { hideMinMax, chartTitle, sublabel } = this.props;\n\n return {\n left: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n right: (!hideMinMax ? LABEL_OFFSET + LABEL_WIDTH : 0) + GAUGE_MARGIN,\n top: (chartTitle ? TITLE_OFFSET + LABEL_HEIGHT : EXTRA_NEEDLE_LENGTH / 2) + GAUGE_MARGIN,\n bottom: (sublabel ? LABEL_OFFSET + LABEL_HEIGHT : 0) + GAUGE_MARGIN,\n };\n };\n\n private _getStylesBasedOnBreakpoint = () => {\n for (let index = BREAKPOINTS.length - 1; index >= 0; index -= 1) {\n if (this._outerRadius >= BREAKPOINTS[index].minRadius) {\n return {\n arcWidth: BREAKPOINTS[index].arcWidth,\n chartValueSize: BREAKPOINTS[index].fontSize,\n };\n }\n }\n return {\n arcWidth: BREAKPOINTS[0].arcWidth,\n chartValueSize: BREAKPOINTS[0].fontSize,\n };\n };\n\n private _processProps = () => {\n const { minValue = 0, maxValue, theme } = this.props;\n\n let total = minValue;\n const segments: IExtendedSegment[] = this.props.segments.map((segment, index) => {\n const size = Math.max(segment.size, 0);\n total += size;\n return {\n legend: segment.legend,\n size,\n color:\n typeof segment.color !== 'undefined'\n ? getColorFromToken(segment.color, theme!.isInverted)\n : getNextColor(index, 0, theme!.isInverted),\n gradient: segment.gradient ?? getNextGradient(index, 0, theme!.isInverted),\n accessibilityData: segment.accessibilityData,\n start: total - size,\n end: total,\n };\n });\n if (typeof maxValue !== 'undefined' && total < maxValue) {\n segments.push({\n legend: 'Unknown',\n size: maxValue - total,\n color: theme!.palette.neutralLight,\n start: total,\n end: maxValue,\n });\n total = maxValue;\n }\n\n const arcGenerator = d3Arc()\n .cornerRadius(this.props.roundCorners ? 3 : 0)\n .padAngle(ARC_PADDING / this._outerRadius)\n .padRadius(this._outerRadius);\n const rtlSafeSegments = this._isRTL ? Array.from(segments).reverse() : segments;\n let prevAngle = -Math.PI / 2;\n const arcs = rtlSafeSegments.map((segment, index) => {\n const endAngle = prevAngle + (segment.size / (total - minValue)) * Math.PI;\n const d = arcGenerator({\n innerRadius: this._innerRadius,\n outerRadius: this._outerRadius,\n startAngle: prevAngle,\n endAngle,\n })!;\n prevAngle = endAngle;\n return {\n d,\n segmentIndex: this._isRTL ? segments.length - 1 - index : index,\n startAngle: prevAngle - (segment.size / (total - minValue)) * Math.PI,\n endAngle,\n };\n });\n\n this._minValue = minValue;\n this._maxValue = total;\n this._segments = segments;\n\n return {\n arcs,\n };\n };\n\n private _renderNeedle = () => {\n const needleRotation = calcNeedleRotation(this.props.chartValue, this._minValue, this._maxValue);\n const rtlSafeNeedleRotation = this._isRTL ? 180 - needleRotation : needleRotation;\n const strokeWidth = 2;\n const halfStrokeWidth = strokeWidth / 2;\n const needleLength = this._outerRadius - this._innerRadius + EXTRA_NEEDLE_LENGTH;\n\n return (\n <g transform={`rotate(${rtlSafeNeedleRotation}, 0, 0)`}>\n <path\n d={`\n M 0,${-halfStrokeWidth - 3}\n L ${-needleLength},${-halfStrokeWidth - 1}\n A ${halfStrokeWidth + 1},${halfStrokeWidth + 1},0,0,0,${-needleLength},${halfStrokeWidth + 1}\n L 0,${halfStrokeWidth + 3}\n A ${halfStrokeWidth + 3},${halfStrokeWidth + 3},0,0,0,0,${-halfStrokeWidth - 3}\n `}\n strokeWidth={strokeWidth}\n className={this._classNames.needle}\n transform={`translate(${-this._innerRadius + EXTRA_NEEDLE_LENGTH / 2})`}\n data-is-focusable={true}\n onFocus={e => this._handleFocus(e, 'Needle')}\n onBlur={this._handleBlur}\n onMouseEnter={e => this._handleMouseOver(e, 'Needle')}\n onMouseMove={e => this._handleMouseOver(e, 'Needle')}\n role=\"img\"\n aria-label={\n 'Current value: ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat)\n }\n />\n </g>\n );\n };\n\n private _renderLegends = () => {\n if (this.props.hideLegend) {\n return null;\n }\n\n const legends: ILegend[] = this._segments.map((segment, index) => {\n const color: string = this.props.enableGradient\n ? segment.gradient?.[0] || getNextGradient(index, 0, this.props.theme!.isInverted)[0]\n : segment.color || getNextColor(index, 0, this.props.theme!.isInverted);\n\n return {\n title: segment.legend,\n color,\n hoverAction: () => {\n this.setState({ hoveredLegend: segment.legend });\n },\n onMouseOutAction: () => {\n this.setState({ hoveredLegend: '' });\n },\n };\n });\n\n return (\n <div className={this._classNames.legendsContainer}>\n <Legends\n legends={legends}\n centerLegends\n {...this.props.legendProps}\n // eslint-disable-next-line react/jsx-no-bind\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n </div>\n );\n };\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legend: string) => {\n return this._getHighlightedLegend().includes(legend!);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.hoveredLegend\n ? [this.state.hoveredLegend]\n : [];\n }\n\n private _handleFocus = (focusEvent: React.FocusEvent<SVGElement>, focusedElement: string) => {\n this._showCallout(focusEvent.target, focusedElement, true);\n };\n\n private _handleBlur = () => {\n this._hideCallout(true);\n };\n\n private _handleMouseOver = (mouseEvent: React.MouseEvent<SVGElement>, hoveredElement: string) => {\n this._showCallout(mouseEvent.target, hoveredElement, false);\n };\n\n private _handleMouseOut = () => {\n this._hideCallout(false);\n };\n\n private _handleCalloutDismiss = () => {\n this._hideCallout(false);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _showCallout = (target: any, legend: string, isFocusEvent: boolean) => {\n if (this._calloutAnchor === legend) {\n return;\n }\n\n this._calloutAnchor = legend;\n const hoverXValue: string =\n 'Current value is ' +\n getChartValueLabel(this.props.chartValue, this._minValue, this._maxValue, this.props.chartValueFormat, true);\n const hoverYValues: IYValue[] = this._segments.map(segment => {\n const yValue: IYValue = {\n legend: segment.legend,\n y: getSegmentLabel(segment, this._minValue, this._maxValue, this.props.variant),\n color: this.props.enableGradient ? segment.gradient?.[0] : segment.color,\n };\n return yValue;\n });\n this.setState({\n calloutTarget: target,\n /** Show the callout if highlighted arc is hovered/focused and Hide it if unhighlighted arc is hovered/focused */\n isCalloutVisible:\n ['Needle', 'Chart value'].includes(legend) || this._noLegendHighlighted() || this._legendHighlighted(legend),\n hoverXValue,\n hoverYValues,\n ...(isFocusEvent ? { focusedElement: legend } : {}),\n });\n };\n\n private _hideCallout = (isBlurEvent?: boolean) => {\n this._calloutAnchor = '';\n this.setState({\n calloutTarget: null,\n isCalloutVisible: false,\n hoverXValue: '',\n hoverYValues: [],\n ...(isBlurEvent ? { focusedElement: '' } : {}),\n });\n };\n\n private _wrapContent = (content: string, id: string, maxWidth: number) => {\n const textElement = d3Select<SVGTextElement, {}>(`#${id}`);\n textElement.text(content);\n if (!textElement.node()) {\n return false;\n }\n\n let isOverflowing = false;\n let textLength = textElement.node()!.getComputedTextLength();\n while (textLength > maxWidth && content.length > 0) {\n content = content.slice(0, -1);\n textElement.text(content + '...');\n isOverflowing = true;\n textLength = textElement.node()!.getComputedTextLength();\n }\n return isOverflowing;\n };\n\n // TO DO: Write a common functional component for Multi value callout and divide sub count method\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _multiValueCallout = (calloutProps: any) => {\n const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover);\n return (\n <div className={this._classNames.calloutContentRoot}>\n <div\n className={this._classNames.calloutDateTimeContainer}\n style={yValueHoverSubCountsExists ? { marginBottom: '11px' } : {}}\n >\n <div\n className={this._classNames.calloutContentX}\n {...getAccessibleDataObject(calloutProps!.xAxisCalloutAccessibilityData, 'text', false)}\n >\n {formatToLocaleString(calloutProps!.hoverXValue, this.props.culture) as React.ReactNode}\n </div>\n </div>\n <div\n className={this._classNames.calloutInfoContainer}\n style={yValueHoverSubCountsExists ? { display: 'flex' } : {}}\n >\n {calloutProps!.YValueHover &&\n calloutProps!.YValueHover.map((yValue: IYValueHover, index: number, yValues: IYValueHover[]) => {\n const isLast: boolean = index + 1 === yValues.length;\n const { shouldDrawBorderBottom = false } = yValue;\n return (\n <div\n {...getAccessibleDataObject(yValue.callOutAccessibilityData, 'text', false)}\n key={`callout-content-${index}`}\n style={\n yValueHoverSubCountsExists\n ? {\n display: 'inline-block',\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n : {\n ...(shouldDrawBorderBottom && {\n borderBottom: `1px solid ${this.props.theme!.semanticColors.menuDivider}`,\n paddingBottom: '10px',\n }),\n }\n }\n >\n {this._getCalloutContent(yValue, index, yValueHoverSubCountsExists, isLast)}\n </div>\n );\n })}\n {!!calloutProps.descriptionMessage && (\n <div className={this._classNames.descriptionMessage}>{calloutProps.descriptionMessage}</div>\n )}\n </div>\n </div>\n );\n };\n\n private _yValueHoverSubCountsExists(yValueHover?: IYValueHover[]) {\n if (yValueHover) {\n return yValueHover.some(\n (yValue: {\n legend?: string;\n y?: number;\n color?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n }) => yValue.yAxisCalloutData && typeof yValue.yAxisCalloutData !== 'string',\n );\n }\n return false;\n }\n\n private _getCalloutContent(\n xValue: IYValueHover,\n index: number,\n yValueHoverSubCountsExists: boolean,\n isLast: boolean,\n ): React.ReactNode {\n const marginStyle: React.CSSProperties = isLast ? {} : { marginRight: '16px' };\n const toDrawShape = xValue.index !== undefined && xValue.index !== -1;\n const _classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n lineColor: xValue.color,\n toDrawShape,\n });\n\n const { culture } = this.props;\n const yValue = formatToLocaleString(xValue.y, culture) as React.ReactNode;\n if (!xValue.yAxisCalloutData || typeof xValue.yAxisCalloutData === 'string') {\n return (\n <div style={yValueHoverSubCountsExists ? marginStyle : {}}>\n {yValueHoverSubCountsExists && (\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n )}\n <div id={`${index}_${xValue.y}`} className={_classNames.calloutBlockContainer}>\n {toDrawShape && (\n <Shape\n svgProps={{\n className: _classNames.shapeStyles,\n }}\n pathProps={{ fill: xValue.color }}\n shape={Points[xValue.index! % Object.keys(pointTypes).length] as LegendShape}\n />\n )}\n <div>\n <div className={_classNames.calloutlegendText}> {xValue.legend}</div>\n <div className={_classNames.calloutContentY}>\n {\n formatToLocaleString(\n xValue.yAxisCalloutData ? xValue.yAxisCalloutData : xValue.y || xValue.data,\n culture,\n ) as React.ReactNode\n }\n </div>\n </div>\n </div>\n </div>\n );\n } else {\n const subcounts: { [id: string]: number } = xValue.yAxisCalloutData as { [id: string]: number };\n return (\n <div style={marginStyle}>\n <div className=\"ms-fontWeight-semibold\" style={{ fontSize: '12pt' }}>\n {xValue.legend!} ({yValue})\n </div>\n {Object.keys(subcounts).map((subcountName: string) => {\n return (\n <div key={subcountName} className={_classNames.calloutBlockContainer}>\n <div className={_classNames.calloutlegendText}>\n {' '}\n {formatToLocaleString(subcountName, culture) as React.ReactNode}\n </div>\n <div className={_classNames.calloutContentY}>\n {formatToLocaleString(subcounts[subcountName], culture) as React.ReactNode}\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle } = this.props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Gauge chart with ${this._segments.length} segments. `;\n };\n}\n"]}
|
|
@@ -4,7 +4,7 @@ define(["require", "exports", "tslib", "@fluentui/react"], function (require, ex
|
|
|
4
4
|
exports.getStyles = void 0;
|
|
5
5
|
var getStyles = function (props) {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7
|
-
var theme = props.theme, chartValueSize = props.chartValueSize,
|
|
7
|
+
var theme = props.theme, chartValueSize = props.chartValueSize, className = props.className, lineColor = props.lineColor, toDrawShape = props.toDrawShape, solidFill = props.solidFill, gradientFill = props.gradientFill, opacity = props.opacity;
|
|
8
8
|
return {
|
|
9
9
|
root: [
|
|
10
10
|
theme.fonts.medium,
|
|
@@ -20,8 +20,6 @@ define(["require", "exports", "tslib", "@fluentui/react"], function (require, ex
|
|
|
20
20
|
],
|
|
21
21
|
chart: {
|
|
22
22
|
display: 'block',
|
|
23
|
-
width: chartWidth,
|
|
24
|
-
height: chartHeight,
|
|
25
23
|
},
|
|
26
24
|
limits: {
|
|
27
25
|
fontSize: react_1.FontSizes.small,
|
|
@@ -79,7 +77,7 @@ define(["require", "exports", "tslib", "@fluentui/react"], function (require, ex
|
|
|
79
77
|
opacity: opacity,
|
|
80
78
|
},
|
|
81
79
|
legendsContainer: {
|
|
82
|
-
width:
|
|
80
|
+
width: '100%',
|
|
83
81
|
},
|
|
84
82
|
calloutContentRoot: [
|
|
85
83
|
{
|