@fluentui/react-charting 5.21.28 → 5.21.29
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 +22 -1
- package/CHANGELOG.md +12 -2
- package/dist/react-charting.js +1 -0
- package/dist/react-charting.min.js +1 -0
- package/lib/AreaChart.js.map +1 -1
- package/lib/CartesianChart.js.map +1 -1
- package/lib/DonutChart.js.map +1 -1
- package/lib/GaugeChart.js.map +1 -1
- package/lib/GroupedVerticalBarChart.js.map +1 -1
- package/lib/HeatMapChart.js.map +1 -1
- package/lib/HorizontalBarChart.js.map +1 -1
- package/lib/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/Legends.js.map +1 -1
- package/lib/LineChart.js.map +1 -1
- package/lib/PieChart.js.map +1 -1
- package/lib/SankeyChart.js.map +1 -1
- package/lib/Sparkline.js.map +1 -1
- package/lib/StackedBarChart.js.map +1 -1
- package/lib/Styling.js.map +1 -1
- package/lib/TreeChart.js.map +1 -1
- package/lib/Utilities.js.map +1 -1
- package/lib/VerticalBarChart.js.map +1 -1
- package/lib/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.styles.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
- package/lib/components/AreaChart/index.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib/components/DonutChart/Arc/index.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.styles.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/index.js.map +1 -1
- package/lib/components/DonutChart/index.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GaugeChart/index.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HeatMapChart/index.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChart/index.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/Legends.styles.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/Legends/index.js.map +1 -1
- package/lib/components/Legends/shape.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.styles.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/LineChart/index.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.styles.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.types.js.map +1 -1
- package/lib/components/PieChart/Arc/index.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.styles.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.types.js.map +1 -1
- package/lib/components/PieChart/Pie/index.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/PieChart/PieChart.js.map +1 -1
- package/lib/components/PieChart/PieChart.styles.js.map +1 -1
- package/lib/components/PieChart/PieChart.types.js.map +1 -1
- package/lib/components/PieChart/index.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/SankeyChart/index.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.styles.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
- package/lib/components/Sparkline/index.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/index.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.styles.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.types.js.map +1 -1
- package/lib/components/TreeChart/index.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib/components/VerticalBarChart/index.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/types/IEventAnnotation.js.map +1 -1
- package/lib/types/ILegendDataItem.js.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -1
- package/lib/utilities/ChartHoverCard/index.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/colors.js.map +1 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/locale-util.js.map +1 -1
- package/lib/utilities/test-data.js.map +1 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/AreaChart.d.ts +1 -0
- package/lib-amd/AreaChart.js +6 -0
- package/lib-amd/AreaChart.js.map +1 -0
- package/lib-amd/CartesianChart.d.ts +1 -0
- package/lib-amd/CartesianChart.js +6 -0
- package/lib-amd/CartesianChart.js.map +1 -0
- package/lib-amd/DonutChart.d.ts +1 -0
- package/lib-amd/DonutChart.js +6 -0
- package/lib-amd/DonutChart.js.map +1 -0
- package/lib-amd/GaugeChart.d.ts +1 -0
- package/lib-amd/GaugeChart.js +6 -0
- package/lib-amd/GaugeChart.js.map +1 -0
- package/lib-amd/GroupedVerticalBarChart.d.ts +1 -0
- package/lib-amd/GroupedVerticalBarChart.js +6 -0
- package/lib-amd/GroupedVerticalBarChart.js.map +1 -0
- package/lib-amd/HeatMapChart.d.ts +1 -0
- package/lib-amd/HeatMapChart.js +6 -0
- package/lib-amd/HeatMapChart.js.map +1 -0
- package/lib-amd/HorizontalBarChart.d.ts +1 -0
- package/lib-amd/HorizontalBarChart.js +6 -0
- package/lib-amd/HorizontalBarChart.js.map +1 -0
- package/lib-amd/HorizontalBarChartWithAxis.d.ts +1 -0
- package/lib-amd/HorizontalBarChartWithAxis.js +6 -0
- package/lib-amd/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-amd/Legends.d.ts +1 -0
- package/lib-amd/Legends.js +6 -0
- package/lib-amd/Legends.js.map +1 -0
- package/lib-amd/LineChart.d.ts +1 -0
- package/lib-amd/LineChart.js +6 -0
- package/lib-amd/LineChart.js.map +1 -0
- package/lib-amd/PieChart.d.ts +1 -0
- package/lib-amd/PieChart.js +6 -0
- package/lib-amd/PieChart.js.map +1 -0
- package/lib-amd/SankeyChart.d.ts +1 -0
- package/lib-amd/SankeyChart.js +6 -0
- package/lib-amd/SankeyChart.js.map +1 -0
- package/lib-amd/Sparkline.d.ts +1 -0
- package/lib-amd/Sparkline.js +6 -0
- package/lib-amd/Sparkline.js.map +1 -0
- package/lib-amd/StackedBarChart.d.ts +1 -0
- package/lib-amd/StackedBarChart.js +6 -0
- package/lib-amd/StackedBarChart.js.map +1 -0
- package/lib-amd/Styling.d.ts +2 -0
- package/lib-amd/Styling.js +75 -0
- package/lib-amd/Styling.js.map +1 -0
- package/lib-amd/TreeChart.d.ts +1 -0
- package/lib-amd/TreeChart.js +6 -0
- package/lib-amd/TreeChart.js.map +1 -0
- package/lib-amd/Utilities.d.ts +2 -0
- package/lib-amd/Utilities.js +183 -0
- package/lib-amd/Utilities.js.map +1 -0
- package/lib-amd/VerticalBarChart.d.ts +1 -0
- package/lib-amd/VerticalBarChart.js +6 -0
- package/lib-amd/VerticalBarChart.js.map +1 -0
- package/lib-amd/VerticalStackedBarChart.d.ts +1 -0
- package/lib-amd/VerticalStackedBarChart.js +6 -0
- package/lib-amd/VerticalStackedBarChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +103 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +652 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.d.ts +7 -0
- package/lib-amd/components/AreaChart/AreaChart.js +12 -0
- package/lib-amd/components/AreaChart/AreaChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.styles.d.ts +2 -0
- package/lib-amd/components/AreaChart/AreaChart.styles.js +12 -0
- package/lib-amd/components/AreaChart/AreaChart.styles.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.types.d.ts +59 -0
- package/lib-amd/components/AreaChart/AreaChart.types.js +5 -0
- package/lib-amd/components/AreaChart/AreaChart.types.js.map +1 -0
- package/lib-amd/components/AreaChart/index.d.ts +2 -0
- package/lib-amd/components/AreaChart/index.js +7 -0
- package/lib-amd/components/AreaChart/index.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +62 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +593 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.d.ts +7 -0
- package/lib-amd/components/CommonComponents/CartesianChart.js +11 -0
- package/lib-amd/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.styles.d.ts +2 -0
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +180 -0
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +528 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.js +5 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib-amd/components/CommonComponents/index.d.ts +2 -0
- package/lib-amd/components/CommonComponents/index.js +7 -0
- package/lib-amd/components/CommonComponents/index.js.map +1 -0
- package/lib-amd/components/DonutChart/Arc/Arc.d.ts +21 -0
- package/lib-amd/components/DonutChart/Arc/Arc.js +88 -0
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib-amd/components/DonutChart/Arc/Arc.styles.d.ts +2 -0
- package/lib-amd/components/DonutChart/Arc/Arc.styles.js +33 -0
- package/lib-amd/components/DonutChart/Arc/Arc.styles.js.map +1 -0
- package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +124 -0
- package/lib-amd/components/DonutChart/Arc/Arc.types.js +5 -0
- package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib-amd/components/DonutChart/Arc/index.d.ts +2 -0
- package/lib-amd/components/DonutChart/Arc/index.js +7 -0
- package/lib-amd/components/DonutChart/Arc/index.js.map +1 -0
- package/lib-amd/components/DonutChart/DonutChart.base.d.ts +54 -0
- package/lib-amd/components/DonutChart/DonutChart.base.js +241 -0
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -0
- package/lib-amd/components/DonutChart/DonutChart.d.ts +7 -0
- package/lib-amd/components/DonutChart/DonutChart.js +12 -0
- package/lib-amd/components/DonutChart/DonutChart.js.map +1 -0
- package/lib-amd/components/DonutChart/DonutChart.styles.d.ts +2 -0
- package/lib-amd/components/DonutChart/DonutChart.styles.js +36 -0
- package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -0
- package/lib-amd/components/DonutChart/DonutChart.types.d.ts +75 -0
- package/lib-amd/components/DonutChart/DonutChart.types.js +5 -0
- package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib-amd/components/DonutChart/Pie/Pie.d.ts +15 -0
- package/lib-amd/components/DonutChart/Pie/Pie.js +67 -0
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib-amd/components/DonutChart/Pie/Pie.styles.d.ts +2 -0
- package/lib-amd/components/DonutChart/Pie/Pie.styles.js +24 -0
- package/lib-amd/components/DonutChart/Pie/Pie.styles.js.map +1 -0
- package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +96 -0
- package/lib-amd/components/DonutChart/Pie/Pie.types.js +5 -0
- package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib-amd/components/DonutChart/Pie/index.d.ts +2 -0
- package/lib-amd/components/DonutChart/Pie/index.js +7 -0
- package/lib-amd/components/DonutChart/Pie/index.js.map +1 -0
- package/lib-amd/components/DonutChart/index.d.ts +3 -0
- package/lib-amd/components/DonutChart/index.js +8 -0
- package/lib-amd/components/DonutChart/index.js.map +1 -0
- package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +75 -0
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +410 -0
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -0
- package/lib-amd/components/GaugeChart/GaugeChart.d.ts +7 -0
- package/lib-amd/components/GaugeChart/GaugeChart.js +11 -0
- package/lib-amd/components/GaugeChart/GaugeChart.js.map +1 -0
- package/lib-amd/components/GaugeChart/GaugeChart.styles.d.ts +2 -0
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js +122 -0
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +238 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.js +22 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -0
- package/lib-amd/components/GaugeChart/index.d.ts +2 -0
- package/lib-amd/components/GaugeChart/index.js +7 -0
- package/lib-amd/components/GaugeChart/index.js.map +1 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +72 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +425 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.d.ts +7 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +12 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.d.ts +2 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js +21 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +111 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +5 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
- package/lib-amd/components/GroupedVerticalBarChart/index.d.ts +2 -0
- package/lib-amd/components/GroupedVerticalBarChart/index.js +7 -0
- package/lib-amd/components/GroupedVerticalBarChart/index.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +152 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +538 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.d.ts +7 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.js +11 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.styles.d.ts +2 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js +29 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +122 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.js +5 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
- package/lib-amd/components/HeatMapChart/index.d.ts +2 -0
- package/lib-amd/components/HeatMapChart/index.js +7 -0
- package/lib-amd/components/HeatMapChart/index.js.map +1 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.d.ts +47 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +270 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.d.ts +7 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js +12 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.d.ts +2 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js +69 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +188 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js +14 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib-amd/components/HorizontalBarChart/index.d.ts +3 -0
- package/lib-amd/components/HorizontalBarChart/index.js +8 -0
- package/lib-amd/components/HorizontalBarChart/index.js.map +1 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +61 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +499 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.d.ts +7 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +12 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.d.ts +2 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +17 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +112 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +5 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/index.d.ts +2 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/index.js +7 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/index.js.map +1 -0
- package/lib-amd/components/Legends/Legends.base.d.ts +43 -0
- package/lib-amd/components/Legends/Legends.base.js +308 -0
- package/lib-amd/components/Legends/Legends.base.js.map +1 -0
- package/lib-amd/components/Legends/Legends.d.ts +7 -0
- package/lib-amd/components/Legends/Legends.js +11 -0
- package/lib-amd/components/Legends/Legends.js.map +1 -0
- package/lib-amd/components/Legends/Legends.styles.d.ts +2 -0
- package/lib-amd/components/Legends/Legends.styles.js +111 -0
- package/lib-amd/components/Legends/Legends.styles.js.map +1 -0
- package/lib-amd/components/Legends/Legends.types.d.ts +210 -0
- package/lib-amd/components/Legends/Legends.types.js +5 -0
- package/lib-amd/components/Legends/Legends.types.js.map +1 -0
- package/lib-amd/components/Legends/index.d.ts +3 -0
- package/lib-amd/components/Legends/index.js +8 -0
- package/lib-amd/components/Legends/index.js.map +1 -0
- package/lib-amd/components/Legends/shape.d.ts +9 -0
- package/lib-amd/components/Legends/shape.js +27 -0
- package/lib-amd/components/Legends/shape.js.map +1 -0
- package/lib-amd/components/LineChart/LineChart.base.d.ts +92 -0
- package/lib-amd/components/LineChart/LineChart.base.js +861 -0
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -0
- package/lib-amd/components/LineChart/LineChart.d.ts +7 -0
- package/lib-amd/components/LineChart/LineChart.js +12 -0
- package/lib-amd/components/LineChart/LineChart.js.map +1 -0
- package/lib-amd/components/LineChart/LineChart.styles.d.ts +2 -0
- package/lib-amd/components/LineChart/LineChart.styles.js +12 -0
- package/lib-amd/components/LineChart/LineChart.styles.js.map +1 -0
- package/lib-amd/components/LineChart/LineChart.types.d.ts +98 -0
- package/lib-amd/components/LineChart/LineChart.types.js +5 -0
- package/lib-amd/components/LineChart/LineChart.types.js.map +1 -0
- package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.d.ts +12 -0
- package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js +97 -0
- package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib-amd/components/LineChart/eventAnnotation/LabelLink.d.ts +24 -0
- package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js +42 -0
- package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.d.ts +13 -0
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.js +40 -0
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib-amd/components/LineChart/index.d.ts +3 -0
- package/lib-amd/components/LineChart/index.js +8 -0
- package/lib-amd/components/LineChart/index.js.map +1 -0
- package/lib-amd/components/PieChart/Arc/Arc.d.ts +17 -0
- package/lib-amd/components/PieChart/Arc/Arc.js +85 -0
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -0
- package/lib-amd/components/PieChart/Arc/Arc.styles.d.ts +3 -0
- package/lib-amd/components/PieChart/Arc/Arc.styles.js +16 -0
- package/lib-amd/components/PieChart/Arc/Arc.styles.js.map +1 -0
- package/lib-amd/components/PieChart/Arc/Arc.types.d.ts +73 -0
- package/lib-amd/components/PieChart/Arc/Arc.types.js +5 -0
- package/lib-amd/components/PieChart/Arc/Arc.types.js.map +1 -0
- package/lib-amd/components/PieChart/Arc/index.d.ts +2 -0
- package/lib-amd/components/PieChart/Arc/index.js +7 -0
- package/lib-amd/components/PieChart/Arc/index.js.map +1 -0
- package/lib-amd/components/PieChart/Pie/Pie.d.ts +10 -0
- package/lib-amd/components/PieChart/Pie/Pie.js +43 -0
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -0
- package/lib-amd/components/PieChart/Pie/Pie.styles.d.ts +2 -0
- package/lib-amd/components/PieChart/Pie/Pie.styles.js +12 -0
- package/lib-amd/components/PieChart/Pie/Pie.styles.js.map +1 -0
- package/lib-amd/components/PieChart/Pie/Pie.types.d.ts +47 -0
- package/lib-amd/components/PieChart/Pie/Pie.types.js +5 -0
- package/lib-amd/components/PieChart/Pie/Pie.types.js.map +1 -0
- package/lib-amd/components/PieChart/Pie/index.d.ts +2 -0
- package/lib-amd/components/PieChart/Pie/index.js +7 -0
- package/lib-amd/components/PieChart/Pie/index.js.map +1 -0
- package/lib-amd/components/PieChart/PieChart.base.d.ts +10 -0
- package/lib-amd/components/PieChart/PieChart.base.js +46 -0
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -0
- package/lib-amd/components/PieChart/PieChart.d.ts +7 -0
- package/lib-amd/components/PieChart/PieChart.js +12 -0
- package/lib-amd/components/PieChart/PieChart.js.map +1 -0
- package/lib-amd/components/PieChart/PieChart.styles.d.ts +2 -0
- package/lib-amd/components/PieChart/PieChart.styles.js +34 -0
- package/lib-amd/components/PieChart/PieChart.styles.js.map +1 -0
- package/lib-amd/components/PieChart/PieChart.types.d.ts +75 -0
- package/lib-amd/components/PieChart/PieChart.types.js +5 -0
- package/lib-amd/components/PieChart/PieChart.types.js.map +1 -0
- package/lib-amd/components/PieChart/index.d.ts +2 -0
- package/lib-amd/components/PieChart/index.js +7 -0
- package/lib-amd/components/PieChart/index.js.map +1 -0
- package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +90 -0
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +930 -0
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -0
- package/lib-amd/components/SankeyChart/SankeyChart.d.ts +7 -0
- package/lib-amd/components/SankeyChart/SankeyChart.js +12 -0
- package/lib-amd/components/SankeyChart/SankeyChart.js.map +1 -0
- package/lib-amd/components/SankeyChart/SankeyChart.styles.d.ts +2 -0
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js +65 -0
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -0
- package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +146 -0
- package/lib-amd/components/SankeyChart/SankeyChart.types.js +5 -0
- package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -0
- package/lib-amd/components/SankeyChart/index.d.ts +2 -0
- package/lib-amd/components/SankeyChart/index.js +7 -0
- package/lib-amd/components/SankeyChart/index.js.map +1 -0
- package/lib-amd/components/Sparkline/Sparkline.base.d.ts +23 -0
- package/lib-amd/components/Sparkline/Sparkline.base.js +84 -0
- package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -0
- package/lib-amd/components/Sparkline/Sparkline.d.ts +7 -0
- package/lib-amd/components/Sparkline/Sparkline.js +12 -0
- package/lib-amd/components/Sparkline/Sparkline.js.map +1 -0
- package/lib-amd/components/Sparkline/Sparkline.styles.d.ts +2 -0
- package/lib-amd/components/Sparkline/Sparkline.styles.js +15 -0
- package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -0
- package/lib-amd/components/Sparkline/Sparkline.types.d.ts +59 -0
- package/lib-amd/components/Sparkline/Sparkline.types.js +5 -0
- package/lib-amd/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib-amd/components/Sparkline/index.d.ts +2 -0
- package/lib-amd/components/Sparkline/index.js +7 -0
- package/lib-amd/components/Sparkline/index.js.map +1 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +70 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +412 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.d.ts +7 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js +12 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.js.map +1 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.d.ts +2 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js +89 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +213 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js +14 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.d.ts +63 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +349 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.d.ts +7 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.js +12 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.js.map +1 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.styles.d.ts +2 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js +107 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.styles.js.map +1 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +222 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.types.js +5 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -0
- package/lib-amd/components/StackedBarChart/index.d.ts +5 -0
- package/lib-amd/components/StackedBarChart/index.js +10 -0
- package/lib-amd/components/StackedBarChart/index.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
- package/lib-amd/components/TreeChart/TreeChart.base.js +320 -0
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.d.ts +7 -0
- package/lib-amd/components/TreeChart/TreeChart.js +11 -0
- package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.js +34 -0
- package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
- package/lib-amd/components/TreeChart/TreeChart.types.d.ts +216 -0
- package/lib-amd/components/TreeChart/TreeChart.types.js +34 -0
- package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
- package/lib-amd/components/TreeChart/index.d.ts +2 -0
- package/lib-amd/components/TreeChart/index.js +7 -0
- package/lib-amd/components/TreeChart/index.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +84 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +738 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.d.ts +7 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.js +12 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.d.ts +2 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js +32 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +145 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js +5 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/index.d.ts +2 -0
- package/lib-amd/components/VerticalBarChart/index.js +7 -0
- package/lib-amd/components/VerticalBarChart/index.js.map +1 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +92 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +754 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.d.ts +7 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.d.ts +2 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js +22 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +172 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +5 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
- package/lib-amd/components/VerticalStackedBarChart/index.d.ts +2 -0
- package/lib-amd/components/VerticalStackedBarChart/index.js +7 -0
- package/lib-amd/components/VerticalStackedBarChart/index.js.map +1 -0
- package/lib-amd/index.d.ts +21 -0
- package/lib-amd/index.js +25 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/types/IDataPoint.d.ts +687 -0
- package/lib-amd/types/IDataPoint.js +5 -0
- package/lib-amd/types/IDataPoint.js.map +1 -0
- package/lib-amd/types/IEventAnnotation.d.ts +6 -0
- package/lib-amd/types/IEventAnnotation.js +5 -0
- package/lib-amd/types/IEventAnnotation.js.map +1 -0
- package/lib-amd/types/ILegendDataItem.d.ts +10 -0
- package/lib-amd/types/ILegendDataItem.js +5 -0
- package/lib-amd/types/ILegendDataItem.js.map +1 -0
- package/lib-amd/types/index.d.ts +2 -0
- package/lib-amd/types/index.js +7 -0
- package/lib-amd/types/index.js.map +1 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.d.ts +6 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js +39 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.d.ts +3 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js +8 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.d.ts +2 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js +103 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.d.ts +105 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js +5 -0
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -0
- package/lib-amd/utilities/ChartHoverCard/index.d.ts +3 -0
- package/lib-amd/utilities/ChartHoverCard/index.js +8 -0
- package/lib-amd/utilities/ChartHoverCard/index.js.map +1 -0
- package/lib-amd/utilities/FocusableTooltipText.d.ts +27 -0
- package/lib-amd/utilities/FocusableTooltipText.js +54 -0
- package/lib-amd/utilities/FocusableTooltipText.js.map +1 -0
- package/lib-amd/utilities/SVGTooltipText.d.ts +95 -0
- package/lib-amd/utilities/SVGTooltipText.js +175 -0
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -0
- package/lib-amd/utilities/colors.d.ts +51 -0
- package/lib-amd/utilities/colors.js +139 -0
- package/lib-amd/utilities/colors.js.map +1 -0
- package/lib-amd/utilities/index.d.ts +4 -0
- package/lib-amd/utilities/index.js +9 -0
- package/lib-amd/utilities/index.js.map +1 -0
- package/lib-amd/utilities/locale-util.d.ts +3 -0
- package/lib-amd/utilities/locale-util.js +24 -0
- package/lib-amd/utilities/locale-util.js.map +1 -0
- package/lib-amd/utilities/test-data.d.ts +27 -0
- package/lib-amd/utilities/test-data.js +214 -0
- package/lib-amd/utilities/test-data.js.map +1 -0
- package/lib-amd/utilities/utilities.d.ts +411 -0
- package/lib-amd/utilities/utilities.js +1085 -0
- package/lib-amd/utilities/utilities.js.map +1 -0
- package/lib-amd/utilities/vbc-utils.d.ts +2 -0
- package/lib-amd/utilities/vbc-utils.js +38 -0
- package/lib-amd/utilities/vbc-utils.js.map +1 -0
- package/lib-amd/version.d.ts +1 -0
- package/lib-amd/version.js +6 -0
- package/lib-amd/version.js.map +1 -0
- package/lib-commonjs/AreaChart.js.map +1 -1
- package/lib-commonjs/CartesianChart.js.map +1 -1
- package/lib-commonjs/DonutChart.js.map +1 -1
- package/lib-commonjs/GaugeChart.js.map +1 -1
- package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/HeatMapChart.js.map +1 -1
- package/lib-commonjs/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/Legends.js.map +1 -1
- package/lib-commonjs/LineChart.js.map +1 -1
- package/lib-commonjs/PieChart.js.map +1 -1
- package/lib-commonjs/SankeyChart.js.map +1 -1
- package/lib-commonjs/Sparkline.js.map +1 -1
- package/lib-commonjs/StackedBarChart.js.map +1 -1
- package/lib-commonjs/Styling.js.map +1 -1
- package/lib-commonjs/TreeChart.js.map +1 -1
- package/lib-commonjs/Utilities.js.map +1 -1
- package/lib-commonjs/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
- package/lib-commonjs/components/AreaChart/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/index.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/Legends/index.js.map +1 -1
- package/lib-commonjs/components/Legends/shape.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/LineChart/index.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.styles.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.types.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/index.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.styles.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.types.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/index.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.styles.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.types.js.map +1 -1
- package/lib-commonjs/components/PieChart/index.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
- package/lib-commonjs/components/Sparkline/index.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/index.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -1
- package/lib-commonjs/components/TreeChart/index.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/types/IEventAnnotation.js.map +1 -1
- package/lib-commonjs/types/ILegendDataItem.js.map +1 -1
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.styles.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.types.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/index.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/colors.js.map +1 -1
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/locale-util.js.map +1 -1
- package/lib-commonjs/utilities/test-data.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "d3-shape", "@fluentui/react/lib/Utilities", "./Arc.styles", "d3-format", "../../../utilities/index"], function (require, exports, tslib_1, React, d3_shape_1, Utilities_1, Arc_styles_1, d3_format_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Arc = void 0;
|
|
5
|
+
var Arc = exports.Arc = /** @class */ (function (_super) {
|
|
6
|
+
tslib_1.__extends(Arc, _super);
|
|
7
|
+
function Arc() {
|
|
8
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
+
_this.state = {};
|
|
10
|
+
_this.currentRef = React.createRef();
|
|
11
|
+
_this._isRTL = (0, Utilities_1.getRTL)();
|
|
12
|
+
_this._hoverOff = function () {
|
|
13
|
+
_this.props.hoverLeaveCallback();
|
|
14
|
+
};
|
|
15
|
+
_this._onBlur = function () {
|
|
16
|
+
_this.props.onBlurCallback();
|
|
17
|
+
};
|
|
18
|
+
_this._getAriaLabel = function () {
|
|
19
|
+
var _a;
|
|
20
|
+
var point = _this.props.data.data;
|
|
21
|
+
var legend = point.xAxisCalloutData || point.legend;
|
|
22
|
+
var yValue = point.yAxisCalloutData || point.data || 0;
|
|
23
|
+
return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || (legend ? "".concat(legend, ", ") : '') + "".concat(yValue, ".");
|
|
24
|
+
};
|
|
25
|
+
_this._renderArcLabel = function (className) {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
var arc = (_a = _this.props, _a.arc), data = _a.data, innerRadius = _a.innerRadius, outerRadius = _a.outerRadius, showLabelsInPercent = _a.showLabelsInPercent, totalValue = _a.totalValue, hideLabels = _a.hideLabels, activeArc = _a.activeArc;
|
|
28
|
+
if (hideLabels ||
|
|
29
|
+
Math.abs(data.endAngle - data.startAngle) < Math.PI / 12 ||
|
|
30
|
+
(activeArc !== data.data.legend && activeArc !== '')) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
var base = (_b = arc.centroid(data), _b[0]), perp = _b[1];
|
|
34
|
+
var hyp = Math.sqrt(base * base + perp * perp);
|
|
35
|
+
var labelRadius = Math.max(innerRadius, outerRadius) + 2;
|
|
36
|
+
var angle = (data.startAngle + data.endAngle) / 2;
|
|
37
|
+
var arcValue = data.value;
|
|
38
|
+
return (React.createElement("text", { x: (hyp === 0 ? 0 : base / hyp) * labelRadius, y: (hyp === 0 ? 0 : perp / hyp) * labelRadius, textAnchor: angle > Math.PI !== _this._isRTL ? 'end' : 'start', dominantBaseline: angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto', className: className, "aria-hidden": true }, showLabelsInPercent
|
|
39
|
+
? (0, d3_format_1.format)('.0%')(totalValue === 0 ? 0 : arcValue / totalValue)
|
|
40
|
+
: (0, index_1.formatValueWithSIPrefix)(arcValue)));
|
|
41
|
+
};
|
|
42
|
+
return _this;
|
|
43
|
+
}
|
|
44
|
+
Arc.getDerivedStateFromProps = function (nextProps) {
|
|
45
|
+
_updateChart(nextProps);
|
|
46
|
+
return null;
|
|
47
|
+
};
|
|
48
|
+
Arc.prototype.updateChart = function (newProps) {
|
|
49
|
+
_updateChart(newProps);
|
|
50
|
+
};
|
|
51
|
+
Arc.prototype.render = function () {
|
|
52
|
+
var _a;
|
|
53
|
+
var _b;
|
|
54
|
+
var arc = (_a = this.props, _a.arc), href = _a.href, focusedArcId = _a.focusedArcId;
|
|
55
|
+
var getClassNames = (0, Utilities_1.classNamesFunction)();
|
|
56
|
+
var classNames = getClassNames(Arc_styles_1.getStyles, {
|
|
57
|
+
color: this.props.color,
|
|
58
|
+
href: href,
|
|
59
|
+
theme: this.props.theme,
|
|
60
|
+
});
|
|
61
|
+
var id = this.props.uniqText + this.props.data.data.legend.replace(/\s+/, '') + this.props.data.data.data;
|
|
62
|
+
var opacity = this.props.activeArc === this.props.data.data.legend || this.props.activeArc === '' ? 1 : 0.1;
|
|
63
|
+
return (React.createElement("g", { ref: this.currentRef },
|
|
64
|
+
!!focusedArcId && focusedArcId === id && (React.createElement("path", { id: id + 'focusRing', d: arc(this.props.focusData), className: classNames.focusRing })),
|
|
65
|
+
React.createElement("path", { id: id, d: arc(this.props.data), onFocus: this._onFocus.bind(this, this.props.data.data, id), className: classNames.root, "data-is-focusable": this.props.activeArc === this.props.data.data.legend || this.props.activeArc === '', onMouseOver: this._hoverOn.bind(this, this.props.data.data), onMouseMove: this._hoverOn.bind(this, this.props.data.data), onMouseLeave: this._hoverOff, onBlur: this._onBlur, opacity: opacity, onClick: href ? this._redirectToUrl.bind(this, href) : (_b = this.props.data) === null || _b === void 0 ? void 0 : _b.data.onClick, "aria-label": this._getAriaLabel(), role: "img" }),
|
|
66
|
+
this._renderArcLabel(classNames.arcLabel)));
|
|
67
|
+
};
|
|
68
|
+
Arc.prototype._onFocus = function (data, id) {
|
|
69
|
+
this.props.onFocusCallback(data, id, this.currentRef.current);
|
|
70
|
+
};
|
|
71
|
+
Arc.prototype._hoverOn = function (data, mouseEvent) {
|
|
72
|
+
mouseEvent.persist();
|
|
73
|
+
this.props.hoverOnCallback(data, mouseEvent);
|
|
74
|
+
};
|
|
75
|
+
Arc.prototype._redirectToUrl = function (href) {
|
|
76
|
+
href ? (window.location.href = href) : '';
|
|
77
|
+
};
|
|
78
|
+
Arc.defaultProps = {
|
|
79
|
+
arc: (0, d3_shape_1.arc)(),
|
|
80
|
+
};
|
|
81
|
+
return Arc;
|
|
82
|
+
}(React.Component));
|
|
83
|
+
function _updateChart(newProps) {
|
|
84
|
+
newProps.arc.innerRadius(newProps.innerRadius);
|
|
85
|
+
newProps.arc.outerRadius(newProps.outerRadius);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=Arc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arc.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.tsx"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport { arc as d3Arc } from 'd3-shape';\nimport { classNamesFunction, getRTL } from '@fluentui/react/lib/Utilities';\nimport { getStyles } from './Arc.styles';\nimport { IChartDataPoint } from '../index';\nimport { IArcProps, IArcStyles } from './index';\nimport { format as d3Format } from 'd3-format';\nimport { formatValueWithSIPrefix } from '../../../utilities/index';\n\nexport interface IArcState {\n isCalloutVisible?: boolean;\n}\n\nexport class Arc extends React.Component<IArcProps, IArcState> {\n public static defaultProps: Partial<IArcProps> = {\n arc: d3Arc(),\n };\n\n public state: {} = {};\n\n private currentRef = React.createRef<SVGPathElement>();\n private _isRTL: boolean = getRTL();\n\n public static getDerivedStateFromProps(nextProps: Readonly<IArcProps>): Partial<IArcState> | null {\n _updateChart(nextProps);\n return null;\n }\n\n public updateChart(newProps: IArcProps): void {\n _updateChart(newProps);\n }\n\n public render(): JSX.Element {\n const { arc, href, focusedArcId } = this.props;\n const getClassNames = classNamesFunction<IArcProps, IArcStyles>();\n const classNames = getClassNames(getStyles, {\n color: this.props.color,\n href: href!,\n theme: this.props.theme!,\n });\n const id = this.props.uniqText! + this.props.data!.data.legend!.replace(/\\s+/, '') + this.props.data!.data.data;\n const opacity: number =\n this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === '' ? 1 : 0.1;\n return (\n <g ref={this.currentRef}>\n {!!focusedArcId && focusedArcId === id && (\n <path id={id + 'focusRing'} d={arc(this.props.focusData)} className={classNames.focusRing} />\n )}\n <path\n id={id}\n d={arc(this.props.data)}\n onFocus={this._onFocus.bind(this, this.props.data!.data, id)}\n className={classNames.root}\n data-is-focusable={this.props.activeArc === this.props.data!.data.legend || this.props.activeArc === ''}\n onMouseOver={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseMove={this._hoverOn.bind(this, this.props.data!.data)}\n onMouseLeave={this._hoverOff}\n onBlur={this._onBlur}\n opacity={opacity}\n onClick={href ? this._redirectToUrl.bind(this, href) : this.props.data?.data.onClick}\n aria-label={this._getAriaLabel()}\n role=\"img\"\n />\n {this._renderArcLabel(classNames.arcLabel)}\n </g>\n );\n }\n\n private _onFocus(data: IChartDataPoint, id: string): void {\n this.props.onFocusCallback!(data, id, this.currentRef.current);\n }\n\n private _hoverOn(data: IChartDataPoint, mouseEvent: React.MouseEvent<SVGPathElement>): void {\n mouseEvent.persist();\n this.props.hoverOnCallback!(data, mouseEvent);\n }\n\n private _hoverOff = (): void => {\n this.props.hoverLeaveCallback!();\n };\n\n private _onBlur = (): void => {\n this.props.onBlurCallback!();\n };\n\n private _redirectToUrl(href: string | undefined): void {\n href ? (window.location.href = href) : '';\n }\n\n private _getAriaLabel = (): string => {\n const point = this.props.data!.data;\n const legend = point.xAxisCalloutData || point.legend;\n const yValue = point.yAxisCalloutData || point.data || 0;\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n private _renderArcLabel = (className: string) => {\n const { arc, data, innerRadius, outerRadius, showLabelsInPercent, totalValue, hideLabels, activeArc } = this.props;\n\n if (\n hideLabels ||\n Math.abs(data!.endAngle - data!.startAngle) < Math.PI / 12 ||\n (activeArc !== data!.data.legend && activeArc !== '')\n ) {\n return null;\n }\n\n const [base, perp] = arc.centroid(data);\n const hyp = Math.sqrt(base * base + perp * perp);\n const labelRadius = Math.max(innerRadius!, outerRadius!) + 2;\n const angle = (data!.startAngle + data!.endAngle) / 2;\n const arcValue = data!.value;\n\n return (\n <text\n x={(hyp === 0 ? 0 : base / hyp) * labelRadius}\n y={(hyp === 0 ? 0 : perp / hyp) * labelRadius}\n textAnchor={angle > Math.PI !== this._isRTL ? 'end' : 'start'}\n dominantBaseline={angle > Math.PI / 2 && angle < (3 * Math.PI) / 2 ? 'hanging' : 'auto'}\n className={className}\n aria-hidden={true}\n >\n {showLabelsInPercent\n ? d3Format('.0%')(totalValue! === 0 ? 0 : arcValue / totalValue!)\n : formatValueWithSIPrefix(arcValue)}\n </text>\n );\n };\n}\n\nfunction _updateChart(newProps: IArcProps): void {\n newProps.arc.innerRadius(newProps.innerRadius);\n newProps.arc.outerRadius(newProps.outerRadius);\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
define(["require", "exports", "@fluentui/react/lib/Styling"], function (require, exports, Styling_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getStyles = void 0;
|
|
5
|
+
var getStyles = function (props) {
|
|
6
|
+
var color = props.color, href = props.href, theme = props.theme;
|
|
7
|
+
return {
|
|
8
|
+
root: {
|
|
9
|
+
fill: color,
|
|
10
|
+
cursor: href ? 'pointer' : 'default',
|
|
11
|
+
stroke: theme.semanticColors.bodyBackground,
|
|
12
|
+
outline: 'transparent',
|
|
13
|
+
selectors: {
|
|
14
|
+
'::-moz-focus-inner': {
|
|
15
|
+
border: '0',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
focusRing: {
|
|
20
|
+
stroke: theme.semanticColors.focusBorder,
|
|
21
|
+
strokeWidth: 4,
|
|
22
|
+
fill: 'transparent',
|
|
23
|
+
},
|
|
24
|
+
arcLabel: {
|
|
25
|
+
fontSize: Styling_1.FontSizes.small,
|
|
26
|
+
fontWeight: Styling_1.FontWeights.semibold,
|
|
27
|
+
fill: theme.palette.neutralPrimary,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.getStyles = getStyles;
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=Arc.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arc.styles.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAAgB;QAChC,IAAA,KAAK,GAAkB,KAAK,MAAvB,EAAE,IAAI,GAAY,KAAK,KAAjB,EAAE,KAAK,GAAK,KAAK,MAAV,CAAW;QACrC,OAAO;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACpC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc;gBAC3C,OAAO,EAAE,aAAa;gBACtB,SAAS,EAAE;oBACT,oBAAoB,EAAE;wBACpB,MAAM,EAAE,GAAG;qBACZ;iBACF;aACF;YACD,SAAS,EAAE;gBACT,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW;gBACxC,WAAW,EAAE,CAAC;gBACd,IAAI,EAAE,aAAa;aACpB;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE,mBAAS,CAAC,KAAK;gBACzB,UAAU,EAAE,qBAAW,CAAC,QAAQ;gBAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;aACnC;SACF,CAAC;IACJ,CAAC,CAAC;IAzBW,QAAA,SAAS,aAyBpB","sourcesContent":["import { IArcProps, IArcStyles } from './Arc.types';\nimport { FontSizes, FontWeights } from '@fluentui/react/lib/Styling';\n\nexport const getStyles = (props: IArcProps): IArcStyles => {\n const { color, href, theme } = props;\n return {\n root: {\n fill: color,\n cursor: href ? 'pointer' : 'default',\n stroke: theme.semanticColors.bodyBackground,\n outline: 'transparent',\n selectors: {\n '::-moz-focus-inner': {\n border: '0',\n },\n },\n },\n focusRing: {\n stroke: theme.semanticColors.focusBorder,\n strokeWidth: 4,\n fill: 'transparent',\n },\n arcLabel: {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
|
|
2
|
+
import { IChartDataPoint } from '../index';
|
|
3
|
+
export interface IArcProps {
|
|
4
|
+
/**
|
|
5
|
+
* Theme
|
|
6
|
+
*/
|
|
7
|
+
theme: ITheme;
|
|
8
|
+
/**
|
|
9
|
+
* Data to render in the Arc.
|
|
10
|
+
*/
|
|
11
|
+
data?: IArcData;
|
|
12
|
+
/**
|
|
13
|
+
* Data to render focused Arc
|
|
14
|
+
*/
|
|
15
|
+
focusData?: IArcData;
|
|
16
|
+
/**
|
|
17
|
+
* id of the focused arc
|
|
18
|
+
*/
|
|
19
|
+
focusedArcId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* shape for Arc.
|
|
22
|
+
*/
|
|
23
|
+
arc?: any;
|
|
24
|
+
/**
|
|
25
|
+
* innerRadius of the Arc.
|
|
26
|
+
*/
|
|
27
|
+
innerRadius?: number;
|
|
28
|
+
/**
|
|
29
|
+
* outerRadius of the Arc.
|
|
30
|
+
*/
|
|
31
|
+
outerRadius?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Color for the Arc.
|
|
34
|
+
*/
|
|
35
|
+
color: string;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the function that is executed upon hovering over the legend
|
|
38
|
+
*/
|
|
39
|
+
hoverOnCallback?: Function;
|
|
40
|
+
/**
|
|
41
|
+
* Defines the function that is executed upon hovering over the legend
|
|
42
|
+
*/
|
|
43
|
+
onFocusCallback?: Function;
|
|
44
|
+
/**
|
|
45
|
+
* Defines the function that is executed upon hovering Leave the legend
|
|
46
|
+
*/
|
|
47
|
+
onBlurCallback?: Function;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the function that is executed upon hovering Leave the legend
|
|
50
|
+
*/
|
|
51
|
+
hoverLeaveCallback?: Function;
|
|
52
|
+
/**
|
|
53
|
+
* Uniq string for chart
|
|
54
|
+
*/
|
|
55
|
+
uniqText?: string;
|
|
56
|
+
/**
|
|
57
|
+
* string for callout id
|
|
58
|
+
*/
|
|
59
|
+
calloutId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Active Arc for chart
|
|
62
|
+
*/
|
|
63
|
+
activeArc?: string;
|
|
64
|
+
/**
|
|
65
|
+
* internal prop for href
|
|
66
|
+
*/
|
|
67
|
+
href?: string;
|
|
68
|
+
/**
|
|
69
|
+
* props for inside donut value
|
|
70
|
+
*/
|
|
71
|
+
valueInsideDonut?: string | number;
|
|
72
|
+
/**
|
|
73
|
+
* Prop to show the arc labels in percentage format
|
|
74
|
+
*/
|
|
75
|
+
showLabelsInPercent?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Prop used to define the sum of all arc values
|
|
78
|
+
*/
|
|
79
|
+
totalValue?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Prop to hide the arc labels
|
|
82
|
+
*/
|
|
83
|
+
hideLabels?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface IArcData {
|
|
86
|
+
/**
|
|
87
|
+
* Data to render in the chart for individual arc.
|
|
88
|
+
*/
|
|
89
|
+
data: IChartDataPoint;
|
|
90
|
+
/**
|
|
91
|
+
* endAngle of the Arc
|
|
92
|
+
*/
|
|
93
|
+
endAngle: number;
|
|
94
|
+
/**
|
|
95
|
+
* index of the Arc
|
|
96
|
+
*/
|
|
97
|
+
index: number;
|
|
98
|
+
/**
|
|
99
|
+
* padAngle of the Arc
|
|
100
|
+
*/
|
|
101
|
+
padAngle: number;
|
|
102
|
+
/**
|
|
103
|
+
* startAngle of the Arc
|
|
104
|
+
*/
|
|
105
|
+
startAngle: number;
|
|
106
|
+
/**
|
|
107
|
+
* value of the Arc
|
|
108
|
+
*/
|
|
109
|
+
value: number;
|
|
110
|
+
}
|
|
111
|
+
export interface IArcStyles {
|
|
112
|
+
/**
|
|
113
|
+
* Style set for the card header component root
|
|
114
|
+
*/
|
|
115
|
+
root: IStyle;
|
|
116
|
+
/**
|
|
117
|
+
* styles for the focus
|
|
118
|
+
*/
|
|
119
|
+
focusRing: IStyle;
|
|
120
|
+
/**
|
|
121
|
+
* Style for the arc labels
|
|
122
|
+
*/
|
|
123
|
+
arcLabel: IStyle;
|
|
124
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arc.types.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/Arc.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { IChartDataPoint } from '../index';\nexport interface IArcProps {\n /**\n * Theme\n */\n theme: ITheme;\n /**\n * Data to render in the Arc.\n */\n data?: IArcData;\n\n /**\n * Data to render focused Arc\n */\n focusData?: IArcData;\n\n /**\n * id of the focused arc\n */\n focusedArcId?: string;\n /**\n * shape for Arc.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n arc?: any;\n\n /**\n * innerRadius of the Arc.\n */\n innerRadius?: number;\n\n /**\n * outerRadius of the Arc.\n */\n outerRadius?: number;\n\n /**\n * Color for the Arc.\n */\n color: string;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverOnCallback?: Function;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n onFocusCallback?: Function;\n\n /**\n * Defines the function that is executed upon hovering Leave the legend\n */\n onBlurCallback?: Function;\n\n /**\n * Defines the function that is executed upon hovering Leave the legend\n */\n hoverLeaveCallback?: Function;\n\n /**\n * Uniq string for chart\n */\n uniqText?: string;\n\n /**\n * string for callout id\n */\n calloutId?: string;\n\n /**\n * Active Arc for chart\n */\n activeArc?: string;\n\n /**\n * internal prop for href\n */\n href?: string;\n\n /**\n * props for inside donut value\n */\n valueInsideDonut?: string | number;\n\n /**\n * Prop to show the arc labels in percentage format\n */\n showLabelsInPercent?: boolean;\n\n /**\n * Prop used to define the sum of all arc values\n */\n totalValue?: number;\n\n /**\n * Prop to hide the arc labels\n */\n hideLabels?: boolean;\n}\n\nexport interface IArcData {\n /**\n * Data to render in the chart for individual arc.\n */\n data: IChartDataPoint;\n /**\n * endAngle of the Arc\n */\n endAngle: number;\n /**\n * index of the Arc\n */\n index: number;\n /**\n * padAngle of the Arc\n */\n padAngle: number;\n /**\n * startAngle of the Arc\n */\n startAngle: number;\n /**\n * value of the Arc\n */\n value: number;\n}\n\nexport interface IArcStyles {\n /**\n * Style set for the card header component root\n */\n root: IStyle;\n\n /**\n * styles for the focus\n */\n focusRing: IStyle;\n\n /**\n * Style for the arc labels\n */\n arcLabel: IStyle;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./Arc", "./Arc.types"], function (require, exports, tslib_1, Arc_1, Arc_types_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(Arc_1, exports);
|
|
5
|
+
tslib_1.__exportStar(Arc_types_1, exports);
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/DonutChart/Arc/index.ts"],"names":[],"mappings":";;;IAAA,qCAAsB;IACtB,2CAA4B","sourcesContent":["export * from './Arc';\nexport * from './Arc.types';\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ScaleOrdinal } from 'd3-scale';
|
|
3
|
+
import { IAccessibilityProps } from '../../index';
|
|
4
|
+
import { IChartDataPoint, IDonutChartProps } from './index';
|
|
5
|
+
export interface IDonutChartState {
|
|
6
|
+
showHover?: boolean;
|
|
7
|
+
value?: string | undefined;
|
|
8
|
+
legend?: string | undefined;
|
|
9
|
+
_width?: number | undefined;
|
|
10
|
+
_height?: number | undefined;
|
|
11
|
+
activeLegend?: string;
|
|
12
|
+
color?: string | undefined;
|
|
13
|
+
xCalloutValue?: string;
|
|
14
|
+
yCalloutValue?: string;
|
|
15
|
+
focusedArcId?: string;
|
|
16
|
+
selectedLegend: string;
|
|
17
|
+
dataPointCalloutProps?: IChartDataPoint;
|
|
18
|
+
callOutAccessibilityData?: IAccessibilityProps;
|
|
19
|
+
}
|
|
20
|
+
export declare class DonutChartBase extends React.Component<IDonutChartProps, IDonutChartState> {
|
|
21
|
+
static defaultProps: Partial<IDonutChartProps>;
|
|
22
|
+
_colors: ScaleOrdinal<string, {}>;
|
|
23
|
+
private _classNames;
|
|
24
|
+
private _rootElem;
|
|
25
|
+
private _uniqText;
|
|
26
|
+
private _currentHoverElement;
|
|
27
|
+
private _calloutId;
|
|
28
|
+
private _calloutAnchorPoint;
|
|
29
|
+
private _emptyChartId;
|
|
30
|
+
static getDerivedStateFromProps(nextProps: Readonly<IDonutChartProps>, prevState: Readonly<IDonutChartState>): Partial<IDonutChartState> | null;
|
|
31
|
+
constructor(props: IDonutChartProps);
|
|
32
|
+
componentDidMount(): void;
|
|
33
|
+
render(): JSX.Element;
|
|
34
|
+
private _closeCallout;
|
|
35
|
+
private _elevateToMinimums;
|
|
36
|
+
private _setViewBox;
|
|
37
|
+
private _createLegends;
|
|
38
|
+
private _focusCallback;
|
|
39
|
+
private _hoverCallback;
|
|
40
|
+
private _onBlur;
|
|
41
|
+
private _hoverLeave;
|
|
42
|
+
private _handleChartMouseLeave;
|
|
43
|
+
private _valueInsideDonut;
|
|
44
|
+
private _toLocaleString;
|
|
45
|
+
/**
|
|
46
|
+
* This function returns
|
|
47
|
+
* the selected legend if there is one
|
|
48
|
+
* or the hovered legend if none of the legends is selected.
|
|
49
|
+
* Note: This won't work in case of multiple legends selection.
|
|
50
|
+
*/
|
|
51
|
+
private _getHighlightedLegend;
|
|
52
|
+
private _isChartEmpty;
|
|
53
|
+
private _addDefaultColors;
|
|
54
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Utilities", "@fluentui/react/lib/Callout", "@fluentui/react-focus", "../../index", "./Pie/index", "../../utilities/index", "../../utilities/locale-util"], function (require, exports, tslib_1, React, Utilities_1, Callout_1, react_focus_1, index_1, index_2, index_3, locale_util_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DonutChartBase = void 0;
|
|
5
|
+
var getClassNames = (0, Utilities_1.classNamesFunction)();
|
|
6
|
+
var LEGEND_CONTAINER_HEIGHT = 40;
|
|
7
|
+
var DonutChartBase = exports.DonutChartBase = /** @class */ (function (_super) {
|
|
8
|
+
tslib_1.__extends(DonutChartBase, _super);
|
|
9
|
+
function DonutChartBase(props) {
|
|
10
|
+
var _this = _super.call(this, props) || this;
|
|
11
|
+
_this._closeCallout = function () {
|
|
12
|
+
_this.setState({
|
|
13
|
+
showHover: false,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
_this._focusCallback = function (data, id, element) {
|
|
17
|
+
_this._currentHoverElement = element;
|
|
18
|
+
_this.setState({
|
|
19
|
+
/** Show the callout if highlighted arc is focused and Hide it if unhighlighted arc is focused */
|
|
20
|
+
showHover: _this.state.selectedLegend === '' || _this.state.selectedLegend === data.legend,
|
|
21
|
+
value: data.data.toString(),
|
|
22
|
+
legend: data.legend,
|
|
23
|
+
color: data.color,
|
|
24
|
+
xCalloutValue: data.xAxisCalloutData,
|
|
25
|
+
yCalloutValue: data.yAxisCalloutData,
|
|
26
|
+
focusedArcId: id,
|
|
27
|
+
dataPointCalloutProps: data,
|
|
28
|
+
callOutAccessibilityData: data.callOutAccessibilityData,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
_this._hoverCallback = function (data, e) {
|
|
32
|
+
if (_this._calloutAnchorPoint !== data) {
|
|
33
|
+
_this._calloutAnchorPoint = data;
|
|
34
|
+
_this._currentHoverElement = e;
|
|
35
|
+
_this.setState({
|
|
36
|
+
/** Show the callout if highlighted arc is hovered and Hide it if unhighlighted arc is hovered */
|
|
37
|
+
showHover: _this.state.selectedLegend === '' || _this.state.selectedLegend === data.legend,
|
|
38
|
+
value: data.data.toString(),
|
|
39
|
+
legend: data.legend,
|
|
40
|
+
color: data.color,
|
|
41
|
+
xCalloutValue: data.xAxisCalloutData,
|
|
42
|
+
yCalloutValue: data.yAxisCalloutData,
|
|
43
|
+
dataPointCalloutProps: data,
|
|
44
|
+
callOutAccessibilityData: data.callOutAccessibilityData,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
_this._onBlur = function () {
|
|
49
|
+
_this.setState({ focusedArcId: '' });
|
|
50
|
+
};
|
|
51
|
+
_this._handleChartMouseLeave = function () {
|
|
52
|
+
_this._calloutAnchorPoint = null;
|
|
53
|
+
_this.setState({ showHover: false });
|
|
54
|
+
};
|
|
55
|
+
_this._addDefaultColors = function (donutChartDataPoint) {
|
|
56
|
+
return donutChartDataPoint
|
|
57
|
+
? donutChartDataPoint.map(function (item, index) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
var color;
|
|
60
|
+
// isInverted property is applicable to v8 themes only
|
|
61
|
+
if (typeof item.color === 'undefined') {
|
|
62
|
+
color = (0, index_3.getNextColor)(index, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
color = (0, index_3.getColorFromToken)(item.color, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted);
|
|
66
|
+
}
|
|
67
|
+
return tslib_1.__assign(tslib_1.__assign({}, item), { color: color });
|
|
68
|
+
})
|
|
69
|
+
: [];
|
|
70
|
+
};
|
|
71
|
+
_this.state = {
|
|
72
|
+
showHover: false,
|
|
73
|
+
value: '',
|
|
74
|
+
legend: '',
|
|
75
|
+
_width: _this.props.width || 200,
|
|
76
|
+
_height: _this.props.height || 200,
|
|
77
|
+
activeLegend: '',
|
|
78
|
+
color: '',
|
|
79
|
+
xCalloutValue: '',
|
|
80
|
+
yCalloutValue: '',
|
|
81
|
+
selectedLegend: '',
|
|
82
|
+
focusedArcId: '',
|
|
83
|
+
};
|
|
84
|
+
_this._hoverCallback = _this._hoverCallback.bind(_this);
|
|
85
|
+
_this._focusCallback = _this._focusCallback.bind(_this);
|
|
86
|
+
_this._hoverLeave = _this._hoverLeave.bind(_this);
|
|
87
|
+
_this._calloutId = (0, Utilities_1.getId)('callout');
|
|
88
|
+
_this._uniqText = (0, Utilities_1.getId)('_Pie_');
|
|
89
|
+
_this._emptyChartId = (0, Utilities_1.getId)('_DonutChart_empty');
|
|
90
|
+
return _this;
|
|
91
|
+
}
|
|
92
|
+
DonutChartBase.getDerivedStateFromProps = function (nextProps, prevState) {
|
|
93
|
+
var widthState;
|
|
94
|
+
if (nextProps.width && nextProps.width !== prevState._width) {
|
|
95
|
+
widthState = { _width: nextProps.width };
|
|
96
|
+
}
|
|
97
|
+
var heightState;
|
|
98
|
+
if (nextProps.height && nextProps.height !== prevState._height) {
|
|
99
|
+
heightState = { _height: nextProps.height - LEGEND_CONTAINER_HEIGHT };
|
|
100
|
+
}
|
|
101
|
+
return tslib_1.__assign(tslib_1.__assign({}, widthState), heightState);
|
|
102
|
+
};
|
|
103
|
+
DonutChartBase.prototype.componentDidMount = function () {
|
|
104
|
+
if (this._rootElem) {
|
|
105
|
+
this.setState({
|
|
106
|
+
_width: this._rootElem.offsetWidth,
|
|
107
|
+
_height: this._rootElem.offsetHeight - LEGEND_CONTAINER_HEIGHT,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
DonutChartBase.prototype.render = function () {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
var _this = this;
|
|
114
|
+
var data = (_a = this.props, _a.data), hideLegend = (_b = _a.hideLegend, _b === void 0 ? false : _b);
|
|
115
|
+
var points = this._addDefaultColors(data === null || data === void 0 ? void 0 : data.chartData);
|
|
116
|
+
this._classNames = getClassNames(this.props.styles, {
|
|
117
|
+
theme: this.props.theme,
|
|
118
|
+
width: this.state._width,
|
|
119
|
+
height: this.state._height,
|
|
120
|
+
color: this.state.color,
|
|
121
|
+
className: this.props.className,
|
|
122
|
+
});
|
|
123
|
+
var legendBars = this._createLegends(points);
|
|
124
|
+
var donutMarginHorizontal = this.props.hideLabels ? 0 : 80;
|
|
125
|
+
var donutMarginVertical = this.props.hideLabels ? 0 : 40;
|
|
126
|
+
var outerRadius = Math.min(this.state._width - donutMarginHorizontal, this.state._height - donutMarginVertical) / 2;
|
|
127
|
+
var chartData = this._elevateToMinimums(points.filter(function (d) { return d.data >= 0; }));
|
|
128
|
+
var valueInsideDonut = this._valueInsideDonut(this.props.valueInsideDonut, chartData);
|
|
129
|
+
return !this._isChartEmpty() ? (React.createElement("div", { className: this._classNames.root, ref: function (rootElem) { return (_this._rootElem = rootElem); }, onMouseLeave: this._handleChartMouseLeave },
|
|
130
|
+
React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, handleTabKey: react_focus_1.FocusZoneTabbableElements.all },
|
|
131
|
+
React.createElement("div", null,
|
|
132
|
+
React.createElement("svg", { className: this._classNames.chart, "aria-label": data === null || data === void 0 ? void 0 : data.chartTitle, ref: function (node) { return _this._setViewBox(node); } },
|
|
133
|
+
React.createElement(index_2.Pie, { width: this.state._width, height: this.state._height, outerRadius: outerRadius, innerRadius: this.props.innerRadius, data: chartData, onFocusCallback: this._focusCallback, hoverOnCallback: this._hoverCallback, hoverLeaveCallback: this._hoverLeave, uniqText: this._uniqText, onBlurCallback: this._onBlur, activeArc: this._getHighlightedLegend(), focusedArcId: this.state.focusedArcId || '', href: this.props.href, calloutId: this._calloutId, valueInsideDonut: this._toLocaleString(valueInsideDonut), theme: this.props.theme, showLabelsInPercent: this.props.showLabelsInPercent, hideLabels: this.props.hideLabels })))),
|
|
134
|
+
React.createElement(Callout_1.Callout, tslib_1.__assign({ target: this._currentHoverElement, alignTargetEdge: true, isBeakVisible: false, directionalHint: Callout_1.DirectionalHint.topAutoEdge, gapSpace: 15, hidden: !(!this.props.hideTooltip && this.state.showHover), id: this._calloutId, onDismiss: this._closeCallout, preventDismissOnLostFocus: true,
|
|
135
|
+
/** Keep the callout updated with details of focused/hovered arc */
|
|
136
|
+
shouldUpdateWhenHidden: true }, this.props.calloutProps, (0, index_3.getAccessibleDataObject)(this.state.callOutAccessibilityData, 'text', false)), this.props.onRenderCalloutPerDataPoint ? (this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps)) : (React.createElement(index_1.ChartHoverCard, { Legend: this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend, YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.value, color: this.state.color, culture: this.props.culture }))),
|
|
137
|
+
!hideLegend && React.createElement("div", { className: this._classNames.legendContainer }, legendBars))) : (React.createElement("div", { id: this._emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
|
|
138
|
+
};
|
|
139
|
+
DonutChartBase.prototype._elevateToMinimums = function (data) {
|
|
140
|
+
var sumOfData = 0;
|
|
141
|
+
var minPercent = 0.01;
|
|
142
|
+
var elevatedData = [];
|
|
143
|
+
data.forEach(function (item) {
|
|
144
|
+
sumOfData += item.data;
|
|
145
|
+
});
|
|
146
|
+
data.forEach(function (item) {
|
|
147
|
+
elevatedData.push(minPercent * sumOfData > item.data && item.data > 0
|
|
148
|
+
? tslib_1.__assign(tslib_1.__assign({}, item), { data: minPercent * sumOfData, yAxisCalloutData: item.yAxisCalloutData === undefined ? item.data.toLocaleString() : item.yAxisCalloutData }) : item);
|
|
149
|
+
});
|
|
150
|
+
return elevatedData;
|
|
151
|
+
};
|
|
152
|
+
DonutChartBase.prototype._setViewBox = function (node) {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
if (node === null) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
var widthVal = node.parentElement ? node.parentElement.clientWidth : this.state._width;
|
|
158
|
+
var heightVal = node.parentElement && ((_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.offsetHeight) > this.state._height
|
|
159
|
+
? (_b = node.parentElement) === null || _b === void 0 ? void 0 : _b.offsetHeight
|
|
160
|
+
: this.state._height;
|
|
161
|
+
var viewbox = "0 0 ".concat(widthVal, " ").concat(heightVal);
|
|
162
|
+
node.setAttribute('viewBox', viewbox);
|
|
163
|
+
};
|
|
164
|
+
DonutChartBase.prototype._createLegends = function (chartData) {
|
|
165
|
+
var _this = this;
|
|
166
|
+
var legendDataItems = chartData.map(function (point, index) {
|
|
167
|
+
var color = point.color;
|
|
168
|
+
// mapping data to the format Legends component needs
|
|
169
|
+
var legend = {
|
|
170
|
+
title: point.legend,
|
|
171
|
+
color: color,
|
|
172
|
+
action: function () {
|
|
173
|
+
if (_this.state.selectedLegend === point.legend) {
|
|
174
|
+
_this.setState({ selectedLegend: '' });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
_this.setState({ selectedLegend: point.legend });
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
hoverAction: function () {
|
|
181
|
+
_this._handleChartMouseLeave();
|
|
182
|
+
_this.setState({ activeLegend: point.legend });
|
|
183
|
+
},
|
|
184
|
+
onMouseOutAction: function () {
|
|
185
|
+
_this.setState({ activeLegend: '' });
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
return legend;
|
|
189
|
+
});
|
|
190
|
+
var legends = (React.createElement(index_1.Legends, tslib_1.__assign({ legends: legendDataItems, centerLegends: true, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, this.props.legendProps)));
|
|
191
|
+
return legends;
|
|
192
|
+
};
|
|
193
|
+
DonutChartBase.prototype._hoverLeave = function () {
|
|
194
|
+
/**/
|
|
195
|
+
};
|
|
196
|
+
DonutChartBase.prototype._valueInsideDonut = function (valueInsideDonut, data) {
|
|
197
|
+
var _this = this;
|
|
198
|
+
var highlightedLegend = this._getHighlightedLegend();
|
|
199
|
+
if (valueInsideDonut !== undefined && (highlightedLegend !== '' || this.state.showHover)) {
|
|
200
|
+
var legendValue_1 = valueInsideDonut;
|
|
201
|
+
data.map(function (point, index) {
|
|
202
|
+
if (point.legend === highlightedLegend || (_this.state.showHover && point.legend === _this.state.legend)) {
|
|
203
|
+
legendValue_1 = point.yAxisCalloutData ? point.yAxisCalloutData : point.data;
|
|
204
|
+
}
|
|
205
|
+
return;
|
|
206
|
+
});
|
|
207
|
+
return legendValue_1;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
return valueInsideDonut;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
DonutChartBase.prototype._toLocaleString = function (data) {
|
|
214
|
+
var localeString = (0, locale_util_1.convertToLocaleString)(data, this.props.culture);
|
|
215
|
+
if (!localeString) {
|
|
216
|
+
return data;
|
|
217
|
+
}
|
|
218
|
+
return localeString === null || localeString === void 0 ? void 0 : localeString.toString();
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* This function returns
|
|
222
|
+
* the selected legend if there is one
|
|
223
|
+
* or the hovered legend if none of the legends is selected.
|
|
224
|
+
* Note: This won't work in case of multiple legends selection.
|
|
225
|
+
*/
|
|
226
|
+
DonutChartBase.prototype._getHighlightedLegend = function () {
|
|
227
|
+
return this.state.selectedLegend || this.state.activeLegend;
|
|
228
|
+
};
|
|
229
|
+
DonutChartBase.prototype._isChartEmpty = function () {
|
|
230
|
+
return !(this.props.data &&
|
|
231
|
+
this.props.data.chartData &&
|
|
232
|
+
this.props.data.chartData.filter(function (d) { return d.data > 0; }).length > 0);
|
|
233
|
+
};
|
|
234
|
+
DonutChartBase.defaultProps = {
|
|
235
|
+
innerRadius: 0,
|
|
236
|
+
hideLabels: true,
|
|
237
|
+
};
|
|
238
|
+
return DonutChartBase;
|
|
239
|
+
}(React.Component));
|
|
240
|
+
});
|
|
241
|
+
//# sourceMappingURL=DonutChart.base.js.map
|