@fluentui/react-charting 5.21.28 → 5.21.30
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 +55 -1
- package/CHANGELOG.md +24 -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 +4 -4
- package/project.json +1 -1
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@fluentui/react-focus", "@fluentui/react/lib/Callout", "@fluentui/react/lib/Utilities", "d3-array", "d3-sankey", "d3-selection", "d3-shape", "react", "../../utilities/ChartHoverCard/ChartHoverCard"], function (require, exports, tslib_1, react_focus_1, Callout_1, Utilities_1, d3_array_1, d3_sankey_1, d3_selection_1, d3_shape_1, React, ChartHoverCard_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SankeyChartBase = exports.preRenderLayout = exports.adjustPadding = exports.groupNodesByColumn = void 0;
|
|
5
|
+
var getClassNames = (0, Utilities_1.classNamesFunction)();
|
|
6
|
+
var PADDING_PERCENTAGE = 0.3;
|
|
7
|
+
var NON_SELECTED_NODE_AND_STREAM_COLOR = '#757575';
|
|
8
|
+
var DEFAULT_NODE_COLORS = [
|
|
9
|
+
{ fillColor: '#00758F', borderColor: '#002E39' },
|
|
10
|
+
{ fillColor: '#77004D', borderColor: '#43002C' },
|
|
11
|
+
{ fillColor: '#4F6BED', borderColor: '#3B52B4' },
|
|
12
|
+
{ fillColor: '#937600', borderColor: '#6D5700' },
|
|
13
|
+
{ fillColor: '#286EA8', borderColor: '#00457E' },
|
|
14
|
+
{ fillColor: '#A43FB1', borderColor: '#7C158A' },
|
|
15
|
+
{ fillColor: '#CC3595', borderColor: '#7F215D' },
|
|
16
|
+
{ fillColor: '#0E7878', borderColor: '#004E4E' },
|
|
17
|
+
{ fillColor: '#8764B8', borderColor: '#4B3867' },
|
|
18
|
+
{ fillColor: '#9C663F', borderColor: '#6D4123' },
|
|
19
|
+
];
|
|
20
|
+
var MIN_HEIGHT_FOR_DOUBLINE_TYPE = 36;
|
|
21
|
+
var MIN_HEIGHT_FOR_TYPE = 24;
|
|
22
|
+
var REST_STREAM_OPACITY = 1;
|
|
23
|
+
var NON_SELECTED_OPACITY = 1;
|
|
24
|
+
var SELECTED_STREAM_OPACITY = 0.3;
|
|
25
|
+
var NON_SELECTED_STREAM_BORDER_OPACITY = 0.5;
|
|
26
|
+
var DEFAULT_TEXT_COLOR = '#323130';
|
|
27
|
+
var NON_SELECTED_TEXT_COLOR = '#FFFFFF';
|
|
28
|
+
var NODE_WIDTH = 124;
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
function getSelectedNodes(selectedLinks) {
|
|
31
|
+
var nodes = [];
|
|
32
|
+
selectedLinks.forEach(function (link) {
|
|
33
|
+
nodes.push(link.target);
|
|
34
|
+
if (nodes.indexOf(link.source) === -1) {
|
|
35
|
+
nodes.push(link.source);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return nodes;
|
|
39
|
+
}
|
|
40
|
+
function getSelectedLinks(singleNode) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor
|
|
42
|
+
var q = new Array();
|
|
43
|
+
var finalLinks = new Set();
|
|
44
|
+
singleNode.sourceLinks.forEach(function (link) {
|
|
45
|
+
q.push(link);
|
|
46
|
+
finalLinks.add(link);
|
|
47
|
+
});
|
|
48
|
+
while (q.length > 0) {
|
|
49
|
+
var poppedLink = q.shift();
|
|
50
|
+
var node = poppedLink.target;
|
|
51
|
+
if (node && node.sourceLinks) {
|
|
52
|
+
node.sourceLinks.forEach(function (link) {
|
|
53
|
+
finalLinks.add(link);
|
|
54
|
+
q.push(link);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (singleNode.targetLinks) {
|
|
59
|
+
singleNode.targetLinks.forEach(function (link) {
|
|
60
|
+
q.push(link);
|
|
61
|
+
finalLinks.add(link);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
while (q.length > 0) {
|
|
65
|
+
var poppedLink = q.shift();
|
|
66
|
+
var node = poppedLink.source;
|
|
67
|
+
if (node && node.targetLinks) {
|
|
68
|
+
node.targetLinks.forEach(function (link) {
|
|
69
|
+
finalLinks.add(link);
|
|
70
|
+
q.push(link);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return finalLinks;
|
|
75
|
+
}
|
|
76
|
+
function getSelectedLinksforStreamHover(singleLink) {
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-array-constructor
|
|
78
|
+
var q = new Array();
|
|
79
|
+
var finalLinks = new Set();
|
|
80
|
+
var finalNodes = new Set();
|
|
81
|
+
q.push(singleLink.source);
|
|
82
|
+
finalLinks.add(singleLink);
|
|
83
|
+
while (q.length > 0) {
|
|
84
|
+
var poppedNode = q.shift();
|
|
85
|
+
finalNodes.add(poppedNode);
|
|
86
|
+
if (poppedNode.targetLinks && poppedNode.targetLinks.length > 0) {
|
|
87
|
+
poppedNode.targetLinks.forEach(function (link) {
|
|
88
|
+
q.push(link.source);
|
|
89
|
+
finalLinks.add(link);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
q.push(singleLink.target);
|
|
94
|
+
while (q.length > 0) {
|
|
95
|
+
var poppedNode = q.shift();
|
|
96
|
+
finalNodes.add(poppedNode);
|
|
97
|
+
if (poppedNode.sourceLinks && poppedNode.sourceLinks.length > 0) {
|
|
98
|
+
poppedNode.sourceLinks.forEach(function (link) {
|
|
99
|
+
q.push(link.target);
|
|
100
|
+
finalLinks.add(link);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
selectedLinks: finalLinks,
|
|
106
|
+
selectedNodes: finalNodes,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* This is used to group nodes by column index.
|
|
111
|
+
*/
|
|
112
|
+
// This is exported for unit tests.
|
|
113
|
+
function groupNodesByColumn(graph) {
|
|
114
|
+
var nodesInColumn = {};
|
|
115
|
+
graph.nodes.forEach(function (node) {
|
|
116
|
+
var columnId = node.layer;
|
|
117
|
+
if (nodesInColumn[columnId]) {
|
|
118
|
+
nodesInColumn[columnId].push(node);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
nodesInColumn[columnId] = [node];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return nodesInColumn;
|
|
125
|
+
}
|
|
126
|
+
exports.groupNodesByColumn = groupNodesByColumn;
|
|
127
|
+
/**
|
|
128
|
+
* This is used to normalize the nodes value whose value is less than 1% of the total column value.
|
|
129
|
+
*/
|
|
130
|
+
function adjustOnePercentHeightNodes(nodesInColumn, computedNodes, originalLinks) {
|
|
131
|
+
var totalColumnValue = Object.values(nodesInColumn).map(function (column) {
|
|
132
|
+
return (0, d3_array_1.sum)(column, function (node) { return node.value; });
|
|
133
|
+
});
|
|
134
|
+
totalColumnValue.forEach(function (columnValue, index) {
|
|
135
|
+
var totalPercentage = 0;
|
|
136
|
+
var onePercent = 0.01 * columnValue;
|
|
137
|
+
var columnNodes = nodesInColumn[index];
|
|
138
|
+
columnNodes.forEach(function (node) {
|
|
139
|
+
var value = computedNodes[node.nodeId];
|
|
140
|
+
var nodePercentage = (value / columnValue) * 100;
|
|
141
|
+
node.actualValue = value;
|
|
142
|
+
//if the value is less than 1% then we are making it as 1% of total .
|
|
143
|
+
if (nodePercentage < 1) {
|
|
144
|
+
node.value = onePercent;
|
|
145
|
+
totalPercentage = totalPercentage + 1;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
totalPercentage = totalPercentage + nodePercentage;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
//since we have adjusted the value to be 1% but we need to keep the sum of the percentage value under 100.
|
|
152
|
+
var scalingRatio = totalPercentage !== 0 ? totalPercentage / 100 : 1;
|
|
153
|
+
if (scalingRatio > 1) {
|
|
154
|
+
// Loop through each node in that column and scale that node--and its incoming and outgoing links--by the
|
|
155
|
+
// scaling ratio. We need the sankey diagram to re-layout the nodes and links after we do this.
|
|
156
|
+
columnNodes.forEach(function (node) {
|
|
157
|
+
var normalized = (node.value = node.value / scalingRatio);
|
|
158
|
+
// Which Original Value? and Which Normalized Value is needed, here? The Node? The Link? Both?
|
|
159
|
+
changeColumnValue(node, computedNodes[node.nodeId], normalized, originalLinks);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* This is used for normalizing each link's value to reflect the normalized node value.
|
|
166
|
+
*/
|
|
167
|
+
function changeColumnValue(node, originalNodeValue, normalizedNodeValue, linkValues) {
|
|
168
|
+
// For each link in the source and target, compute the proportion that this link contributes to the total
|
|
169
|
+
// then adjust the link's value to reflect its proportion of the normalized node value.
|
|
170
|
+
var updateLinkValue = function (link) {
|
|
171
|
+
var value = linkValue(linkValues, link);
|
|
172
|
+
link.unnormalizedValue = value;
|
|
173
|
+
var linkRatio = value / originalNodeValue;
|
|
174
|
+
link.value = Math.max(normalizedNodeValue * linkRatio, link.value);
|
|
175
|
+
};
|
|
176
|
+
node.sourceLinks.forEach(updateLinkValue);
|
|
177
|
+
node.targetLinks.forEach(updateLinkValue);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* This is used for calculating the node non normalized value based on link non normalized value.
|
|
181
|
+
* The links have the original weights. Computed nodes have the total weight of all incoming and outgoing links.
|
|
182
|
+
*/
|
|
183
|
+
function populateNodeActualValue(data, computedNodes, originalLinks) {
|
|
184
|
+
data.links.forEach(function (link) {
|
|
185
|
+
if (!link.unnormalizedValue) {
|
|
186
|
+
link.unnormalizedValue = linkValue(originalLinks, link);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
data.nodes.forEach(function (node) {
|
|
190
|
+
node.actualValue = computedNodes[node.nodeId];
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* This is used to introduce dynamic padding for cases where the number of nodes in a column is huge
|
|
195
|
+
* so that we maintain a node to space ratio for such columns as if we fail to do so the
|
|
196
|
+
* chart is devoid of nodes and only shows links.
|
|
197
|
+
*/
|
|
198
|
+
// This is exported for unit tests
|
|
199
|
+
function adjustPadding(sankey, height, nodesInColumn) {
|
|
200
|
+
var padding = sankey.nodePadding();
|
|
201
|
+
var minPadding = PADDING_PERCENTAGE * height;
|
|
202
|
+
Object.values(nodesInColumn).forEach(function (column) {
|
|
203
|
+
var totalPaddingInColumn = height - (0, d3_array_1.sum)(column, function (node) { return node.y1 - node.y0; });
|
|
204
|
+
if (minPadding < totalPaddingInColumn) {
|
|
205
|
+
// Here we are calculating the min of default and calculated padding, we will not increase the padding
|
|
206
|
+
// in any scenario.
|
|
207
|
+
padding = Math.min(padding, minPadding / (column.length - 1));
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
sankey.nodePadding(padding);
|
|
211
|
+
}
|
|
212
|
+
exports.adjustPadding = adjustPadding;
|
|
213
|
+
function idFromNumberOrSNode(node) {
|
|
214
|
+
if (typeof node === 'number') {
|
|
215
|
+
return node;
|
|
216
|
+
}
|
|
217
|
+
return node.nodeId;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Duplicates the supplied chart data so that we do not alter the original.
|
|
221
|
+
* @param data The data to duplicate.
|
|
222
|
+
* @returns The duplicated data.
|
|
223
|
+
*/
|
|
224
|
+
function duplicateData(data) {
|
|
225
|
+
return {
|
|
226
|
+
nodes: data.nodes.map(function (node) { return (tslib_1.__assign({}, node)); }),
|
|
227
|
+
links: data.links.map(function (link) { return (tslib_1.__assign({}, link)); }),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function valuesOfNodes(nodes) {
|
|
231
|
+
var result = {};
|
|
232
|
+
nodes.forEach(function (node) {
|
|
233
|
+
result[node.nodeId] = node.value;
|
|
234
|
+
});
|
|
235
|
+
return result;
|
|
236
|
+
}
|
|
237
|
+
function valuesOfLinks(links) {
|
|
238
|
+
var result = {};
|
|
239
|
+
links.forEach(function (link) {
|
|
240
|
+
var sourceId = idFromNumberOrSNode(link.source);
|
|
241
|
+
var sourceToTarget = result[sourceId];
|
|
242
|
+
if (!sourceToTarget) {
|
|
243
|
+
sourceToTarget = {};
|
|
244
|
+
result[sourceId] = sourceToTarget;
|
|
245
|
+
}
|
|
246
|
+
sourceToTarget[idFromNumberOrSNode(link.target)] = link.value;
|
|
247
|
+
});
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
function linkValue(originalLinks, link) {
|
|
251
|
+
return originalLinks[idFromNumberOrSNode(link.source)][idFromNumberOrSNode(link.target)];
|
|
252
|
+
}
|
|
253
|
+
// This is exported for unit tests.
|
|
254
|
+
function preRenderLayout(margins, containerWidth, containerHeight, isRtl) {
|
|
255
|
+
var left = margins.left, right = margins.right, top = margins.top, bottom = margins.bottom;
|
|
256
|
+
var width = containerWidth - right;
|
|
257
|
+
var height = containerHeight - bottom > 0 ? containerHeight - bottom : 0;
|
|
258
|
+
var sankey = (0, d3_sankey_1.sankey)()
|
|
259
|
+
.nodeWidth(NODE_WIDTH)
|
|
260
|
+
.extent([
|
|
261
|
+
[left, top],
|
|
262
|
+
[width - 1, height - 6],
|
|
263
|
+
])
|
|
264
|
+
.nodeAlign(isRtl ? d3_sankey_1.sankeyRight : d3_sankey_1.sankeyJustify);
|
|
265
|
+
return { sankey: sankey, height: height, width: width };
|
|
266
|
+
}
|
|
267
|
+
exports.preRenderLayout = preRenderLayout;
|
|
268
|
+
var elipsis = '...';
|
|
269
|
+
/**
|
|
270
|
+
* This is used to assign node fillcolors and borderColor cyclically when the user doesnt
|
|
271
|
+
* provide color to individual node.
|
|
272
|
+
*/
|
|
273
|
+
function assignNodeColors(nodes, colorsForNodes, borderColorsForNodes) {
|
|
274
|
+
var colors;
|
|
275
|
+
var borders;
|
|
276
|
+
if (colorsForNodes && borderColorsForNodes) {
|
|
277
|
+
colors = colorsForNodes;
|
|
278
|
+
borders = borderColorsForNodes;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
colors = DEFAULT_NODE_COLORS.map(function (color) { return color.fillColor; });
|
|
282
|
+
borders = DEFAULT_NODE_COLORS.map(function (color) { return color.borderColor; });
|
|
283
|
+
}
|
|
284
|
+
var currentIndex = 0;
|
|
285
|
+
nodes.forEach(function (node) {
|
|
286
|
+
if (!node.color && !node.borderColor) {
|
|
287
|
+
node.color = colors[currentIndex];
|
|
288
|
+
node.borderColor = borders[currentIndex];
|
|
289
|
+
}
|
|
290
|
+
else if (node.color && !node.borderColor) {
|
|
291
|
+
node.borderColor = '#757575';
|
|
292
|
+
}
|
|
293
|
+
else if (node.borderColor && !node.color) {
|
|
294
|
+
node.color = '#F5F5F5';
|
|
295
|
+
}
|
|
296
|
+
currentIndex = (currentIndex + 1) % colors.length;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Takes in the display name for the node and potentially returns a trimmed version of the name.
|
|
301
|
+
* @param tspan the `tspan` element to use for text visual length measurement
|
|
302
|
+
* @param text is the text which we will potentially truncate
|
|
303
|
+
* @param rectangleWidth is the width of the rectangle which will contain the text
|
|
304
|
+
* @param padding is the space we need to leave between the rect lines and other text
|
|
305
|
+
* @returns the name to show on the node which might be the truncated `text` if the `text` is too long
|
|
306
|
+
*/
|
|
307
|
+
function truncateText(tspan, text, rectangleWidth, padding) {
|
|
308
|
+
// NOTE: This method is the most-expensive in terms of rerendering components.
|
|
309
|
+
var textLengthForNodeName = rectangleWidth - padding; // This can likely be computed once and passed in.
|
|
310
|
+
// The following `select` statement injects a `tempText` element into the DOM. This injection
|
|
311
|
+
// (and subsequent removal) is causing a layout recalculation. This is a performance issue.
|
|
312
|
+
// Note that this code will always inject a `tempText` element, but doesn't always remove it. This is a bug.
|
|
313
|
+
if (fitsWithinNode(tspan, text, textLengthForNodeName)) {
|
|
314
|
+
return text;
|
|
315
|
+
}
|
|
316
|
+
// Computing the size of elipsis is performed with each node. This should be computed once and used everywhere.
|
|
317
|
+
// TODO: Compute the size of the elipsis once and use it everywhere.
|
|
318
|
+
var elipsisLength = computeElipsisLength(tspan);
|
|
319
|
+
var line = '';
|
|
320
|
+
// Calculate how much of the original text to show.
|
|
321
|
+
// TODO: The folllowing is O(n). We could use a binary search to make this faster: O(log(n)).
|
|
322
|
+
for (var i = 0; i < text.length; i++) {
|
|
323
|
+
line += text[i];
|
|
324
|
+
tspan.text(line);
|
|
325
|
+
var currentNode = tspan.node();
|
|
326
|
+
if (currentNode !== null) {
|
|
327
|
+
var w = currentNode.getComputedTextLength();
|
|
328
|
+
if (w >= textLengthForNodeName - elipsisLength) {
|
|
329
|
+
line = line.slice(0, -1);
|
|
330
|
+
line += elipsis;
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
tspan.text(null);
|
|
336
|
+
return line;
|
|
337
|
+
}
|
|
338
|
+
function fitsWithinNode(tspan, text, textLengthForNodeName) {
|
|
339
|
+
var measurement = measureText(tspan, text);
|
|
340
|
+
if (measurement === undefined) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
return measurement <= textLengthForNodeName;
|
|
344
|
+
}
|
|
345
|
+
function measureText(tspan, text) {
|
|
346
|
+
var _a;
|
|
347
|
+
try {
|
|
348
|
+
tspan.text(text);
|
|
349
|
+
return (_a = tspan.node()) === null || _a === void 0 ? void 0 : _a.getComputedTextLength();
|
|
350
|
+
}
|
|
351
|
+
finally {
|
|
352
|
+
tspan.text(null);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
function computeElipsisLength(tspan) {
|
|
356
|
+
var measurement = measureText(tspan, elipsis);
|
|
357
|
+
return measurement === undefined ? 0 : measurement;
|
|
358
|
+
}
|
|
359
|
+
function computeLinkAttributes(links, linkFrom, linkAriaLabel) {
|
|
360
|
+
var result = {};
|
|
361
|
+
links.forEach(function (link) {
|
|
362
|
+
var sourceId = idFromNumberOrSNode(link.source);
|
|
363
|
+
var sourceToTarget = result[sourceId];
|
|
364
|
+
if (!sourceToTarget) {
|
|
365
|
+
sourceToTarget = {};
|
|
366
|
+
result[sourceId] = sourceToTarget;
|
|
367
|
+
}
|
|
368
|
+
sourceToTarget[idFromNumberOrSNode(link.target)] = {
|
|
369
|
+
reactId: (0, Utilities_1.getId)('link'),
|
|
370
|
+
from: linkFrom(link.source),
|
|
371
|
+
aria: linkAriaLabel(link),
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
return result;
|
|
375
|
+
}
|
|
376
|
+
var linkToDataPoints = function (d) {
|
|
377
|
+
var halfWidth = d.width * 0.5;
|
|
378
|
+
var y0 = d.y0;
|
|
379
|
+
var y1 = d.y1;
|
|
380
|
+
return [
|
|
381
|
+
{ x: d.source.x1, y0: y0 + halfWidth, y1: y0 - halfWidth },
|
|
382
|
+
{ x: d.target.x0, y0: y1 + halfWidth, y1: y1 - halfWidth },
|
|
383
|
+
];
|
|
384
|
+
};
|
|
385
|
+
var linkArea = (0, d3_shape_1.area)()
|
|
386
|
+
.x(function (p) { return p.x; })
|
|
387
|
+
.y0(function (p) { return p.y0; })
|
|
388
|
+
.y1(function (p) { return p.y1; })
|
|
389
|
+
.curve(d3_shape_1.curveBumpX);
|
|
390
|
+
function nodeTextColor(state, singleNode) {
|
|
391
|
+
return !(!state.selectedState ||
|
|
392
|
+
(state.selectedNodes.has(singleNode.index) && state.selectedNode) ||
|
|
393
|
+
!state.selectedNode)
|
|
394
|
+
? DEFAULT_TEXT_COLOR
|
|
395
|
+
: NON_SELECTED_TEXT_COLOR;
|
|
396
|
+
}
|
|
397
|
+
// NOTE: To start employing React.useMemo properly, we need to convert this code from a React.Component
|
|
398
|
+
// to a function component. This will require a significant refactor of the code in this file.
|
|
399
|
+
// https://stackoverflow.com/questions/60223362/fast-way-to-convert-react-class-component-to-functional-component
|
|
400
|
+
// I am concerned that doing so would break this contract, making it difficult for consuming code.
|
|
401
|
+
var SankeyChartBase = exports.SankeyChartBase = /** @class */ (function (_super) {
|
|
402
|
+
tslib_1.__extends(SankeyChartBase, _super);
|
|
403
|
+
function SankeyChartBase(props) {
|
|
404
|
+
var _this = _super.call(this, props) || this;
|
|
405
|
+
_this._isRtl = (0, Utilities_1.getRTL)();
|
|
406
|
+
_this._numColumns = 0;
|
|
407
|
+
_this._onCloseCallout = function () {
|
|
408
|
+
_this.setState({
|
|
409
|
+
isCalloutVisible: false,
|
|
410
|
+
refSelected: undefined,
|
|
411
|
+
descriptionMessage: '',
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
_this._onBlur = function () {
|
|
415
|
+
/**/
|
|
416
|
+
};
|
|
417
|
+
_this._fillNodeColors = function (singleNode) {
|
|
418
|
+
var state = _this.state;
|
|
419
|
+
if (!state.selectedState) {
|
|
420
|
+
return singleNode.color;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
var selectedNode = state.selectedNode;
|
|
424
|
+
if (selectedNode && state.selectedNodes.has(singleNode.index)) {
|
|
425
|
+
return selectedNode.color;
|
|
426
|
+
}
|
|
427
|
+
else if (!selectedNode) {
|
|
428
|
+
return singleNode.color;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
_this._fillNodeBorder = function (singleNode) {
|
|
433
|
+
var state = _this.state;
|
|
434
|
+
if (!state.selectedState) {
|
|
435
|
+
return singleNode.borderColor;
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
if (state.selectedNodes.has(singleNode.index)) {
|
|
439
|
+
var selectedNode = state.selectedNode;
|
|
440
|
+
return selectedNode ? selectedNode.borderColor : singleNode.borderColor;
|
|
441
|
+
}
|
|
442
|
+
return singleNode.borderColor;
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
_this._calculateChartMinWidth = function () {
|
|
446
|
+
return (_this._margins.left +
|
|
447
|
+
_this._margins.right +
|
|
448
|
+
// total width of all node columns
|
|
449
|
+
_this._numColumns * NODE_WIDTH +
|
|
450
|
+
// minimum total width of all column gaps
|
|
451
|
+
(_this._numColumns - 1) * (NODE_WIDTH / 2));
|
|
452
|
+
};
|
|
453
|
+
_this.state = {
|
|
454
|
+
containerHeight: 468,
|
|
455
|
+
containerWidth: 912,
|
|
456
|
+
selectedState: false,
|
|
457
|
+
selectedLinks: new Set(),
|
|
458
|
+
selectedNodes: new Set(),
|
|
459
|
+
shouldOverflow: false,
|
|
460
|
+
isCalloutVisible: false,
|
|
461
|
+
};
|
|
462
|
+
_this._calloutId = (0, Utilities_1.getId)('callout');
|
|
463
|
+
_this._linkId = (0, Utilities_1.getId)('link');
|
|
464
|
+
_this._chartId = (0, Utilities_1.getId)('sankeyChart');
|
|
465
|
+
_this._emptyChartId = (0, Utilities_1.getId)('_SankeyChart_empty');
|
|
466
|
+
_this._labelTooltipId = (0, Utilities_1.getId)('tooltip');
|
|
467
|
+
_this._margins = { top: 36, right: 48, bottom: 32, left: 48 };
|
|
468
|
+
// We memo-ize creation so that we only create a new object when any of the fields change.
|
|
469
|
+
_this._computeClassNamesProps = (0, Utilities_1.memoizeFunction)(function (theme, pathColor, className, containerWidth, containerHeight) { return ({
|
|
470
|
+
theme: theme,
|
|
471
|
+
width: containerWidth,
|
|
472
|
+
height: containerHeight,
|
|
473
|
+
pathColor: pathColor,
|
|
474
|
+
className: className,
|
|
475
|
+
}); });
|
|
476
|
+
// `getClassNames` is memoized underneath, so it only recomputes when the `styles` or `classNamesProps` change.
|
|
477
|
+
// We memoize `classNamesProps` so that we only create new class names when absolutely necessary,
|
|
478
|
+
// and so that we can memoize the `_createNodes` method.
|
|
479
|
+
_this._computeClassNames = (0, Utilities_1.memoizeFunction)(function (styles, classNamesProps) { return getClassNames(styles, classNamesProps); });
|
|
480
|
+
_this._normalizeData = (0, Utilities_1.memoizeFunction)(function (data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes) { return _this._normalizeSankeyData(data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes); });
|
|
481
|
+
_this._fetchTooltip = (0, Utilities_1.memoizeFunction)(function (classNames) {
|
|
482
|
+
return _this._labelTooltipDiv(classNames);
|
|
483
|
+
});
|
|
484
|
+
// Prepare the localization utilities
|
|
485
|
+
_this._strings = (0, Utilities_1.memoizeFunction)(function (strings) {
|
|
486
|
+
var fromString = (strings === null || strings === void 0 ? void 0 : strings.linkFrom) || 'From {0}';
|
|
487
|
+
// NOTE: The `node` parameter is the sankey-generated node on the link, and not the original `node` supplied
|
|
488
|
+
// by the caller.
|
|
489
|
+
return {
|
|
490
|
+
linkFrom: function (node) { return (0, Utilities_1.format)(fromString, node.name); },
|
|
491
|
+
};
|
|
492
|
+
})(props.strings);
|
|
493
|
+
_this._accessibility = (0, Utilities_1.memoizeFunction)(function (accessibility) {
|
|
494
|
+
var linkString = (accessibility === null || accessibility === void 0 ? void 0 : accessibility.linkAriaLabel) || 'link from {0} to {1} with weight {2}';
|
|
495
|
+
var nodeString = (accessibility === null || accessibility === void 0 ? void 0 : accessibility.nodeAriaLabel) || 'node {0} with weight {1}';
|
|
496
|
+
return {
|
|
497
|
+
emptyAriaLabel: (accessibility === null || accessibility === void 0 ? void 0 : accessibility.emptyAriaLabel) || 'Graph has no data to display',
|
|
498
|
+
linkAriaLabel: function (link) {
|
|
499
|
+
return (0, Utilities_1.format)(linkString, link.source.name, link.target.name, link.unnormalizedValue ? _this._formatNumber(link.unnormalizedValue) : link.unnormalizedValue);
|
|
500
|
+
},
|
|
501
|
+
nodeAriaLabel: function (node, weight) { return (0, Utilities_1.format)(nodeString, node.name, _this._formatNumber(weight)); },
|
|
502
|
+
};
|
|
503
|
+
})(props.accessibility);
|
|
504
|
+
// NOTE: Memoizing the `_createNodes` and `_createLinks` methods would break the hoverability of the chart
|
|
505
|
+
// because the nodes are currently created differently based on the layout information. Hence why we do not
|
|
506
|
+
// memoize these methods (but have stubs for memoizing as the `_fetchNodes` and `_fetchLinks` methods).
|
|
507
|
+
_this._nodeAttributes = (0, Utilities_1.memoizeFunction)(function (nodes, nodeAriaLabel) {
|
|
508
|
+
return _this._computeNodeAttributes(nodes, nodeAriaLabel);
|
|
509
|
+
});
|
|
510
|
+
_this._fetchNodes = function (classNames, nodes, nodeAttributes, tooltipDiv) { return _this._createNodes(classNames, nodes, nodeAttributes, tooltipDiv); };
|
|
511
|
+
_this._linkAttributes = (0, Utilities_1.memoizeFunction)(function (links, linkFrom, linkAriaLabel) {
|
|
512
|
+
return computeLinkAttributes(links, linkFrom, linkAriaLabel);
|
|
513
|
+
});
|
|
514
|
+
_this._fetchLinks = function (links, linkAttributes) {
|
|
515
|
+
return _this._createLinks(links, linkAttributes);
|
|
516
|
+
};
|
|
517
|
+
return _this;
|
|
518
|
+
// Our shorter path to performance is to pre-compute the truncated labels of each node because
|
|
519
|
+
// that should not change based on the position of the mouse. This is a shorter path becase the code which
|
|
520
|
+
// computes the truncated labels creates and destroys a `tempText` element in the DOM. This is causing a
|
|
521
|
+
// reflow and repaint of the entire chart. This is a performance issue, and so computing the truncated labels
|
|
522
|
+
// once will help to mitigate this issue.
|
|
523
|
+
}
|
|
524
|
+
SankeyChartBase.prototype.componentDidMount = function () {
|
|
525
|
+
this._fitParentContainer();
|
|
526
|
+
};
|
|
527
|
+
SankeyChartBase.prototype.componentDidUpdate = function (prevProps) {
|
|
528
|
+
if (prevProps.shouldResize !== this.props.shouldResize) {
|
|
529
|
+
this._fitParentContainer();
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
SankeyChartBase.prototype.componentWillUnmount = function () {
|
|
533
|
+
cancelAnimationFrame(this._reqID);
|
|
534
|
+
};
|
|
535
|
+
SankeyChartBase.prototype.render = function () {
|
|
536
|
+
var _a, _b;
|
|
537
|
+
var _this = this;
|
|
538
|
+
if (!this._isChartEmpty()) {
|
|
539
|
+
var theme = (_a = this.props, _a.theme), className = _a.className, styles = _a.styles, pathColor = _a.pathColor, colorsForNodes = _a.colorsForNodes, borderColorsForNodes = _a.borderColorsForNodes;
|
|
540
|
+
var state = this.state;
|
|
541
|
+
var classNamesProps = this._computeClassNamesProps(theme, pathColor, className, state.containerWidth, state.containerHeight);
|
|
542
|
+
var classNames_1 = this._computeClassNames(styles, classNamesProps);
|
|
543
|
+
// Compute the position of each node and link
|
|
544
|
+
var nodes_1 = (_b = this._normalizeData(this.props.data.SankeyChartData, state.containerWidth, state.containerHeight, colorsForNodes, borderColorsForNodes), _b.nodes), links_1 = _b.links, width = _b.width, height = _b.height;
|
|
545
|
+
// In FocusZone, the focus order is determined by the rendering order of the elements. We need to find
|
|
546
|
+
// a rendering order such that the focus moves through the nodes and links in a logical sequence.
|
|
547
|
+
// Rendering the nodes and links layer by layer in a vertical order seems to be the most effective solution
|
|
548
|
+
// with FocusZone. Although this focus order may not be entirely logical, it ensures that the focus moves
|
|
549
|
+
// sequentially and prevents links (especially skip layer links) from being rendered over the nodes.
|
|
550
|
+
var nodeLinkDomOrderArray_1 = [];
|
|
551
|
+
nodes_1.sort(function (a, b) {
|
|
552
|
+
if (a.x0 !== b.x0) {
|
|
553
|
+
return a.x0 - b.x0;
|
|
554
|
+
}
|
|
555
|
+
return a.y0 - b.y0;
|
|
556
|
+
});
|
|
557
|
+
nodes_1.forEach(function (item, index) {
|
|
558
|
+
nodeLinkDomOrderArray_1.push({ layer: item.layer, type: 'node', index: index });
|
|
559
|
+
});
|
|
560
|
+
links_1.sort(function (a, b) {
|
|
561
|
+
var asx0 = a.source.x0;
|
|
562
|
+
var bsx0 = b.source.x0;
|
|
563
|
+
if (asx0 !== bsx0) {
|
|
564
|
+
return asx0 - bsx0;
|
|
565
|
+
}
|
|
566
|
+
return a.y0 - b.y0;
|
|
567
|
+
});
|
|
568
|
+
links_1.forEach(function (item, index) {
|
|
569
|
+
nodeLinkDomOrderArray_1.push({ layer: item.source.layer, type: 'link', index: index });
|
|
570
|
+
});
|
|
571
|
+
nodeLinkDomOrderArray_1.sort(function (a, b) {
|
|
572
|
+
if (a.layer !== b.layer) {
|
|
573
|
+
return a.layer - b.layer;
|
|
574
|
+
}
|
|
575
|
+
if (a.type > b.type) {
|
|
576
|
+
return -1;
|
|
577
|
+
}
|
|
578
|
+
if (a.type < b.type) {
|
|
579
|
+
return 1;
|
|
580
|
+
}
|
|
581
|
+
return 0;
|
|
582
|
+
});
|
|
583
|
+
// NOTE: I don't love this approach to caching the "select" result. Is it still valid from render-to-render?
|
|
584
|
+
// although local testing seems to indicate so, I do not trust that React will always support that instance.
|
|
585
|
+
// It might be better to perform this `fetch` within the `_showTooltip` and `_hideTooltip` methods.
|
|
586
|
+
var tooltipDiv = this._fetchTooltip(classNames_1);
|
|
587
|
+
// Pre-compute some important attributes about nodes, specifically text
|
|
588
|
+
var nodeAttributes = this._nodeAttributes(nodes_1, this._accessibility.nodeAriaLabel);
|
|
589
|
+
// Build the nodes and links as rendered in the UX.
|
|
590
|
+
var nodeData_1 = this._fetchNodes(classNames_1, nodes_1, nodeAttributes, tooltipDiv);
|
|
591
|
+
var linkAttributes = this._linkAttributes(links_1, this._strings.linkFrom, this._accessibility.linkAriaLabel);
|
|
592
|
+
var linkData_1 = this._fetchLinks(links_1, linkAttributes);
|
|
593
|
+
var calloutProps = {
|
|
594
|
+
isCalloutVisible: state.isCalloutVisible,
|
|
595
|
+
directionalHint: Callout_1.DirectionalHint.topAutoEdge,
|
|
596
|
+
id: "toolTip".concat(this._calloutId),
|
|
597
|
+
target: state.refSelected,
|
|
598
|
+
color: state.color,
|
|
599
|
+
XValue: state.xCalloutValue,
|
|
600
|
+
YValue: state.yCalloutValue ? state.yCalloutValue : state.dataForHoverCard,
|
|
601
|
+
descriptionMessage: state.descriptionMessage,
|
|
602
|
+
isBeakVisible: false,
|
|
603
|
+
gapSpace: 15,
|
|
604
|
+
onDismiss: this._onCloseCallout,
|
|
605
|
+
className: classNames_1.calloutContentRoot,
|
|
606
|
+
preventDismissOnLostFocus: true,
|
|
607
|
+
};
|
|
608
|
+
return (React.createElement("div", { className: classNames_1.root, role: 'presentation', ref: function (rootElem) { return (_this.chartContainer = rootElem); }, onMouseLeave: this._onCloseCallout },
|
|
609
|
+
React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.vertical, className: classNames_1.chartWrapper },
|
|
610
|
+
React.createElement("svg", { width: width, height: height, id: this._chartId },
|
|
611
|
+
nodeLinkDomOrderArray_1.map(function (item) {
|
|
612
|
+
if (item.type === 'node') {
|
|
613
|
+
return (React.createElement("g", { key: nodes_1[item.index].nodeId, className: classNames_1.nodes }, nodeData_1[item.index]));
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
return (React.createElement("g", { key: "".concat(links_1[item.index].source.nodeId, "-").concat(links_1[item.index].target.nodeId), className: classNames_1.links, strokeOpacity: 1 }, linkData_1[item.index]));
|
|
617
|
+
}
|
|
618
|
+
}),
|
|
619
|
+
calloutProps.isCalloutVisible && (React.createElement(Callout_1.Callout, tslib_1.__assign({}, calloutProps),
|
|
620
|
+
React.createElement(ChartHoverCard_1.ChartHoverCard, { XValue: calloutProps.XValue, YValue: calloutProps.YValue, color: calloutProps.color, descriptionMessage: calloutProps.descriptionMessage ? calloutProps.descriptionMessage : '' })))))));
|
|
621
|
+
}
|
|
622
|
+
return (React.createElement("div", { id: this._emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": this._accessibility.emptyAriaLabel }));
|
|
623
|
+
};
|
|
624
|
+
SankeyChartBase.prototype._computeNodeAttributes = function (nodes, nodeAriaLabel) {
|
|
625
|
+
var _this = this;
|
|
626
|
+
var result = {};
|
|
627
|
+
var weightSpan = (0, d3_selection_1.select)('.nodeName').append('text').attr('class', 'tempText').append('tspan').text(null);
|
|
628
|
+
var nameSpan = (0, d3_selection_1.select)('.nodeName')
|
|
629
|
+
.append('text')
|
|
630
|
+
.attr('class', 'tempText')
|
|
631
|
+
.attr('font-size', '10')
|
|
632
|
+
.append('tspan')
|
|
633
|
+
.text(null);
|
|
634
|
+
nodes.forEach(function (singleNode) {
|
|
635
|
+
var height = Math.max(singleNode.y1 - singleNode.y0, 0);
|
|
636
|
+
var padding = 8;
|
|
637
|
+
var textLengthForNodeWeight = 0;
|
|
638
|
+
var nodeValue = singleNode.actualValue;
|
|
639
|
+
// If the nodeWeight is in the same line as node description an extra padding
|
|
640
|
+
// of 6 px is required between node description and node weight.
|
|
641
|
+
if (height < MIN_HEIGHT_FOR_DOUBLINE_TYPE) {
|
|
642
|
+
padding = padding + 6;
|
|
643
|
+
// The following `select` statement injects a `tempText` element into the DOM. This injection
|
|
644
|
+
// (and subsequent removal) is causing a layout recalculation. This is a performance issue.
|
|
645
|
+
var measurement = measureText(weightSpan, _this._formatNumber(nodeValue));
|
|
646
|
+
if (measurement !== undefined) {
|
|
647
|
+
textLengthForNodeWeight = measurement;
|
|
648
|
+
padding = padding + textLengthForNodeWeight;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
// Since the total width of the node is 124 and we are giving margin of 8px from the left .
|
|
652
|
+
// So the actual value on which it will be truncated is 124-8=116.
|
|
653
|
+
var truncatedname = truncateText(nameSpan, singleNode.name, NODE_WIDTH - 8, padding);
|
|
654
|
+
var isTruncated = truncatedname.slice(-3) === elipsis;
|
|
655
|
+
result[singleNode.nodeId] = {
|
|
656
|
+
reactId: (0, Utilities_1.getId)('nodeBar'),
|
|
657
|
+
gElementId: (0, Utilities_1.getId)('nodeGElement'),
|
|
658
|
+
name: truncatedname,
|
|
659
|
+
aria: nodeAriaLabel(singleNode, nodeValue),
|
|
660
|
+
trimmed: isTruncated,
|
|
661
|
+
height: height,
|
|
662
|
+
weightOffset: textLengthForNodeWeight,
|
|
663
|
+
};
|
|
664
|
+
});
|
|
665
|
+
(0, d3_selection_1.selectAll)('.tempText').remove();
|
|
666
|
+
return result;
|
|
667
|
+
};
|
|
668
|
+
SankeyChartBase.prototype._linkCalloutAttributes = function (singleLink, from) {
|
|
669
|
+
return {
|
|
670
|
+
selectedLink: singleLink,
|
|
671
|
+
isCalloutVisible: true,
|
|
672
|
+
color: singleLink.source.color,
|
|
673
|
+
xCalloutValue: singleLink.target.name,
|
|
674
|
+
yCalloutValue: this._formatNumber(singleLink.unnormalizedValue),
|
|
675
|
+
descriptionMessage: from,
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
SankeyChartBase.prototype._normalizeSankeyData = function (data, containerWidth, containerHeight, colorsForNodes, borderColorsForNodes) {
|
|
679
|
+
var _a;
|
|
680
|
+
var sankey = (_a = preRenderLayout(this._margins, containerWidth, containerHeight, this._isRtl), _a.sankey), height = _a.height, width = _a.width;
|
|
681
|
+
// Clone the data before mutating it (via the SankeyLayoutGenerator) so that we don't mutate the original data.
|
|
682
|
+
var transformed = duplicateData(data);
|
|
683
|
+
sankey(transformed);
|
|
684
|
+
// NOTE: After the prior line, `transformed` is now a more-complex object than the incoming `ISankeyChartData`.
|
|
685
|
+
// `transformed` should be cast to a more-specific type. This is a breaking change because we would be eliminating
|
|
686
|
+
// fields from `ISankeyChartData` and putting those fields on a now-local type. But doing so makes it clearer what
|
|
687
|
+
// the caller needs to supply and why. For example, the `actualValue` and `layer` fields of `ISNodeExtra` should
|
|
688
|
+
// both be moved. Similarly for `unnormalizedValue` in `ISLinkExtra`.
|
|
689
|
+
// `SankeyNodeMinimal` and `SankeyLinkMinimal` are both the types after `sankey(transformed)`, but have almost no
|
|
690
|
+
// bearing on the data before `sankey(transformed)` (which is basically nodes with ids and names along with links
|
|
691
|
+
// with source index, target index, and value).
|
|
692
|
+
var nodesInColumn = groupNodesByColumn(transformed);
|
|
693
|
+
this._numColumns = Object.keys(nodesInColumn).length;
|
|
694
|
+
// Keep track of the original values of the links and their acccumulated values in the nodes
|
|
695
|
+
// Setting these in external objects so they cannot be mutated by other code.
|
|
696
|
+
// The IDs of nodes can be numbers or strings. But, the IDs of links are always the index into the "nodes" array.
|
|
697
|
+
// After the sankey layout is computed, the each link's `source` and `target` will have the ID of the node in the
|
|
698
|
+
// type originally specified in the Nodes array. Consequently, we get the values of those links after the sankey
|
|
699
|
+
// transformation.
|
|
700
|
+
var nodeValues = valuesOfNodes(transformed.nodes);
|
|
701
|
+
var linkValues = valuesOfLinks(transformed.links);
|
|
702
|
+
adjustOnePercentHeightNodes(nodesInColumn, nodeValues, linkValues);
|
|
703
|
+
adjustPadding(sankey, height - 6, nodesInColumn);
|
|
704
|
+
// `sankey` is called a second time, probably to re-layout the nodes with the one-percent adjusted weights.
|
|
705
|
+
// NOTE: The second call to `sankey` is required to allow links to be hoverable.
|
|
706
|
+
// Without the second call, the links are not hoverable.
|
|
707
|
+
sankey(transformed);
|
|
708
|
+
populateNodeActualValue(transformed, nodeValues, linkValues);
|
|
709
|
+
assignNodeColors(transformed.nodes, colorsForNodes, borderColorsForNodes);
|
|
710
|
+
return {
|
|
711
|
+
width: width,
|
|
712
|
+
height: height,
|
|
713
|
+
nodes: transformed.nodes,
|
|
714
|
+
links: transformed.links,
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
SankeyChartBase.prototype._labelTooltipDiv = function (classNames) {
|
|
718
|
+
// find the tooltip div. If it doesn't exist, then create it.
|
|
719
|
+
var tooltipDiv = (0, d3_selection_1.select)("#".concat(this._labelTooltipId));
|
|
720
|
+
if (tooltipDiv.empty()) {
|
|
721
|
+
tooltipDiv = (0, d3_selection_1.select)('body')
|
|
722
|
+
.append('div')
|
|
723
|
+
.attr('id', this._labelTooltipId)
|
|
724
|
+
.attr('class', classNames.toolTip)
|
|
725
|
+
.style('opacity', 0);
|
|
726
|
+
}
|
|
727
|
+
// If the div exists, then `classNames` has changed; update the `class` on the `div`.
|
|
728
|
+
tooltipDiv.attr('class', classNames.toolTip);
|
|
729
|
+
return tooltipDiv;
|
|
730
|
+
};
|
|
731
|
+
SankeyChartBase.prototype._createLinks = function (dataLinks, linkAttributes) {
|
|
732
|
+
var _this = this;
|
|
733
|
+
if (dataLinks) {
|
|
734
|
+
var linkId_1 = this._linkId;
|
|
735
|
+
return dataLinks.map(function (singleLink, index) {
|
|
736
|
+
var _a;
|
|
737
|
+
var onMouseOut = function () {
|
|
738
|
+
_this._onStreamLeave(singleLink);
|
|
739
|
+
};
|
|
740
|
+
var reactId = (_a = linkValue(linkAttributes, singleLink), _a.reactId), from = _a.from, aria = _a.aria;
|
|
741
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
742
|
+
var dataPoints = linkToDataPoints(singleLink);
|
|
743
|
+
var key = "".concat(linkId_1, "-").concat(index);
|
|
744
|
+
var gradientId = "gradient-".concat(key);
|
|
745
|
+
var gradientUrl = "url(#".concat(gradientId, ")");
|
|
746
|
+
var source = singleLink.source;
|
|
747
|
+
var target = singleLink.target;
|
|
748
|
+
// TODO: localize the aria-label string
|
|
749
|
+
return (React.createElement("g", { key: key },
|
|
750
|
+
React.createElement("defs", null,
|
|
751
|
+
React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%" },
|
|
752
|
+
React.createElement("stop", { offset: "0", stopColor: source.color }),
|
|
753
|
+
React.createElement("stop", { offset: "100%", stopColor: target.color }))),
|
|
754
|
+
React.createElement("path", { d: linkArea(dataPoints), id: reactId, fill: _this._fillStreamColors(singleLink, gradientUrl), stroke: _this._fillStreamBorder(singleLink, gradientUrl), strokeWidth: "2", strokeOpacity: _this._getOpacityStreamBorder(singleLink), onMouseOver: function (event) { return _this._onStreamHover(event, singleLink, from); }, onMouseOut: onMouseOut, onFocus: function (event) { return _this._onFocusLink(event, singleLink, from); }, onBlur: _this._onBlur, fillOpacity: _this._getOpacityStream(singleLink), "data-is-focusable": true, "aria-label": aria, role: "img" })));
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
return [];
|
|
758
|
+
};
|
|
759
|
+
SankeyChartBase.prototype._createNodes = function (classNames, dataNodes, nodeAttributes, tooltipDiv) {
|
|
760
|
+
var _this = this;
|
|
761
|
+
if (dataNodes) {
|
|
762
|
+
var state_1 = this.state;
|
|
763
|
+
var textAnchor_1 = this._isRtl ? 'end' : 'start';
|
|
764
|
+
return dataNodes.map(function (singleNode, index) {
|
|
765
|
+
var _a;
|
|
766
|
+
var onMouseOut = function () {
|
|
767
|
+
_this._onLeave(singleNode);
|
|
768
|
+
};
|
|
769
|
+
var nodeId = (_a = nodeAttributes[singleNode.nodeId], _a.reactId), gElementId = _a.gElementId, height = _a.height, isTruncated = _a.trimmed, truncatedName = _a.name, textLengthForNodeWeight = _a.weightOffset, aria = _a.aria;
|
|
770
|
+
var tooTall = height > MIN_HEIGHT_FOR_DOUBLINE_TYPE;
|
|
771
|
+
var name = singleNode.name, actualValue = singleNode.actualValue, x0 = singleNode.x0, x1 = singleNode.x1, y0 = singleNode.y0;
|
|
772
|
+
var textColor = nodeTextColor(state_1, singleNode);
|
|
773
|
+
return (React.createElement("g", { key: index, id: gElementId },
|
|
774
|
+
React.createElement("rect", { x: x0, y: y0, height: height, width: x1 - x0, fill: _this._fillNodeColors(singleNode), id: nodeId, onMouseOver: _this._onHover.bind(_this, singleNode), onMouseOut: onMouseOut, onFocus: _this._onCloseCallout.bind(_this), stroke: _this._fillNodeBorder(singleNode), strokeWidth: "2", opacity: "1", "data-is-focusable": true, "aria-label": aria, role: "img" }),
|
|
775
|
+
height > MIN_HEIGHT_FOR_TYPE && (React.createElement("g", { className: classNames.nodeTextContainer },
|
|
776
|
+
React.createElement("g", { className: "nodeName" },
|
|
777
|
+
React.createElement("text", { id: "".concat(nodeId, "-name"), x: x0, y: y0, dy: '1.2em', dx: '0.4em', textAnchor: textAnchor_1, fontWeight: "regular", "aria-hidden": "true", fill: textColor, fontSize: 10, onMouseOver: _this._showTooltip.bind(_this, name, isTruncated, tooltipDiv), onMouseOut: _this._hideTooltip.bind(_this, tooltipDiv) }, truncatedName)),
|
|
778
|
+
React.createElement("text", { x: tooTall ? x0 : x1 - textLengthForNodeWeight - 8, y: y0, dy: tooTall ? '2em' : '1em', dx: tooTall ? '0.4em' : '0em', textAnchor: textAnchor_1, fontWeight: "bold", "aria-hidden": "true", fill: textColor, fontSize: 14 }, actualValue ? _this._formatNumber(actualValue) : actualValue)))));
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
SankeyChartBase.prototype._onLeave = function (singleNode) {
|
|
783
|
+
if (this.state.selectedState) {
|
|
784
|
+
this.setState({
|
|
785
|
+
selectedState: false,
|
|
786
|
+
selectedNodes: new Set(),
|
|
787
|
+
selectedLinks: new Set(),
|
|
788
|
+
selectedNode: undefined,
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
SankeyChartBase.prototype._onHover = function (singleNode, mouseEvent) {
|
|
793
|
+
mouseEvent.persist();
|
|
794
|
+
this._onCloseCallout();
|
|
795
|
+
if (!this.state.selectedState) {
|
|
796
|
+
var selectedLinks = getSelectedLinks(singleNode);
|
|
797
|
+
var selectedNodes = getSelectedNodes(selectedLinks);
|
|
798
|
+
selectedNodes.push(singleNode);
|
|
799
|
+
this.setState({
|
|
800
|
+
selectedState: true,
|
|
801
|
+
selectedNodes: new Set(Array.from(selectedNodes).map(function (node) { return node.index; })),
|
|
802
|
+
selectedLinks: new Set(Array.from(selectedLinks).map(function (link) { return link.index; })),
|
|
803
|
+
selectedNode: singleNode,
|
|
804
|
+
refSelected: mouseEvent,
|
|
805
|
+
isCalloutVisible: singleNode.y1 - singleNode.y0 < MIN_HEIGHT_FOR_TYPE,
|
|
806
|
+
color: singleNode.color,
|
|
807
|
+
xCalloutValue: singleNode.name,
|
|
808
|
+
yCalloutValue: this._formatNumber(singleNode.actualValue),
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
SankeyChartBase.prototype._formatNumber = function (value) {
|
|
813
|
+
return this.props.formatNumberOptions
|
|
814
|
+
? value.toLocaleString(undefined, this.props.formatNumberOptions)
|
|
815
|
+
: value.toString();
|
|
816
|
+
};
|
|
817
|
+
SankeyChartBase.prototype._onStreamHover = function (mouseEvent, singleLink, from) {
|
|
818
|
+
var _a;
|
|
819
|
+
mouseEvent.persist();
|
|
820
|
+
this._onCloseCallout();
|
|
821
|
+
if (!this.state.selectedState) {
|
|
822
|
+
var selectedLinks = (_a = getSelectedLinksforStreamHover(singleLink), _a.selectedLinks), selectedNodes = _a.selectedNodes;
|
|
823
|
+
this.setState(tslib_1.__assign({ selectedState: true, selectedNodes: new Set(Array.from(selectedNodes).map(function (node) { return node.index; })), selectedLinks: new Set(Array.from(selectedLinks).map(function (link) { return link.index; })), refSelected: mouseEvent }, this._linkCalloutAttributes(singleLink, from)));
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
SankeyChartBase.prototype._onStreamLeave = function (singleLink) {
|
|
827
|
+
if (this.state.selectedState) {
|
|
828
|
+
this.setState({
|
|
829
|
+
selectedState: false,
|
|
830
|
+
selectedNodes: new Set(),
|
|
831
|
+
selectedLinks: new Set(),
|
|
832
|
+
selectedLink: undefined,
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
SankeyChartBase.prototype._onFocusLink = function (element, singleLink, from) {
|
|
837
|
+
// There is a big difference in how "Tab" and the "Arrow keys" are handled in this diagram.
|
|
838
|
+
// In particular, I would expect the "Down" key to be like "Tab", but it jumps a little wildly. I'm not sure
|
|
839
|
+
// if this behavior is an accessiblity violation, but it we might want to investigate it.
|
|
840
|
+
element.persist();
|
|
841
|
+
this._onCloseCallout();
|
|
842
|
+
this.setState(tslib_1.__assign({ refSelected: element.currentTarget }, this._linkCalloutAttributes(singleLink, from)));
|
|
843
|
+
};
|
|
844
|
+
SankeyChartBase.prototype._fillStreamColors = function (singleLink, gradientUrl) {
|
|
845
|
+
var state = this.state;
|
|
846
|
+
if (state.selectedState && state.selectedLinks.has(singleLink.index)) {
|
|
847
|
+
var selectedNode = state.selectedNode;
|
|
848
|
+
return selectedNode ? selectedNode.color : gradientUrl;
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
SankeyChartBase.prototype._fillStreamBorder = function (singleLink, gradientUrl) {
|
|
852
|
+
var state = this.state;
|
|
853
|
+
if (!state.selectedState) {
|
|
854
|
+
return NON_SELECTED_NODE_AND_STREAM_COLOR;
|
|
855
|
+
}
|
|
856
|
+
else {
|
|
857
|
+
if (state.selectedLinks.has(singleLink.index)) {
|
|
858
|
+
var selectedNode = state.selectedNode;
|
|
859
|
+
return selectedNode ? selectedNode.borderColor : gradientUrl;
|
|
860
|
+
}
|
|
861
|
+
return NON_SELECTED_NODE_AND_STREAM_COLOR;
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
SankeyChartBase.prototype._getOpacityStream = function (singleLink) {
|
|
865
|
+
var state = this.state;
|
|
866
|
+
if (state.selectedState) {
|
|
867
|
+
if (!state.selectedLinks.has(singleLink.index)) {
|
|
868
|
+
return NON_SELECTED_OPACITY;
|
|
869
|
+
}
|
|
870
|
+
else if (!state.selectedNode) {
|
|
871
|
+
return SELECTED_STREAM_OPACITY;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
return REST_STREAM_OPACITY;
|
|
875
|
+
};
|
|
876
|
+
SankeyChartBase.prototype._getOpacityStreamBorder = function (singleLink) {
|
|
877
|
+
var state = this.state;
|
|
878
|
+
if (state.selectedState && !state.selectedLinks.has(singleLink.index) && !state.selectedNode) {
|
|
879
|
+
return NON_SELECTED_STREAM_BORDER_OPACITY;
|
|
880
|
+
}
|
|
881
|
+
return NON_SELECTED_OPACITY;
|
|
882
|
+
};
|
|
883
|
+
SankeyChartBase.prototype._fitParentContainer = function () {
|
|
884
|
+
var _a;
|
|
885
|
+
var _this = this;
|
|
886
|
+
var containerWidth = (_a = this.state, _a.containerWidth), containerHeight = _a.containerHeight;
|
|
887
|
+
this._reqID = requestAnimationFrame(function () {
|
|
888
|
+
// NOTE: Calls to this method trigger a re-render.
|
|
889
|
+
var container = _this.props.parentRef ? _this.props.parentRef : _this.chartContainer;
|
|
890
|
+
var currentContainerWidth = container &&
|
|
891
|
+
(_this.props.enableReflow
|
|
892
|
+
? Math.max(container.getBoundingClientRect().width, _this._calculateChartMinWidth())
|
|
893
|
+
: container.getBoundingClientRect().width);
|
|
894
|
+
var currentContainerHeight = container && container.getBoundingClientRect().height;
|
|
895
|
+
var shouldResize = containerWidth !== currentContainerWidth || containerHeight !== currentContainerHeight;
|
|
896
|
+
if (shouldResize) {
|
|
897
|
+
_this.setState({
|
|
898
|
+
containerWidth: currentContainerWidth,
|
|
899
|
+
containerHeight: currentContainerHeight,
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
};
|
|
904
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
905
|
+
SankeyChartBase.prototype._showTooltip = function (text, checkTrcuncated, div, evt) {
|
|
906
|
+
if (checkTrcuncated) {
|
|
907
|
+
//Fixing tooltip position by attaching it to the element rather than page
|
|
908
|
+
div.style('opacity', 0.9);
|
|
909
|
+
div
|
|
910
|
+
.html(text)
|
|
911
|
+
.style('left', evt.pageX + 'px')
|
|
912
|
+
.style('top', evt.pageY - 28 + 'px');
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
916
|
+
SankeyChartBase.prototype._hideTooltip = function (div) {
|
|
917
|
+
div.style('opacity', 0);
|
|
918
|
+
};
|
|
919
|
+
SankeyChartBase.prototype._isChartEmpty = function () {
|
|
920
|
+
var _a;
|
|
921
|
+
var sankeyChartData = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.SankeyChartData;
|
|
922
|
+
return !(sankeyChartData && sankeyChartData.nodes.length > 0 && sankeyChartData.links.length > 0);
|
|
923
|
+
};
|
|
924
|
+
SankeyChartBase.defaultProps = {
|
|
925
|
+
enableReflow: true,
|
|
926
|
+
};
|
|
927
|
+
return SankeyChartBase;
|
|
928
|
+
}(React.Component));
|
|
929
|
+
});
|
|
930
|
+
//# sourceMappingURL=SankeyChart.base.js.map
|