@fluentui/react-charts 9.1.9 → 9.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -2
- package/dist/index.d.ts +309 -8
- package/lib/AreaChart.js.map +1 -1
- package/lib/CartesianChart.js.map +1 -1
- package/lib/DeclarativeChart.js.map +1 -1
- package/lib/DonutChart.js.map +1 -1
- package/lib/FunnelChart.js +1 -0
- package/lib/FunnelChart.js.map +1 -0
- package/lib/GanttChart.js +1 -0
- package/lib/GanttChart.js.map +1 -0
- 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/Popover.js.map +1 -1
- package/lib/ResponsiveContainer.js.map +1 -1
- package/lib/SankeyChart.js.map +1 -1
- package/lib/ScatterChart.js.map +1 -1
- package/lib/Sparkline.js.map +1 -1
- package/lib/VerticalBarChart.js.map +1 -1
- package/lib/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.js +13 -5
- package/lib/components/AreaChart/AreaChart.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.js +10 -7
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib/components/DeclarativeChart/index.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +5 -5
- package/lib/components/DonutChart/Arc/Arc.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.js +7 -1
- package/lib/components/DonutChart/DonutChart.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.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/FunnelChart/FunnelChart.js +391 -0
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib/components/FunnelChart/funnelGeometry.js +220 -0
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib/components/FunnelChart/index.js +2 -0
- package/lib/components/FunnelChart/index.js.map +1 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +59 -0
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
- package/lib/components/GanttChart/GanttChart.js +530 -0
- package/lib/components/GanttChart/GanttChart.js.map +1 -0
- package/lib/components/GanttChart/GanttChart.types.js +4 -0
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
- package/lib/components/GanttChart/index.js +2 -0
- package/lib/components/GanttChart/index.js.map +1 -0
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +25 -0
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
- package/lib/components/GaugeChart/GaugeChart.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.js +10 -5
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.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.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.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChart/index.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -3
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.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.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/index.js.map +1 -1
- package/lib/components/Legends/shape.js +3 -3
- package/lib/components/Legends/shape.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +14 -7
- package/lib/components/LineChart/LineChart.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 +2 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/LineChart/index.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib/components/ResponsiveContainer/index.js.map +1 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.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/ScatterChart/ScatterChart.js +8 -2
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/index.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.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/VerticalBarChart/VerticalBarChart.js +10 -4
- package/lib/components/VerticalBarChart/VerticalBarChart.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.js +4 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.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 +2 -0
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +3 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/types/EventAnnotation.js.map +1 -1
- package/lib/types/LegendDataItem.js.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/KeyCodes.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/async-utils.js.map +1 -1
- package/lib/utilities/colors.js +12 -0
- package/lib/utilities/colors.js.map +1 -1
- package/lib/utilities/getWindow.js.map +1 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/overflow-utils.js.map +1 -1
- package/lib/utilities/string.js.map +1 -1
- package/lib/utilities/test-data.js +236 -0
- package/lib/utilities/test-data.js.map +1 -1
- package/lib/utilities/utilities.js +90 -22
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js +2 -2
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/AreaChart.js.map +1 -1
- package/lib-commonjs/CartesianChart.js.map +1 -1
- package/lib-commonjs/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/DonutChart.js.map +1 -1
- package/lib-commonjs/FunnelChart.js +6 -0
- package/lib-commonjs/FunnelChart.js.map +1 -0
- package/lib-commonjs/GanttChart.js +6 -0
- package/lib-commonjs/GanttChart.js.map +1 -0
- 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/Popover.js.map +1 -1
- package/lib-commonjs/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/SankeyChart.js.map +1 -1
- package/lib-commonjs/ScatterChart.js.map +1 -1
- package/lib-commonjs/Sparkline.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.js +13 -5
- package/lib-commonjs/components/AreaChart/AreaChart.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/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +9 -6
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +5 -5
- package/lib-commonjs/components/DonutChart/Arc/Arc.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/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +7 -1
- package/lib-commonjs/components/DonutChart/DonutChart.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.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/index.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +402 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/index.js +7 -0
- package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GanttChart/GanttChart.js +541 -0
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
- package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
- package/lib-commonjs/components/GanttChart/index.js +7 -0
- package/lib-commonjs/components/GanttChart/index.js.map +1 -0
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.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/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +10 -5
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.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/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.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/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
- 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/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +9 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.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/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/index.js.map +1 -1
- package/lib-commonjs/components/Legends/shape.js +2 -2
- package/lib-commonjs/components/Legends/shape.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +14 -7
- package/lib-commonjs/components/LineChart/LineChart.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 +2 -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/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.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/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +8 -2
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.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/Sparkline/useSparklineStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +10 -4
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.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/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +4 -4
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.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/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +2 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +3 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/types/EventAnnotation.js.map +1 -1
- package/lib-commonjs/types/LegendDataItem.js.map +1 -1
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/async-utils.js.map +1 -1
- package/lib-commonjs/utilities/colors.js +18 -0
- package/lib-commonjs/utilities/colors.js.map +1 -1
- package/lib-commonjs/utilities/getWindow.js.map +1 -1
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
- package/lib-commonjs/utilities/string.js.map +1 -1
- package/lib-commonjs/utilities/test-data.js +245 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +86 -17
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.js +2 -2
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["test-data.ts"],"sourcesContent":["import {\n ChartDataPoint,\n ChartProps,\n HorizontalBarChartWithAxisDataPoint,\n VSChartDataPoint,\n VerticalStackedChartProps,\n VerticalBarChartDataPoint,\n DataVizPalette,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: VerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: VerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: 'yellow' }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: 'yellow' }],\n },\n];\n\nexport const emptychartPointsVSBC: VerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: ChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: ChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: 'blue',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: 'aqua',\n },\n {\n y: 'String Two',\n x: 5000,\n color: 'blue',\n },\n {\n y: 'String Three',\n x: 3000,\n color: 'navy',\n },\n {\n y: 'String Four',\n x: 2000,\n color: 'blue',\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: 'aqua',\n },\n {\n x: 2000,\n y: 5000,\n color: 'blue',\n },\n {\n x: 3000,\n y: 3000,\n color: 'navy',\n },\n {\n x: 4000,\n y: 2000,\n color: 'blue',\n },\n];\n\nexport const allNegativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n"],"names":["DataVizPalette","chartPointsVBC","x","y","legend","color","xAxisCalloutData","yAxisCalloutData","firstChartPointsVSBC","data","secondChartPointsVSBC","chartPointsVSBC","chartData","xAxisPoint","chartPoints2VSBC","lineData","emptychartPointsVSBC","pointsHBCWA","pointsDC","pointsDCElevateMinimumsExample","chartPointsDC","chartTitle","chartPointsDCElevateMinimums","chartPointsHBCWA","chartPointsWithStringYAxisHBCWA","chartPointsWithAxisToolTipHBCWA","allNegativeChartPointsVBC","color1","color2","color3","negativeChartPointsVBC"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAOEA,cAAc,QACT,WAAW;AAElB,OAAO,MAAMC,iBAAiB;IAC5B;QACEC,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC;AAEF,MAAMC,uBAA2C;IAC/C;QACEJ,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEH,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;CACD;AAED,MAAMG,wBAA4C;IAChD;QACEN,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,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AAMoB,kCAAyE;IACpF;QACEvB,GAAG;QACHC,GAAG;QACHE,OAAO;IACT;IACA;QACEH,GAAG;QACHC,GAAG;QACHE,OAAO;IACT;IACA;QACEH,GAAG;QACHC,GAAG;QACHE,OAAO;IACT;IACA;QACEH,GAAG;QACHC,GAAG;QACHE,OAAO;IACT;CACD,CAAC;AAEF,OAAO,MAAMqB,4BAAyD;IACpE;QACExB,GAAG;QACHC,GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe2B,MAAM;QAC5BrB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe4B,MAAM;QAC5BtB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe6B,MAAM;QAC5BvB,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC;AAEF,OAAO,MAAMuB,yBAAsD;IACjE;QACE5B,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAOL,eAAe2B,MAAM;QAC5BrB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG,CAAC;QACJC,QAAQ;QACRC,OAAOL,eAAe4B,MAAM;QAC5BtB,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAOL,eAAe6B,MAAM;QAC5BvB,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC"}
|
|
1
|
+
{"version":3,"sources":["test-data.ts"],"sourcesContent":["import {\n ChartDataPoint,\n ChartProps,\n HorizontalBarChartWithAxisDataPoint,\n VSChartDataPoint,\n GanttChartDataPoint,\n VerticalStackedChartProps,\n VerticalBarChartDataPoint,\n DataVizPalette,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: VSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: VerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: VerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: 'yellow' }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: 'yellow' }],\n },\n];\n\nexport const emptychartPointsVSBC: VerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: 'blue',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: ChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: ChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: ChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: 'aqua',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: 'blue',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: 'navy',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: 'teal',\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: 'aqua',\n },\n {\n y: 'String Two',\n x: 5000,\n color: 'blue',\n },\n {\n y: 'String Three',\n x: 3000,\n color: 'navy',\n },\n {\n y: 'String Four',\n x: 2000,\n color: 'blue',\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: HorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: 'aqua',\n },\n {\n x: 2000,\n y: 5000,\n color: 'blue',\n },\n {\n x: 3000,\n y: 3000,\n color: 'navy',\n },\n {\n x: 4000,\n y: 2000,\n color: 'blue',\n },\n];\n\nexport const allNegativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC: VerticalBarChartDataPoint[] = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DataVizPalette.color1,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DataVizPalette.color2,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DataVizPalette.color3,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const ganttData: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2017-01-01'),\n end: new Date('2017-02-02'),\n },\n y: 'Job-1',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-01-14'),\n end: new Date('2017-03-14'),\n },\n y: 'Job-4',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: ['#0C5E0C', '#107C10'],\n },\n {\n x: {\n start: new Date('2017-02-15'),\n end: new Date('2017-03-15'),\n },\n y: 'Job-1',\n legend: 'Incomplete',\n color: DataVizPalette.warning,\n gradient: ['#DE590B', '#F7630C'],\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-03-10'),\n end: new Date('2017-03-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-04-01'),\n end: new Date('2017-04-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n {\n x: {\n start: new Date('2017-05-18'),\n end: new Date(new Date('2017-06-18')),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: ['#B10E1C', '#CC2635'],\n },\n];\n\nexport const ganttDataWithLongY: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2024-05-01'),\n end: new Date('2024-05-07'),\n },\n y: 'Site Preparation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-08'),\n end: new Date('2024-05-21'),\n },\n y: 'Foundation Work',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-22'),\n end: new Date('2024-06-02'),\n },\n y: 'Framing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-03'),\n end: new Date('2024-06-09'),\n },\n y: 'Roof Installation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-10'),\n end: new Date('2024-06-23'),\n },\n y: 'Plumbing/Electrical',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-07-08'),\n end: new Date('2024-07-17'),\n },\n y: 'Exterior Finishing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-24'),\n end: new Date('2024-07-07'),\n },\n y: 'Interior Finishing',\n legend: 'Yes (Phase 1)',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2024-07-18'),\n end: new Date('2024-07-24'),\n },\n y: 'Final Inspections',\n legend: 'Yes (Phase 2)',\n color: '#57811bff',\n },\n];\n\nexport const ganttDataWithNumericY: GanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2021-01-01'),\n end: new Date('2022-01-10'),\n },\n y: 1,\n legend: 'HR',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2022-01-15'),\n end: new Date('2022-01-20'),\n },\n y: 2,\n legend: 'Finance',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2022-02-01'),\n end: new Date('2022-02-08'),\n },\n y: 3,\n legend: 'IT',\n color: '#57811bff',\n },\n {\n x: {\n start: new Date('2022-02-10'),\n end: new Date('2022-02-20'),\n },\n y: 4,\n legend: 'Operations',\n color: '#9373c0ff',\n },\n {\n x: {\n start: new Date('2022-03-01'),\n end: new Date('2022-03-10'),\n },\n y: 5,\n legend: 'Customer Support',\n color: '#ca5010ff',\n },\n {\n x: {\n start: new Date('2022-03-05'),\n end: new Date('2022-03-15'),\n },\n y: 6,\n legend: 'Legal',\n color: '#3a96ddff',\n },\n];\n"],"names":["DataVizPalette","chartPointsVBC","x","y","legend","color","xAxisCalloutData","yAxisCalloutData","firstChartPointsVSBC","data","secondChartPointsVSBC","chartPointsVSBC","chartData","xAxisPoint","chartPoints2VSBC","lineData","emptychartPointsVSBC","pointsHBCWA","pointsDC","pointsDCElevateMinimumsExample","chartPointsDC","chartTitle","chartPointsDCElevateMinimums","chartPointsHBCWA","chartPointsWithStringYAxisHBCWA","chartPointsWithAxisToolTipHBCWA","allNegativeChartPointsVBC","color1","color2","color3","negativeChartPointsVBC","ganttData","start","Date","end","success","gradient","warning","error","ganttDataWithLongY","ganttDataWithNumericY"],"mappings":"AAAA,SAQEA,cAAc,QACT,WAAW;AAElB,OAAO,MAAMC,iBAAiB;IAC5B;QACEC,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEL,GAAG;QACHC,GAAG;QACHC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;CACD,CAAC;AAEF,MAAMC,uBAA2C;IAC/C;QACEJ,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEH,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;CACD;AAED,MAAMG,wBAA4C;IAChD;QACEN,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;IACA;QACEH,QAAQ;QACRK,MAAM;QACNJ,OAAO;QACPC,kBAAkB;QAClBC,kBAAkB;IACpB;CACD;AAED,OAAO,MAAMI,kBAA+C;IAC1D;QAAEC,WAAWJ;QAAsBK,YAAY;IAAE;IACjD;QAAED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YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;IACA;QACEH,GAAG;YACD8B,OAAO,IAAIC,KAAK;YAChBC,KAAK,IAAID,KAAK;QAChB;QACA9B,GAAG;QACHC,QAAQ;QACRC,OAAO;IACT;CACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axisRight as d3AxisRight, axisBottom as d3AxisBottom, axisLeft as d3AxisLeft } from 'd3-axis';
|
|
2
|
-
import { max as d3Max, min as d3Min, ticks as d3Ticks, nice as d3nice } from 'd3-array';
|
|
2
|
+
import { max as d3Max, min as d3Min, ticks as d3Ticks, nice as d3nice, sum as d3Sum, mean as d3Mean, median as d3Median } from 'd3-array';
|
|
3
3
|
import { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3ScaleUtc, scaleTime as d3ScaleTime } from 'd3-scale';
|
|
4
4
|
import { select as d3Select, selectAll as d3SelectAll } from 'd3-selection';
|
|
5
5
|
import { format as d3Format } from 'd3-format';
|
|
@@ -10,8 +10,7 @@ import { formatPrefix as d3FormatPrefix } from 'd3-format';
|
|
|
10
10
|
import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
|
|
11
11
|
import { formatDateToLocaleString, formatToLocaleString, getMultiLevelDateTimeFormatOptions } from '@fluentui/chart-utilities';
|
|
12
12
|
export const MIN_DOMAIN_MARGIN = 8;
|
|
13
|
-
export var ChartTypes
|
|
14
|
-
(function(ChartTypes) {
|
|
13
|
+
export var ChartTypes = /*#__PURE__*/ function(ChartTypes) {
|
|
15
14
|
ChartTypes[ChartTypes["AreaChart"] = 0] = "AreaChart";
|
|
16
15
|
ChartTypes[ChartTypes["LineChart"] = 1] = "LineChart";
|
|
17
16
|
ChartTypes[ChartTypes["VerticalBarChart"] = 2] = "VerticalBarChart";
|
|
@@ -20,19 +19,21 @@ export var ChartTypes;
|
|
|
20
19
|
ChartTypes[ChartTypes["HeatMapChart"] = 5] = "HeatMapChart";
|
|
21
20
|
ChartTypes[ChartTypes["HorizontalBarChartWithAxis"] = 6] = "HorizontalBarChartWithAxis";
|
|
22
21
|
ChartTypes[ChartTypes["ScatterChart"] = 7] = "ScatterChart";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(
|
|
22
|
+
ChartTypes[ChartTypes["GanttChart"] = 8] = "GanttChart";
|
|
23
|
+
return ChartTypes;
|
|
24
|
+
}({});
|
|
25
|
+
export var XAxisTypes = /*#__PURE__*/ function(XAxisTypes) {
|
|
26
26
|
XAxisTypes[XAxisTypes["NumericAxis"] = 0] = "NumericAxis";
|
|
27
27
|
XAxisTypes[XAxisTypes["DateAxis"] = 1] = "DateAxis";
|
|
28
28
|
XAxisTypes[XAxisTypes["StringAxis"] = 2] = "StringAxis";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return XAxisTypes;
|
|
30
|
+
}({});
|
|
31
|
+
export var YAxisType = /*#__PURE__*/ function(YAxisType) {
|
|
32
32
|
YAxisType[YAxisType["NumericAxis"] = 0] = "NumericAxis";
|
|
33
33
|
YAxisType[YAxisType["DateAxis"] = 1] = "DateAxis";
|
|
34
34
|
YAxisType[YAxisType["StringAxis"] = 2] = "StringAxis";
|
|
35
|
-
|
|
35
|
+
return YAxisType;
|
|
36
|
+
}({});
|
|
36
37
|
function yAxisTickFormatterInternal(value, limitWidth = false) {
|
|
37
38
|
// Use SI format prefix with 2 decimal places without insignificant trailing zeros
|
|
38
39
|
let formatter = d3FormatPrefix('.2~', value);
|
|
@@ -85,7 +86,10 @@ function yAxisTickFormatterInternal(value, limitWidth = false) {
|
|
|
85
86
|
tickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
|
|
86
87
|
}
|
|
87
88
|
const xAxis = d3AxisBottom(xAxisScale).tickSize(xAxistickSize).tickPadding(tickPadding).ticks(tickCount).tickFormat(tickFormat);
|
|
88
|
-
if (
|
|
89
|
+
if ([
|
|
90
|
+
6,
|
|
91
|
+
8
|
|
92
|
+
].includes(chartType)) {
|
|
89
93
|
xAxis.tickSizeInner(-(xAxisParams.containerHeight - xAxisParams.margins.top));
|
|
90
94
|
}
|
|
91
95
|
if (tickParams.tickValues) {
|
|
@@ -239,7 +243,7 @@ function yAxisTickFormatterInternal(value, limitWidth = false) {
|
|
|
239
243
|
const formatter = timeFormat(MULTI_LEVEL_DATE_TIME_FORMATS[startLevel][endLevel]);
|
|
240
244
|
return formatter;
|
|
241
245
|
}
|
|
242
|
-
function getDateFormatLevel(date, useUTC) {
|
|
246
|
+
export function getDateFormatLevel(date, useUTC) {
|
|
243
247
|
const timeSecond = useUTC ? d3UtcSecond : d3TimeSecond;
|
|
244
248
|
const timeMinute = useUTC ? d3UtcMinute : d3TimeMinute;
|
|
245
249
|
const timeHour = useUTC ? d3UtcHour : d3TimeHour;
|
|
@@ -290,7 +294,7 @@ function getDateFormatLevel(date, useUTC) {
|
|
|
290
294
|
* @export
|
|
291
295
|
* @param {IXAxisParams} xAxisParams
|
|
292
296
|
* @param {ITickParams} tickParams
|
|
293
|
-
*/ export function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC) {
|
|
297
|
+
*/ export function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC, chartType) {
|
|
294
298
|
const { domainNRangeValues, xAxisElement, tickPadding = 6, xAxistickSize = 6, xAxisCount } = xAxisParams;
|
|
295
299
|
const isUtcSet = useUTC === true || useUTC === 'utc';
|
|
296
300
|
const xAxisScale = isUtcSet ? d3ScaleUtc() : d3ScaleTime();
|
|
@@ -337,6 +341,11 @@ function getDateFormatLevel(date, useUTC) {
|
|
|
337
341
|
const maxPossibleTickCount = Math.min(Math.max(1, Math.floor(Math.abs(end - start) / longestLabelWidth)), 10);
|
|
338
342
|
tickCount = Math.min(maxPossibleTickCount, xAxisCount !== null && xAxisCount !== void 0 ? xAxisCount : tickCount);
|
|
339
343
|
const xAxis = d3AxisBottom(xAxisScale).tickSize(xAxistickSize).tickPadding(tickPadding).ticks(tickCount).tickFormat(tickFormat);
|
|
344
|
+
if ([
|
|
345
|
+
8
|
|
346
|
+
].includes(chartType)) {
|
|
347
|
+
xAxis.tickSizeInner(-(xAxisParams.containerHeight - xAxisParams.margins.top));
|
|
348
|
+
}
|
|
340
349
|
tickParams.tickValues ? xAxis.tickValues(tickParams.tickValues) : '';
|
|
341
350
|
if (xAxisElement) {
|
|
342
351
|
d3Select(xAxisElement).call(xAxis).selectAll('text').attr('aria-hidden', 'true');
|
|
@@ -1182,7 +1191,7 @@ export function tooltipOfAxislabels(axistooltipProps) {
|
|
|
1182
1191
|
};
|
|
1183
1192
|
}
|
|
1184
1193
|
/**
|
|
1185
|
-
*
|
|
1194
|
+
* Finds the min and max values of the vertical bar chart y axis data point.
|
|
1186
1195
|
* @export
|
|
1187
1196
|
* @param {VerticalBarChartDataPoint[]} points
|
|
1188
1197
|
* @returns {{ startValue: number; endValue: number }}
|
|
@@ -1204,9 +1213,9 @@ export function tooltipOfAxislabels(axistooltipProps) {
|
|
|
1204
1213
|
};
|
|
1205
1214
|
}
|
|
1206
1215
|
/**
|
|
1207
|
-
*
|
|
1216
|
+
* Finds the min and max values of the horizontal bar chart y axis data point.
|
|
1208
1217
|
* @export
|
|
1209
|
-
* @param {
|
|
1218
|
+
* @param {HorizontalBarChartWithAxisDataPoint[]|GanttChartDataPoint[]} points
|
|
1210
1219
|
* @returns {{ startValue: number; endValue: number }}
|
|
1211
1220
|
*/ export function findHBCWANumericMinMaxOfY(points, yAxisType) {
|
|
1212
1221
|
if (yAxisType !== undefined && yAxisType === 0) {
|
|
@@ -1248,8 +1257,10 @@ export function tooltipOfAxislabels(axistooltipProps) {
|
|
|
1248
1257
|
}
|
|
1249
1258
|
}
|
|
1250
1259
|
};
|
|
1251
|
-
|
|
1252
|
-
|
|
1260
|
+
/**
|
|
1261
|
+
* we need to make sure that if we add any property to this, then
|
|
1262
|
+
* we need to also add that in pointTypes below and vise-versa
|
|
1263
|
+
*/ export var Points = /*#__PURE__*/ function(Points) {
|
|
1253
1264
|
Points[Points["circle"] = 0] = "circle";
|
|
1254
1265
|
Points[Points["square"] = 1] = "square";
|
|
1255
1266
|
Points[Points["triangle"] = 2] = "triangle";
|
|
@@ -1258,11 +1269,12 @@ export var Points;
|
|
|
1258
1269
|
Points[Points["hexagon"] = 5] = "hexagon";
|
|
1259
1270
|
Points[Points["pentagon"] = 6] = "pentagon";
|
|
1260
1271
|
Points[Points["octagon"] = 7] = "octagon";
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1272
|
+
return Points;
|
|
1273
|
+
}({});
|
|
1274
|
+
export var CustomPoints = /*#__PURE__*/ function(CustomPoints) {
|
|
1264
1275
|
CustomPoints[CustomPoints["dottedLine"] = 0] = "dottedLine";
|
|
1265
|
-
|
|
1276
|
+
return CustomPoints;
|
|
1277
|
+
}({});
|
|
1266
1278
|
/**
|
|
1267
1279
|
* we need to make sure that if we add any property to this, then
|
|
1268
1280
|
* we need to also add that in enum Point and vise-versa
|
|
@@ -1481,3 +1493,59 @@ export const truncateString = (str, maxLength, ellipsis = '...')=>{
|
|
|
1481
1493
|
}
|
|
1482
1494
|
return str.slice(0, maxLength) + ellipsis;
|
|
1483
1495
|
};
|
|
1496
|
+
const categoryOrderRegex = /(category|total|sum|min|max|mean|median) (ascending|descending)/;
|
|
1497
|
+
/**
|
|
1498
|
+
* @see {@link https://github.com/plotly/plotly.js/blob/master/src/plots/plots.js#L3041}
|
|
1499
|
+
*/ export const sortAxisCategories = (categoryToValues, categoryOrder)=>{
|
|
1500
|
+
if (Array.isArray(categoryOrder)) {
|
|
1501
|
+
const result = [];
|
|
1502
|
+
const seen = new Set();
|
|
1503
|
+
// Add elements from categoryOrder array that are in categoryToValues, in the array's order
|
|
1504
|
+
categoryOrder.forEach((category)=>{
|
|
1505
|
+
if (categoryToValues[category] && !seen.has(category)) {
|
|
1506
|
+
result.push(category);
|
|
1507
|
+
seen.add(category);
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
// Append any keys from categoryToValues not already in result
|
|
1511
|
+
Object.keys(categoryToValues).forEach((category)=>{
|
|
1512
|
+
if (!seen.has(category)) {
|
|
1513
|
+
result.push(category);
|
|
1514
|
+
}
|
|
1515
|
+
});
|
|
1516
|
+
return result;
|
|
1517
|
+
}
|
|
1518
|
+
const match = categoryOrder === null || categoryOrder === void 0 ? void 0 : categoryOrder.match(categoryOrderRegex);
|
|
1519
|
+
if (match) {
|
|
1520
|
+
const aggregator = match[1];
|
|
1521
|
+
const order = match[2];
|
|
1522
|
+
if (aggregator === 'category') {
|
|
1523
|
+
const result = Object.keys(categoryToValues).sort();
|
|
1524
|
+
return order === 'descending' ? result.reverse() : result;
|
|
1525
|
+
}
|
|
1526
|
+
const aggFn = {
|
|
1527
|
+
min: d3Min,
|
|
1528
|
+
max: d3Max,
|
|
1529
|
+
sum: d3Sum,
|
|
1530
|
+
total: d3Sum,
|
|
1531
|
+
mean: d3Mean,
|
|
1532
|
+
median: d3Median
|
|
1533
|
+
};
|
|
1534
|
+
const sortAscending = (a, b)=>{
|
|
1535
|
+
return a[1] - b[1];
|
|
1536
|
+
};
|
|
1537
|
+
const sortDescending = (a, b)=>{
|
|
1538
|
+
return b[1] - a[1];
|
|
1539
|
+
};
|
|
1540
|
+
const categoriesAggregatedValue = [];
|
|
1541
|
+
Object.keys(categoryToValues).forEach((category)=>{
|
|
1542
|
+
categoriesAggregatedValue.push([
|
|
1543
|
+
category,
|
|
1544
|
+
aggFn[aggregator](categoryToValues[category]) || 0
|
|
1545
|
+
]);
|
|
1546
|
+
});
|
|
1547
|
+
categoriesAggregatedValue.sort(order === 'descending' ? sortDescending : sortAscending);
|
|
1548
|
+
return categoriesAggregatedValue.map(([category])=>category);
|
|
1549
|
+
}
|
|
1550
|
+
return Object.keys(categoryToValues);
|
|
1551
|
+
};
|