@fluentui/react-charts 9.3.27 → 9.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -2
- package/dist/index.d.cts +51 -0
- package/dist/index.d.ts +51 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -4
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -1
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.js +35 -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/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/ChartTable/index.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +19 -29
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/index.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +2 -2
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +2 -2
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +17 -15
- 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 +3 -2
- 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/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -9
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -4
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +92 -110
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/index.js.map +1 -1
- 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/Arc/useArcStyles.styles.raw.js.map +1 -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/Pie/usePieStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/index.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +5 -5
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
- package/lib/components/FunnelChart/index.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +4 -3
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GanttChart/index.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +34 -13
- 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/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +45 -46
- 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/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -0
- 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/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +5 -6
- package/lib/components/HorizontalBarChart/HorizontalBarChart.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/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -4
- 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/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.js +16 -20
- 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 +13 -10
- package/lib/components/Legends/OverflowMenu.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/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +40 -36
- 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.map +1 -1
- package/lib/components/LineChart/index.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/PolarChart/PolarChart.js +3 -4
- package/lib/components/PolarChart/PolarChart.js.map +1 -1
- package/lib/components/PolarChart/PolarChart.types.js.map +1 -1
- package/lib/components/PolarChart/PolarChart.utils.js +3 -3
- package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
- package/lib/components/PolarChart/index.js.map +1 -1
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +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/useResponsiveChildStyles.styles.raw.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/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +3 -3
- 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/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +1 -3
- 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/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +2 -2
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +88 -88
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/index.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -1
- 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/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +6 -5
- 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/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/types/ChartAnnotation.js.map +1 -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/ChartTitle.js +3 -4
- package/lib/utilities/ChartTitle.js.map +1 -1
- package/lib/utilities/Common.styles.js +1 -4
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +1 -4
- package/lib/utilities/Common.styles.raw.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.map +1 -1
- package/lib/utilities/getWindow.js.map +1 -1
- package/lib/utilities/hooks.js.map +1 -1
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/overflow-utils.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.js +3 -4
- package/lib/utilities/scatterpolar-utils.js.map +1 -1
- package/lib/utilities/string.js.map +1 -1
- package/lib/utilities/test-data/specialChartNames.js +11 -0
- package/lib/utilities/test-data/specialChartNames.js.map +1 -0
- package/lib/utilities/test-data.js.map +1 -1
- package/lib/utilities/utilities.js +9 -9
- package/lib/utilities/utilities.js.map +1 -1
- package/lib/utilities/vbc-utils.js.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs +1 -4
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.cjs.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.cjs.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/index.cjs.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.cjs +35 -5
- package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.types.cjs.map +1 -1
- package/lib-commonjs/components/AreaChart/index.cjs.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.cjs.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.cjs.map +1 -1
- package/lib-commonjs/components/ChartTable/index.cjs.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs +19 -29
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/index.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs +14 -14
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs +14 -14
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.cjs +17 -15
- package/lib-commonjs/components/CommonComponents/CartesianChart.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.cjs +3 -2
- package/lib-commonjs/components/CommonComponents/ChartPopover.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs +3 -3
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs +9 -9
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.cjs.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs +13 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.cjs.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs +122 -140
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.cjs.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/index.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/index.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs +3 -3
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/index.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs +3 -3
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/index.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.cjs +5 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs +6 -6
- package/lib-commonjs/components/FunnelChart/funnelGeometry.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/index.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.cjs +4 -3
- package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/index.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +41 -20
- package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/index.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +44 -44
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/index.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/index.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs +5 -6
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/index.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +4 -4
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs +3 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Legends/Legends.cjs +16 -19
- package/lib-commonjs/components/Legends/Legends.cjs.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.cjs.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.cjs +12 -9
- package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -1
- package/lib-commonjs/components/Legends/index.cjs.map +1 -1
- package/lib-commonjs/components/Legends/shape.cjs.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs +11 -11
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs +11 -11
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.cjs +40 -36
- package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/index.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/PolarChart.cjs +3 -4
- package/lib-commonjs/components/PolarChart/PolarChart.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/PolarChart.types.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs +10 -10
- package/lib-commonjs/components/PolarChart/PolarChart.utils.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/index.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/index.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.cjs.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.cjs +5 -5
- package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.cjs.map +1 -1
- package/lib-commonjs/components/SankeyChart/index.cjs.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +3 -3
- package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/index.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.cjs +1 -3
- package/lib-commonjs/components/Sparkline/Sparkline.cjs.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.types.cjs.map +1 -1
- package/lib-commonjs/components/Sparkline/index.cjs.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs +3 -3
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs +7 -7
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +105 -105
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/index.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs +2 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/index.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +6 -5
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/index.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs +3 -3
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.cjs.map +1 -1
- package/lib-commonjs/types/DataPoint.cjs.map +1 -1
- package/lib-commonjs/types/EventAnnotation.cjs.map +1 -1
- package/lib-commonjs/types/LegendDataItem.cjs.map +1 -1
- package/lib-commonjs/types/index.cjs.map +1 -1
- package/lib-commonjs/utilities/ChartTitle.cjs +3 -4
- package/lib-commonjs/utilities/ChartTitle.cjs.map +1 -1
- package/lib-commonjs/utilities/Common.styles.cjs +9 -12
- package/lib-commonjs/utilities/Common.styles.cjs.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.cjs +9 -12
- package/lib-commonjs/utilities/Common.styles.raw.cjs.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.cjs.map +1 -1
- package/lib-commonjs/utilities/KeyCodes.cjs.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.cjs.map +1 -1
- package/lib-commonjs/utilities/async-utils.cjs.map +1 -1
- package/lib-commonjs/utilities/colors.cjs +7 -7
- package/lib-commonjs/utilities/colors.cjs.map +1 -1
- package/lib-commonjs/utilities/getWindow.cjs.map +1 -1
- package/lib-commonjs/utilities/hooks.cjs.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.cjs +3 -3
- package/lib-commonjs/utilities/image-export-utils.cjs.map +1 -1
- package/lib-commonjs/utilities/index.cjs.map +1 -1
- package/lib-commonjs/utilities/overflow-utils.cjs +4 -4
- package/lib-commonjs/utilities/overflow-utils.cjs.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.cjs +6 -7
- package/lib-commonjs/utilities/scatterpolar-utils.cjs.map +1 -1
- package/lib-commonjs/utilities/string.cjs +1 -1
- package/lib-commonjs/utilities/string.cjs.map +1 -1
- package/lib-commonjs/utilities/test-data/specialChartNames.cjs +21 -0
- package/lib-commonjs/utilities/test-data/specialChartNames.cjs.map +1 -0
- package/lib-commonjs/utilities/test-data.cjs +18 -18
- package/lib-commonjs/utilities/test-data.cjs.map +1 -1
- package/lib-commonjs/utilities/utilities.cjs +92 -92
- package/lib-commonjs/utilities/utilities.cjs.map +1 -1
- package/lib-commonjs/utilities/vbc-utils.cjs +7 -7
- package/lib-commonjs/utilities/vbc-utils.cjs.map +1 -1
- package/package.json +9 -9
|
@@ -7,56 +7,56 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
function _export(target, all) {
|
|
8
8
|
for(var name in all)Object.defineProperty(target, name, {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: all
|
|
10
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
_export(exports, {
|
|
14
|
-
autoCorrectEncodingTypes
|
|
14
|
+
get autoCorrectEncodingTypes () {
|
|
15
15
|
return autoCorrectEncodingTypes;
|
|
16
16
|
},
|
|
17
|
-
getChartType
|
|
17
|
+
get getChartType () {
|
|
18
18
|
return getChartType;
|
|
19
19
|
},
|
|
20
|
-
getMarkType
|
|
20
|
+
get getMarkType () {
|
|
21
21
|
return getMarkType;
|
|
22
22
|
},
|
|
23
|
-
getVegaLiteLegendsProps
|
|
23
|
+
get getVegaLiteLegendsProps () {
|
|
24
24
|
return getVegaLiteLegendsProps;
|
|
25
25
|
},
|
|
26
|
-
getVegaLiteTitles
|
|
26
|
+
get getVegaLiteTitles () {
|
|
27
27
|
return getVegaLiteTitles;
|
|
28
28
|
},
|
|
29
|
-
transformVegaLiteToAreaChartProps
|
|
29
|
+
get transformVegaLiteToAreaChartProps () {
|
|
30
30
|
return transformVegaLiteToAreaChartProps;
|
|
31
31
|
},
|
|
32
|
-
transformVegaLiteToDonutChartProps
|
|
32
|
+
get transformVegaLiteToDonutChartProps () {
|
|
33
33
|
return transformVegaLiteToDonutChartProps;
|
|
34
34
|
},
|
|
35
|
-
transformVegaLiteToGroupedVerticalBarChartProps
|
|
35
|
+
get transformVegaLiteToGroupedVerticalBarChartProps () {
|
|
36
36
|
return transformVegaLiteToGroupedVerticalBarChartProps;
|
|
37
37
|
},
|
|
38
|
-
transformVegaLiteToHeatMapChartProps
|
|
38
|
+
get transformVegaLiteToHeatMapChartProps () {
|
|
39
39
|
return transformVegaLiteToHeatMapChartProps;
|
|
40
40
|
},
|
|
41
|
-
transformVegaLiteToHistogramProps
|
|
41
|
+
get transformVegaLiteToHistogramProps () {
|
|
42
42
|
return transformVegaLiteToHistogramProps;
|
|
43
43
|
},
|
|
44
|
-
transformVegaLiteToHorizontalBarChartProps
|
|
44
|
+
get transformVegaLiteToHorizontalBarChartProps () {
|
|
45
45
|
return transformVegaLiteToHorizontalBarChartProps;
|
|
46
46
|
},
|
|
47
|
-
transformVegaLiteToLineChartProps
|
|
47
|
+
get transformVegaLiteToLineChartProps () {
|
|
48
48
|
return transformVegaLiteToLineChartProps;
|
|
49
49
|
},
|
|
50
|
-
transformVegaLiteToPolarChartProps
|
|
50
|
+
get transformVegaLiteToPolarChartProps () {
|
|
51
51
|
return transformVegaLiteToPolarChartProps;
|
|
52
52
|
},
|
|
53
|
-
transformVegaLiteToScatterChartProps
|
|
53
|
+
get transformVegaLiteToScatterChartProps () {
|
|
54
54
|
return transformVegaLiteToScatterChartProps;
|
|
55
55
|
},
|
|
56
|
-
transformVegaLiteToVerticalBarChartProps
|
|
56
|
+
get transformVegaLiteToVerticalBarChartProps () {
|
|
57
57
|
return transformVegaLiteToVerticalBarChartProps;
|
|
58
58
|
},
|
|
59
|
-
transformVegaLiteToVerticalStackedBarChartProps
|
|
59
|
+
get transformVegaLiteToVerticalStackedBarChartProps () {
|
|
60
60
|
return transformVegaLiteToVerticalStackedBarChartProps;
|
|
61
61
|
}
|
|
62
62
|
});
|
|
@@ -147,6 +147,9 @@ function getMarkType(mark) {
|
|
|
147
147
|
}
|
|
148
148
|
return [];
|
|
149
149
|
}
|
|
150
|
+
function getOwnDataValue(row, field) {
|
|
151
|
+
return Object.prototype.hasOwnProperty.call(row, field) ? row[field] : undefined;
|
|
152
|
+
}
|
|
150
153
|
/**
|
|
151
154
|
* Applies a fold transform to convert wide-format data to long-format
|
|
152
155
|
* The fold transform unpivots specified fields into key-value pairs
|
|
@@ -163,7 +166,7 @@ function getMarkType(mark) {
|
|
|
163
166
|
const result = [];
|
|
164
167
|
for (const row of data){
|
|
165
168
|
// Create a base row without the fields being folded
|
|
166
|
-
const baseRow =
|
|
169
|
+
const baseRow = Object.create(null);
|
|
167
170
|
for (const [key, value] of Object.entries(row)){
|
|
168
171
|
if (!foldFields.includes(key)) {
|
|
169
172
|
baseRow[key] = value;
|
|
@@ -171,7 +174,7 @@ function getMarkType(mark) {
|
|
|
171
174
|
}
|
|
172
175
|
// Create a new row for each folded field
|
|
173
176
|
for (const field of foldFields){
|
|
174
|
-
if (field
|
|
177
|
+
if (Object.prototype.hasOwnProperty.call(row, field)) {
|
|
175
178
|
result.push({
|
|
176
179
|
...baseRow,
|
|
177
180
|
[keyField]: field,
|
|
@@ -239,19 +242,20 @@ function getMarkType(mark) {
|
|
|
239
242
|
const groupby = transform.groupby || [];
|
|
240
243
|
const groups = new Map();
|
|
241
244
|
result.forEach((row)=>{
|
|
242
|
-
const key = groupby.map((g)=>String(row
|
|
245
|
+
const key = groupby.map((g)=>String(getOwnDataValue(row, g))).join('|');
|
|
243
246
|
if (!groups.has(key)) {
|
|
244
247
|
groups.set(key, []);
|
|
245
248
|
}
|
|
246
249
|
groups.get(key).push(row);
|
|
247
250
|
});
|
|
248
251
|
result = Array.from(groups.entries()).map(([key, rows])=>{
|
|
252
|
+
// Grouping fields and aggregate aliases are data keys, including "__proto__".
|
|
249
253
|
const baseRow = Object.create(null);
|
|
250
254
|
groupby.forEach((g, i)=>{
|
|
251
|
-
baseRow[g] = rows[0]
|
|
255
|
+
baseRow[g] = getOwnDataValue(rows[0], g);
|
|
252
256
|
});
|
|
253
257
|
aggSpecs.forEach((spec)=>{
|
|
254
|
-
const values = spec.field ? rows.map((r)=>Number(r
|
|
258
|
+
const values = spec.field ? rows.map((r)=>Number(getOwnDataValue(r, spec.field))).filter((v)=>!isNaN(v)) : [];
|
|
255
259
|
switch(spec.op){
|
|
256
260
|
case 'count':
|
|
257
261
|
baseRow[spec.as] = rows.length;
|
|
@@ -276,7 +280,10 @@ function getMarkType(mark) {
|
|
|
276
280
|
baseRow[spec.as] = rows.length;
|
|
277
281
|
}
|
|
278
282
|
});
|
|
279
|
-
|
|
283
|
+
// Preserve ordinary row coercion without invoking setters for data keys.
|
|
284
|
+
return {
|
|
285
|
+
...baseRow
|
|
286
|
+
};
|
|
280
287
|
});
|
|
281
288
|
}
|
|
282
289
|
// Handle window transform
|
|
@@ -287,7 +294,7 @@ function getMarkType(mark) {
|
|
|
287
294
|
// Group data
|
|
288
295
|
const groups = new Map();
|
|
289
296
|
result.forEach((row)=>{
|
|
290
|
-
const key = groupby.length > 0 ? groupby.map((g)=>String(row
|
|
297
|
+
const key = groupby.length > 0 ? groupby.map((g)=>String(getOwnDataValue(row, g))).join('|') : '__all__';
|
|
291
298
|
if (!groups.has(key)) {
|
|
292
299
|
groups.set(key, []);
|
|
293
300
|
}
|
|
@@ -299,8 +306,8 @@ function getMarkType(mark) {
|
|
|
299
306
|
if (sortFields.length > 0) {
|
|
300
307
|
rows.sort((a, b)=>{
|
|
301
308
|
for (const sf of sortFields){
|
|
302
|
-
const va = Number(a
|
|
303
|
-
const vb = Number(b
|
|
309
|
+
const va = Number(getOwnDataValue(a, sf.field)) || 0;
|
|
310
|
+
const vb = Number(getOwnDataValue(b, sf.field)) || 0;
|
|
304
311
|
const cmp = sf.order === 'descending' ? vb - va : va - vb;
|
|
305
312
|
if (cmp !== 0) {
|
|
306
313
|
return cmp;
|
|
@@ -311,13 +318,11 @@ function getMarkType(mark) {
|
|
|
311
318
|
}
|
|
312
319
|
let runningSum = 0;
|
|
313
320
|
rows.forEach((row, idx)=>{
|
|
314
|
-
const newRow =
|
|
315
|
-
...row
|
|
316
|
-
};
|
|
321
|
+
const newRow = Object.assign(Object.create(null), row);
|
|
317
322
|
windowOps.forEach((op)=>{
|
|
318
323
|
switch(op.op){
|
|
319
324
|
case 'sum':
|
|
320
|
-
runningSum += Number(row
|
|
325
|
+
runningSum += Number(getOwnDataValue(row, op.field)) || 0;
|
|
321
326
|
newRow[op.as] = runningSum;
|
|
322
327
|
break;
|
|
323
328
|
case 'rank':
|
|
@@ -333,7 +338,9 @@ function getMarkType(mark) {
|
|
|
333
338
|
newRow[op.as] = idx + 1;
|
|
334
339
|
}
|
|
335
340
|
});
|
|
336
|
-
newResult.push(
|
|
341
|
+
newResult.push({
|
|
342
|
+
...newRow
|
|
343
|
+
});
|
|
337
344
|
});
|
|
338
345
|
});
|
|
339
346
|
result = newResult;
|
|
@@ -345,7 +352,7 @@ function getMarkType(mark) {
|
|
|
345
352
|
// Compute aggregates
|
|
346
353
|
const groups = new Map();
|
|
347
354
|
result.forEach((row)=>{
|
|
348
|
-
const key = groupby.length > 0 ? groupby.map((g)=>String(row
|
|
355
|
+
const key = groupby.length > 0 ? groupby.map((g)=>String(getOwnDataValue(row, g))).join('|') : '__all__';
|
|
349
356
|
if (!groups.has(key)) {
|
|
350
357
|
groups.set(key, []);
|
|
351
358
|
}
|
|
@@ -353,9 +360,9 @@ function getMarkType(mark) {
|
|
|
353
360
|
});
|
|
354
361
|
const aggResults = new Map();
|
|
355
362
|
groups.forEach((rows, key)=>{
|
|
356
|
-
const aggs =
|
|
363
|
+
const aggs = Object.create(null);
|
|
357
364
|
aggSpecs.forEach((spec)=>{
|
|
358
|
-
const values = spec.field ? rows.map((r)=>Number(r
|
|
365
|
+
const values = spec.field ? rows.map((r)=>Number(getOwnDataValue(r, spec.field))).filter((v)=>!isNaN(v)) : [];
|
|
359
366
|
switch(spec.op){
|
|
360
367
|
case 'mean':
|
|
361
368
|
case 'average':
|
|
@@ -384,7 +391,7 @@ function getMarkType(mark) {
|
|
|
384
391
|
});
|
|
385
392
|
// Join back: add aggregate values to each row
|
|
386
393
|
result = result.map((row)=>{
|
|
387
|
-
const key = groupby.length > 0 ? groupby.map((g)=>String(row
|
|
394
|
+
const key = groupby.length > 0 ? groupby.map((g)=>String(getOwnDataValue(row, g))).join('|') : '__all__';
|
|
388
395
|
return {
|
|
389
396
|
...row,
|
|
390
397
|
...aggResults.get(key) || {}
|
|
@@ -396,10 +403,11 @@ function getMarkType(mark) {
|
|
|
396
403
|
const yField = transform.regression;
|
|
397
404
|
const xField = transform.on;
|
|
398
405
|
const points = result.map((r)=>({
|
|
399
|
-
x: Number(r
|
|
400
|
-
y: Number(r
|
|
406
|
+
x: Number(getOwnDataValue(r, xField)),
|
|
407
|
+
y: Number(getOwnDataValue(r, yField))
|
|
401
408
|
})).filter((p)=>!isNaN(p.x) && !isNaN(p.y));
|
|
402
409
|
if (points.length >= 2) {
|
|
410
|
+
var _d3Min, _d3Max;
|
|
403
411
|
const n = points.length;
|
|
404
412
|
const sumX = (0, _d3array.sum)(points.map((p)=>p.x));
|
|
405
413
|
const sumY = (0, _d3array.sum)(points.map((p)=>p.y));
|
|
@@ -407,9 +415,7 @@ function getMarkType(mark) {
|
|
|
407
415
|
const sumX2 = (0, _d3array.sum)(points.map((p)=>p.x * p.x));
|
|
408
416
|
const slope = (n * sumXY - sumX * sumY) / (n * sumX2 - sumX * sumX);
|
|
409
417
|
const intercept = (sumY - slope * sumX) / n;
|
|
410
|
-
var _d3Min;
|
|
411
418
|
const xMin = (_d3Min = (0, _d3array.min)(points.map((p)=>p.x))) !== null && _d3Min !== void 0 ? _d3Min : 0;
|
|
412
|
-
var _d3Max;
|
|
413
419
|
const xMax = (_d3Max = (0, _d3array.max)(points.map((p)=>p.x))) !== null && _d3Max !== void 0 ? _d3Max : 0;
|
|
414
420
|
result = [
|
|
415
421
|
{
|
|
@@ -429,16 +435,16 @@ function getMarkType(mark) {
|
|
|
429
435
|
const xField = transform.on;
|
|
430
436
|
const sorted = [
|
|
431
437
|
...result
|
|
432
|
-
].filter((r)=>!isNaN(Number(r
|
|
438
|
+
].filter((r)=>!isNaN(Number(getOwnDataValue(r, xField))) && !isNaN(Number(getOwnDataValue(r, yField)))).sort((a, b)=>Number(getOwnDataValue(a, xField)) - Number(getOwnDataValue(b, xField)));
|
|
433
439
|
const windowSize = Math.max(3, Math.floor(sorted.length / 4));
|
|
434
440
|
result = sorted.map((row, i)=>{
|
|
441
|
+
var _d3Mean;
|
|
435
442
|
const start = Math.max(0, i - Math.floor(windowSize / 2));
|
|
436
443
|
const end = Math.min(sorted.length, start + windowSize);
|
|
437
444
|
const windowSlice = sorted.slice(start, end);
|
|
438
|
-
|
|
439
|
-
const avgY = (_d3Mean = (0, _d3array.mean)(windowSlice.map((r)=>Number(r[yField])))) !== null && _d3Mean !== void 0 ? _d3Mean : Number(row[yField]);
|
|
445
|
+
const avgY = (_d3Mean = (0, _d3array.mean)(windowSlice.map((r)=>Number(getOwnDataValue(r, yField))))) !== null && _d3Mean !== void 0 ? _d3Mean : Number(getOwnDataValue(row, yField));
|
|
440
446
|
return {
|
|
441
|
-
[xField]: row
|
|
447
|
+
[xField]: getOwnDataValue(row, xField),
|
|
442
448
|
[yField]: avgY
|
|
443
449
|
};
|
|
444
450
|
});
|
|
@@ -449,26 +455,25 @@ function getMarkType(mark) {
|
|
|
449
455
|
const groupby = transform.groupby || [];
|
|
450
456
|
const groups = new Map();
|
|
451
457
|
result.forEach((row)=>{
|
|
452
|
-
const key = groupby.length > 0 ? groupby.map((g)=>String(row
|
|
458
|
+
const key = groupby.length > 0 ? groupby.map((g)=>String(getOwnDataValue(row, g))).join('|') : '__all__';
|
|
453
459
|
if (!groups.has(key)) {
|
|
454
460
|
groups.set(key, []);
|
|
455
461
|
}
|
|
456
|
-
groups.get(key).push(Number(row
|
|
462
|
+
groups.get(key).push(Number(getOwnDataValue(row, field)));
|
|
457
463
|
});
|
|
458
464
|
const densityResult = [];
|
|
459
465
|
groups.forEach((values, key)=>{
|
|
460
|
-
var _d3Min;
|
|
466
|
+
var _d3Min, _d3Max;
|
|
461
467
|
const min = (_d3Min = (0, _d3array.min)(values)) !== null && _d3Min !== void 0 ? _d3Min : 0;
|
|
462
|
-
var _d3Max;
|
|
463
468
|
const max = (_d3Max = (0, _d3array.max)(values)) !== null && _d3Max !== void 0 ? _d3Max : 0;
|
|
464
469
|
const range = max - min || 1;
|
|
465
470
|
const bins = 20;
|
|
466
471
|
const bandwidth = range / bins;
|
|
467
|
-
const groupFields =
|
|
472
|
+
const groupFields = Object.create(null);
|
|
468
473
|
if (groupby.length > 0) {
|
|
469
|
-
const sampleRow = result.find((r)=>groupby.map((g)=>String(r
|
|
474
|
+
const sampleRow = result.find((r)=>groupby.map((g)=>String(getOwnDataValue(r, g))).join('|') === key);
|
|
470
475
|
groupby.forEach((g)=>{
|
|
471
|
-
groupFields[g] = sampleRow
|
|
476
|
+
groupFields[g] = sampleRow ? getOwnDataValue(sampleRow, g) : undefined;
|
|
472
477
|
});
|
|
473
478
|
}
|
|
474
479
|
for(let i = 0; i <= bins; i++){
|
|
@@ -492,7 +497,7 @@ function getMarkType(mark) {
|
|
|
492
497
|
0.5,
|
|
493
498
|
0.75
|
|
494
499
|
];
|
|
495
|
-
const values = result.map((r)=>Number(r
|
|
500
|
+
const values = result.map((r)=>Number(getOwnDataValue(r, field))).filter((v)=>!isNaN(v)).sort((a, b)=>a - b);
|
|
496
501
|
if (values.length > 0) {
|
|
497
502
|
result = probs.map((p)=>{
|
|
498
503
|
const idx = Math.min(Math.floor(p * values.length), values.length - 1);
|
|
@@ -505,28 +510,27 @@ function getMarkType(mark) {
|
|
|
505
510
|
}
|
|
506
511
|
// Handle impute transform (fill missing values)
|
|
507
512
|
if ('impute' in transform && 'key' in transform) {
|
|
513
|
+
var _transform_value;
|
|
508
514
|
const field = transform.impute;
|
|
509
515
|
const keyField = transform.key;
|
|
510
516
|
const method = transform.method || 'value';
|
|
511
|
-
var _transform_value;
|
|
512
517
|
const fillValue = (_transform_value = transform.value) !== null && _transform_value !== void 0 ? _transform_value : 0;
|
|
513
|
-
const existingKeys = new Set(result.map((r)=>r
|
|
514
|
-
const allKeyValues = result.map((r)=>Number(r
|
|
518
|
+
const existingKeys = new Set(result.map((r)=>getOwnDataValue(r, keyField)));
|
|
519
|
+
const allKeyValues = result.map((r)=>Number(getOwnDataValue(r, keyField))).filter((v)=>!isNaN(v));
|
|
515
520
|
if (allKeyValues.length > 0) {
|
|
516
|
-
var _d3Min1;
|
|
521
|
+
var _d3Min1, _d3Max1;
|
|
517
522
|
const minKey = (_d3Min1 = (0, _d3array.min)(allKeyValues)) !== null && _d3Min1 !== void 0 ? _d3Min1 : 0;
|
|
518
|
-
var _d3Max1;
|
|
519
523
|
const maxKey = (_d3Max1 = (0, _d3array.max)(allKeyValues)) !== null && _d3Max1 !== void 0 ? _d3Max1 : 0;
|
|
520
524
|
for(let k = minKey; k <= maxKey; k++){
|
|
521
525
|
if (!existingKeys.has(k)) {
|
|
522
526
|
const imputed = {
|
|
523
|
-
[keyField]: k
|
|
527
|
+
[keyField]: k,
|
|
528
|
+
[field]: method === 'value' ? fillValue : 0
|
|
524
529
|
};
|
|
525
|
-
imputed[field] = method === 'value' ? fillValue : 0;
|
|
526
530
|
result.push(imputed);
|
|
527
531
|
}
|
|
528
532
|
}
|
|
529
|
-
result.sort((a, b)=>Number(a
|
|
533
|
+
result.sort((a, b)=>Number(getOwnDataValue(a, keyField)) - Number(getOwnDataValue(b, keyField)));
|
|
530
534
|
}
|
|
531
535
|
}
|
|
532
536
|
// Handle lookup transform (join with secondary dataset)
|
|
@@ -537,14 +541,14 @@ function getMarkType(mark) {
|
|
|
537
541
|
if (((_fromSpec_data = fromSpec.data) === null || _fromSpec_data === void 0 ? void 0 : _fromSpec_data.values) && fromSpec.key && fromSpec.fields) {
|
|
538
542
|
const lookupMap = new Map();
|
|
539
543
|
fromSpec.data.values.forEach((row)=>{
|
|
540
|
-
lookupMap.set(String(row
|
|
544
|
+
lookupMap.set(String(getOwnDataValue(row, fromSpec.key)), row);
|
|
541
545
|
});
|
|
542
546
|
result = result.map((row)=>{
|
|
543
|
-
const lookupRow = lookupMap.get(String(row
|
|
547
|
+
const lookupRow = lookupMap.get(String(getOwnDataValue(row, lookupField)));
|
|
544
548
|
if (lookupRow) {
|
|
545
|
-
const extra =
|
|
549
|
+
const extra = Object.create(null);
|
|
546
550
|
fromSpec.fields.forEach((f)=>{
|
|
547
|
-
extra[f] = lookupRow
|
|
551
|
+
extra[f] = getOwnDataValue(lookupRow, f);
|
|
548
552
|
});
|
|
549
553
|
return {
|
|
550
554
|
...row,
|
|
@@ -685,17 +689,17 @@ function getMarkType(mark) {
|
|
|
685
689
|
const markStrokeDash = typeof layer.mark === 'object' ? layer.mark.strokeDash : undefined;
|
|
686
690
|
// Horizontal rule (y value constant)
|
|
687
691
|
if (encoding.y && (encoding.y.value !== undefined || encoding.y.datum !== undefined)) {
|
|
688
|
-
var _spec_layer, _companionText_encoding_text, _companionText_encoding, _companionText_encoding_text1, _companionText_encoding1;
|
|
689
692
|
var _encoding_y_value;
|
|
693
|
+
var _spec_layer, _companionText_encoding_text, _companionText_encoding, _companionText_encoding_text1, _companionText_encoding1;
|
|
690
694
|
const yValue = (_encoding_y_value = encoding.y.value) !== null && _encoding_y_value !== void 0 ? _encoding_y_value : encoding.y.datum;
|
|
691
695
|
// Look for a companion text annotation at the same y-value
|
|
692
696
|
const companionText = (_spec_layer = spec.layer) === null || _spec_layer === void 0 ? void 0 : _spec_layer.find((l, i)=>{
|
|
697
|
+
var _l_encoding_y_datum;
|
|
693
698
|
var _l_encoding;
|
|
694
699
|
if (i === index) {
|
|
695
700
|
return false;
|
|
696
701
|
}
|
|
697
702
|
const m = getMarkType(l.mark);
|
|
698
|
-
var _l_encoding_y_datum;
|
|
699
703
|
return m === 'text' && ((_l_encoding = l.encoding) === null || _l_encoding === void 0 ? void 0 : _l_encoding.y) && ((_l_encoding_y_datum = l.encoding.y.datum) !== null && _l_encoding_y_datum !== void 0 ? _l_encoding_y_datum : l.encoding.y.value) === yValue;
|
|
700
704
|
});
|
|
701
705
|
const ruleText = companionText ? String(((_companionText_encoding = companionText.encoding) === null || _companionText_encoding === void 0 ? void 0 : (_companionText_encoding_text = _companionText_encoding.text) === null || _companionText_encoding_text === void 0 ? void 0 : _companionText_encoding_text.datum) || ((_companionText_encoding1 = companionText.encoding) === null || _companionText_encoding1 === void 0 ? void 0 : (_companionText_encoding_text1 = _companionText_encoding1.text) === null || _companionText_encoding_text1 === void 0 ? void 0 : _companionText_encoding_text1.value) || yValue) : String(yValue);
|
|
@@ -949,9 +953,8 @@ function getMarkType(mark) {
|
|
|
949
953
|
if (yField) {
|
|
950
954
|
const yValues = dataValues.map((row)=>Number(row[yField])).filter((v)=>!isNaN(v));
|
|
951
955
|
if (yValues.length > 0) {
|
|
952
|
-
var _d3Min;
|
|
956
|
+
var _d3Min, _d3Max;
|
|
953
957
|
const dataMin = (_d3Min = (0, _d3array.min)(yValues)) !== null && _d3Min !== void 0 ? _d3Min : 0;
|
|
954
|
-
var _d3Max;
|
|
955
958
|
const dataMax = (_d3Max = (0, _d3array.max)(yValues)) !== null && _d3Max !== void 0 ? _d3Max : 0;
|
|
956
959
|
const padding = (dataMax - dataMin) * 0.05;
|
|
957
960
|
return {
|
|
@@ -1085,7 +1088,7 @@ function getMarkType(mark) {
|
|
|
1085
1088
|
const yAgg = ((_encoding_y1 = encoding.y) === null || _encoding_y1 === void 0 ? void 0 : _encoding_y1.aggregate) || (yField ? 'mean' : 'count');
|
|
1086
1089
|
const groups = new Map();
|
|
1087
1090
|
dataValues.forEach((row)=>{
|
|
1088
|
-
const dateVal = new Date(row
|
|
1091
|
+
const dateVal = new Date(getOwnDataValue(row, field));
|
|
1089
1092
|
if (isNaN(dateVal.getTime())) {
|
|
1090
1093
|
return;
|
|
1091
1094
|
}
|
|
@@ -1117,17 +1120,18 @@ function getMarkType(mark) {
|
|
|
1117
1120
|
groups.get(key).push(row);
|
|
1118
1121
|
});
|
|
1119
1122
|
dataValues = Array.from(groups.entries()).map(([key, rows])=>{
|
|
1120
|
-
const result =
|
|
1121
|
-
|
|
1122
|
-
};
|
|
1123
|
+
const result = Object.create(null);
|
|
1124
|
+
result[field] = key;
|
|
1123
1125
|
if (yField && yAgg !== 'count') {
|
|
1124
|
-
const vals = rows.map((r)=>Number(r[yField])).filter((v)=>!isNaN(v));
|
|
1125
1126
|
var _d3Mean;
|
|
1127
|
+
const vals = rows.map((r)=>Number(getOwnDataValue(r, yField))).filter((v)=>!isNaN(v));
|
|
1126
1128
|
result[yField] = yAgg === 'sum' ? (0, _d3array.sum)(vals) : (_d3Mean = (0, _d3array.mean)(vals)) !== null && _d3Mean !== void 0 ? _d3Mean : 0;
|
|
1127
1129
|
} else {
|
|
1128
1130
|
result[yField || '__count'] = rows.length;
|
|
1129
1131
|
}
|
|
1130
|
-
return
|
|
1132
|
+
return {
|
|
1133
|
+
...result
|
|
1134
|
+
};
|
|
1131
1135
|
});
|
|
1132
1136
|
// Switch x from temporal to ordinal since we've aggregated
|
|
1133
1137
|
encoding.x.type = 'ordinal';
|
|
@@ -1363,13 +1367,13 @@ function getMarkType(mark) {
|
|
|
1363
1367
|
return dataSpec || unitSpecs[0];
|
|
1364
1368
|
}
|
|
1365
1369
|
function autoCorrectEncodingTypes(spec) {
|
|
1370
|
+
var _unitSpec_data;
|
|
1366
1371
|
var _encoding_x, _encoding_y;
|
|
1367
1372
|
const unitSpec = spec.layer ? spec.layer[0] : spec;
|
|
1368
1373
|
if (!unitSpec) {
|
|
1369
1374
|
return;
|
|
1370
1375
|
}
|
|
1371
1376
|
const encoding = unitSpec.encoding;
|
|
1372
|
-
var _unitSpec_data;
|
|
1373
1377
|
const data = extractDataValues((_unitSpec_data = unitSpec.data) !== null && _unitSpec_data !== void 0 ? _unitSpec_data : spec.data);
|
|
1374
1378
|
if (!encoding || data.length === 0) {
|
|
1375
1379
|
return;
|
|
@@ -1565,6 +1569,7 @@ function getChartType(spec) {
|
|
|
1565
1569
|
};
|
|
1566
1570
|
}
|
|
1567
1571
|
function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
1572
|
+
var _ref, _ref1, _ref2;
|
|
1568
1573
|
var _encoding_x, _encoding_y, _encoding_x1, _encoding_y1, _encoding_x2, _encoding_y2, _spec_title, _encoding_x_axis, _encoding_x3, _encoding_y_axis, _encoding_y3, _encoding_x_axis1, _encoding_x4, _encoding_y_axis1, _encoding_y4, _encoding_x_axis2, _encoding_x5, _encoding_y_axis2, _encoding_y5, _encoding_color_legend, _encoding_color;
|
|
1569
1574
|
// Initialize transformation context, but find the primary line/point layer for layered specs
|
|
1570
1575
|
const unitSpecs = normalizeSpec(spec);
|
|
@@ -1646,11 +1651,9 @@ function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
|
1646
1651
|
});
|
|
1647
1652
|
// Extract chart title
|
|
1648
1653
|
const chartTitle = typeof spec.title === 'string' ? spec.title : (_spec_title = spec.title) === null || _spec_title === void 0 ? void 0 : _spec_title.text;
|
|
1649
|
-
var _encoding_x_axis_title;
|
|
1650
1654
|
// Extract axis titles and formats
|
|
1651
|
-
const xAxisTitle = (
|
|
1652
|
-
|
|
1653
|
-
const yAxisTitle = (_encoding_y_axis_title = (_encoding_y3 = encoding.y) === null || _encoding_y3 === void 0 ? void 0 : (_encoding_y_axis = _encoding_y3.axis) === null || _encoding_y_axis === void 0 ? void 0 : _encoding_y_axis.title) !== null && _encoding_y_axis_title !== void 0 ? _encoding_y_axis_title : undefined;
|
|
1655
|
+
const xAxisTitle = (_ref = (_encoding_x3 = encoding.x) === null || _encoding_x3 === void 0 ? void 0 : (_encoding_x_axis = _encoding_x3.axis) === null || _encoding_x_axis === void 0 ? void 0 : _encoding_x_axis.title) !== null && _ref !== void 0 ? _ref : undefined;
|
|
1656
|
+
const yAxisTitle = (_ref1 = (_encoding_y3 = encoding.y) === null || _encoding_y3 === void 0 ? void 0 : (_encoding_y_axis = _encoding_y3.axis) === null || _encoding_y_axis === void 0 ? void 0 : _encoding_y_axis.title) !== null && _ref1 !== void 0 ? _ref1 : undefined;
|
|
1654
1657
|
const tickFormat = (_encoding_x4 = encoding.x) === null || _encoding_x4 === void 0 ? void 0 : (_encoding_x_axis1 = _encoding_x4.axis) === null || _encoding_x_axis1 === void 0 ? void 0 : _encoding_x_axis1.format;
|
|
1655
1658
|
const yAxisTickFormat = (_encoding_y4 = encoding.y) === null || _encoding_y4 === void 0 ? void 0 : (_encoding_y_axis1 = _encoding_y4.axis) === null || _encoding_y_axis1 === void 0 ? void 0 : _encoding_y_axis1.format;
|
|
1656
1659
|
// Extract tick values and counts
|
|
@@ -1669,14 +1672,14 @@ function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
|
1669
1672
|
const xMin = allXValues.length > 0 ? allXValues.reduce((a, b)=>a < b ? a : b) : 0;
|
|
1670
1673
|
const xMax = allXValues.length > 0 ? allXValues.reduce((a, b)=>a > b ? a : b) : 0;
|
|
1671
1674
|
spec.layer.forEach((layer, layerIndex)=>{
|
|
1675
|
+
var _ref;
|
|
1672
1676
|
var _ruleEncoding_y, _ruleEncoding_y1, _textLayer_encoding_text, _textLayer_encoding, _textLayer_encoding_text1, _textLayer_encoding1;
|
|
1673
1677
|
const layerMark = getMarkType(layer.mark);
|
|
1674
1678
|
if (layerMark !== 'rule') {
|
|
1675
1679
|
return;
|
|
1676
1680
|
}
|
|
1677
1681
|
const ruleEncoding = layer.encoding || {};
|
|
1678
|
-
|
|
1679
|
-
const yDatum = (_ruleEncoding_y_datum = (_ruleEncoding_y = ruleEncoding.y) === null || _ruleEncoding_y === void 0 ? void 0 : _ruleEncoding_y.datum) !== null && _ruleEncoding_y_datum !== void 0 ? _ruleEncoding_y_datum : (_ruleEncoding_y1 = ruleEncoding.y) === null || _ruleEncoding_y1 === void 0 ? void 0 : _ruleEncoding_y1.value;
|
|
1682
|
+
const yDatum = (_ref = (_ruleEncoding_y = ruleEncoding.y) === null || _ruleEncoding_y === void 0 ? void 0 : _ruleEncoding_y.datum) !== null && _ref !== void 0 ? _ref : (_ruleEncoding_y1 = ruleEncoding.y) === null || _ruleEncoding_y1 === void 0 ? void 0 : _ruleEncoding_y1.value;
|
|
1680
1683
|
if (yDatum === undefined) {
|
|
1681
1684
|
return;
|
|
1682
1685
|
}
|
|
@@ -1684,9 +1687,9 @@ function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
|
1684
1687
|
const ruleColor = ruleMarkProps.color || '#d62728';
|
|
1685
1688
|
// Find companion text annotation for legend name
|
|
1686
1689
|
const textLayer = spec.layer.find((l)=>{
|
|
1690
|
+
var _l_encoding_y_datum;
|
|
1687
1691
|
var _l_encoding;
|
|
1688
1692
|
const m = getMarkType(l.mark);
|
|
1689
|
-
var _l_encoding_y_datum;
|
|
1690
1693
|
return m === 'text' && ((_l_encoding = l.encoding) === null || _l_encoding === void 0 ? void 0 : _l_encoding.y) && ((_l_encoding_y_datum = l.encoding.y.datum) !== null && _l_encoding_y_datum !== void 0 ? _l_encoding_y_datum : l.encoding.y.value) === yDatum;
|
|
1691
1694
|
});
|
|
1692
1695
|
const ruleLegend = textLayer ? String(((_textLayer_encoding = textLayer.encoding) === null || _textLayer_encoding === void 0 ? void 0 : (_textLayer_encoding_text = _textLayer_encoding.text) === null || _textLayer_encoding_text === void 0 ? void 0 : _textLayer_encoding_text.datum) || ((_textLayer_encoding1 = textLayer.encoding) === null || _textLayer_encoding1 === void 0 ? void 0 : (_textLayer_encoding_text1 = _textLayer_encoding1.text) === null || _textLayer_encoding_text1 === void 0 ? void 0 : _textLayer_encoding_text1.value) || `y=${yDatum}`) : `y=${yDatum}`;
|
|
@@ -1728,7 +1731,6 @@ function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
|
1728
1731
|
chartTitle
|
|
1729
1732
|
}
|
|
1730
1733
|
};
|
|
1731
|
-
var _encoding_color_legend_disable;
|
|
1732
1734
|
return {
|
|
1733
1735
|
data: chartProps,
|
|
1734
1736
|
width: typeof spec.width === 'number' ? spec.width : undefined,
|
|
@@ -1779,7 +1781,7 @@ function transformVegaLiteToLineChartProps(spec, colorMap, isDarkTheme) {
|
|
|
1779
1781
|
yMaxValue: yOrdinalLabels.length - 0.5
|
|
1780
1782
|
},
|
|
1781
1783
|
...categoryOrderProps,
|
|
1782
|
-
hideLegend: (
|
|
1784
|
+
hideLegend: (_ref2 = (_encoding_color = encoding.color) === null || _encoding_color === void 0 ? void 0 : (_encoding_color_legend = _encoding_color.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref2 !== void 0 ? _ref2 : false
|
|
1783
1785
|
};
|
|
1784
1786
|
}
|
|
1785
1787
|
function getVegaLiteLegendsProps(spec, colorMap, isDarkTheme) {
|
|
@@ -1829,6 +1831,7 @@ function getVegaLiteLegendsProps(spec, colorMap, isDarkTheme) {
|
|
|
1829
1831
|
};
|
|
1830
1832
|
}
|
|
1831
1833
|
function getVegaLiteTitles(spec) {
|
|
1834
|
+
var _ref, _ref1, _ref2, _ref3;
|
|
1832
1835
|
var _spec_title, _encoding_x, _encoding_x_axis, _encoding_x1, _encoding_y, _encoding_y_axis, _encoding_y1;
|
|
1833
1836
|
const unitSpecs = normalizeSpec(spec);
|
|
1834
1837
|
if (unitSpecs.length === 0) {
|
|
@@ -1893,17 +1896,17 @@ function getVegaLiteTitles(spec) {
|
|
|
1893
1896
|
titleStyles = undefined;
|
|
1894
1897
|
}
|
|
1895
1898
|
}
|
|
1896
|
-
var _encoding_x_title, _ref, _encoding_y_title, _ref1;
|
|
1897
1899
|
return {
|
|
1898
1900
|
chartTitle,
|
|
1899
|
-
xAxisTitle: (_ref = (
|
|
1900
|
-
yAxisTitle: (
|
|
1901
|
+
xAxisTitle: (_ref = (_ref1 = (_encoding_x = encoding.x) === null || _encoding_x === void 0 ? void 0 : _encoding_x.title) !== null && _ref1 !== void 0 ? _ref1 : (_encoding_x1 = encoding.x) === null || _encoding_x1 === void 0 ? void 0 : (_encoding_x_axis = _encoding_x1.axis) === null || _encoding_x_axis === void 0 ? void 0 : _encoding_x_axis.title) !== null && _ref !== void 0 ? _ref : undefined,
|
|
1902
|
+
yAxisTitle: (_ref2 = (_ref3 = (_encoding_y = encoding.y) === null || _encoding_y === void 0 ? void 0 : _encoding_y.title) !== null && _ref3 !== void 0 ? _ref3 : (_encoding_y1 = encoding.y) === null || _encoding_y1 === void 0 ? void 0 : (_encoding_y_axis = _encoding_y1.axis) === null || _encoding_y_axis === void 0 ? void 0 : _encoding_y_axis.title) !== null && _ref2 !== void 0 ? _ref2 : undefined,
|
|
1901
1903
|
...titleStyles ? {
|
|
1902
1904
|
titleStyles
|
|
1903
1905
|
} : {}
|
|
1904
1906
|
};
|
|
1905
1907
|
}
|
|
1906
1908
|
function transformVegaLiteToVerticalBarChartProps(spec, colorMap, isDarkTheme) {
|
|
1909
|
+
var _ref;
|
|
1907
1910
|
var _encoding_color, _encoding_y_axis, _encoding_y, _barData_, _encoding_color_legend, _encoding_color1;
|
|
1908
1911
|
// Initialize transformation context
|
|
1909
1912
|
const { dataValues, encoding, markProps } = initializeTransformContext(spec);
|
|
@@ -2019,7 +2022,6 @@ function transformVegaLiteToVerticalBarChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2019
2022
|
// Compute truncation based on number of unique x-axis categories
|
|
2020
2023
|
const uniqueXCount = new Set(barData.map((d)=>String(d.x))).size;
|
|
2021
2024
|
const barTruncateChars = uniqueXCount > 20 ? 6 : uniqueXCount > 10 ? 10 : DEFAULT_TRUNCATE_CHARS;
|
|
2022
|
-
var _encoding_color_legend_disable;
|
|
2023
2025
|
const result = {
|
|
2024
2026
|
data: barData,
|
|
2025
2027
|
chartTitle: titles.chartTitle,
|
|
@@ -2047,7 +2049,7 @@ function transformVegaLiteToVerticalBarChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2047
2049
|
},
|
|
2048
2050
|
...categoryOrderProps,
|
|
2049
2051
|
// Hide legend for single-series bar charts (no color encoding) to avoid showing "Bar" legend
|
|
2050
|
-
hideLegend: !colorField ? true : (
|
|
2052
|
+
hideLegend: !colorField ? true : (_ref = (_encoding_color1 = encoding.color) === null || _encoding_color1 === void 0 ? void 0 : (_encoding_color_legend = _encoding_color1.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref !== void 0 ? _ref : false
|
|
2051
2053
|
};
|
|
2052
2054
|
if (tickConfig.tickValues) {
|
|
2053
2055
|
result.tickValues = tickConfig.tickValues;
|
|
@@ -2058,6 +2060,7 @@ function transformVegaLiteToVerticalBarChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2058
2060
|
return result;
|
|
2059
2061
|
}
|
|
2060
2062
|
function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkTheme) {
|
|
2063
|
+
var _spec_height, _ref;
|
|
2061
2064
|
var _encoding_color, _encoding_y_axis, _encoding_y, _encoding_color_legend, _encoding_color1, _chartData_;
|
|
2062
2065
|
// Initialize transformation context (skip warnings as we handle layered spec differently)
|
|
2063
2066
|
const { unitSpecs } = initializeTransformContext(spec);
|
|
@@ -2259,11 +2262,11 @@ function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkT
|
|
|
2259
2262
|
// Process rule specs as horizontal reference lines
|
|
2260
2263
|
// Each rule with a constant y-value becomes a flat line across all x-axis points
|
|
2261
2264
|
ruleSpecs.forEach((ruleSpec, ruleIndex)=>{
|
|
2265
|
+
var _ref;
|
|
2262
2266
|
var _ruleEncoding_y, _ruleEncoding_y1;
|
|
2263
2267
|
const ruleEncoding = ruleSpec.encoding || {};
|
|
2264
2268
|
const ruleMarkProps = getMarkProperties(ruleSpec.mark);
|
|
2265
|
-
|
|
2266
|
-
const yDatum = (_ruleEncoding_y_datum = (_ruleEncoding_y = ruleEncoding.y) === null || _ruleEncoding_y === void 0 ? void 0 : _ruleEncoding_y.datum) !== null && _ruleEncoding_y_datum !== void 0 ? _ruleEncoding_y_datum : (_ruleEncoding_y1 = ruleEncoding.y) === null || _ruleEncoding_y1 === void 0 ? void 0 : _ruleEncoding_y1.value;
|
|
2269
|
+
const yDatum = (_ref = (_ruleEncoding_y = ruleEncoding.y) === null || _ruleEncoding_y === void 0 ? void 0 : _ruleEncoding_y.datum) !== null && _ref !== void 0 ? _ref : (_ruleEncoding_y1 = ruleEncoding.y) === null || _ruleEncoding_y1 === void 0 ? void 0 : _ruleEncoding_y1.value;
|
|
2267
2270
|
if (yDatum !== undefined) {
|
|
2268
2271
|
var _textSpec_encoding_text, _textSpec_encoding, _textSpec_encoding_text1, _textSpec_encoding1;
|
|
2269
2272
|
const ruleLegend = `Reference_${ruleIndex}`;
|
|
@@ -2280,8 +2283,8 @@ function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkT
|
|
|
2280
2283
|
}
|
|
2281
2284
|
// Look for companion text annotation at the same y-value
|
|
2282
2285
|
const textSpec = unitSpecs.find((s, i)=>{
|
|
2283
|
-
var _s_encoding;
|
|
2284
2286
|
var _s_encoding_y_datum;
|
|
2287
|
+
var _s_encoding;
|
|
2285
2288
|
return getMarkType(s.mark) === 'text' && ((_s_encoding = s.encoding) === null || _s_encoding === void 0 ? void 0 : _s_encoding.y) && ((_s_encoding_y_datum = s.encoding.y.datum) !== null && _s_encoding_y_datum !== void 0 ? _s_encoding_y_datum : s.encoding.y.value) === yDatum;
|
|
2286
2289
|
});
|
|
2287
2290
|
const ruleText = textSpec ? String(((_textSpec_encoding = textSpec.encoding) === null || _textSpec_encoding === void 0 ? void 0 : (_textSpec_encoding_text = _textSpec_encoding.text) === null || _textSpec_encoding_text === void 0 ? void 0 : _textSpec_encoding_text.datum) || ((_textSpec_encoding1 = textSpec.encoding) === null || _textSpec_encoding1 === void 0 ? void 0 : (_textSpec_encoding_text1 = _textSpec_encoding1.text) === null || _textSpec_encoding_text1 === void 0 ? void 0 : _textSpec_encoding_text1.value) || yDatum) : String(yDatum);
|
|
@@ -2327,12 +2330,11 @@ function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkT
|
|
|
2327
2330
|
});
|
|
2328
2331
|
});
|
|
2329
2332
|
if (allLineYValues.length > 0) {
|
|
2333
|
+
var _d3Min, _d3Max;
|
|
2330
2334
|
var _lineEncoding_y_scale, _lineEncoding_y1;
|
|
2331
2335
|
// Use explicit domain from line encoding if available, otherwise compute from data
|
|
2332
2336
|
const lineDomain = (_lineEncoding_y1 = lineEncoding.y) === null || _lineEncoding_y1 === void 0 ? void 0 : (_lineEncoding_y_scale = _lineEncoding_y1.scale) === null || _lineEncoding_y_scale === void 0 ? void 0 : _lineEncoding_y_scale.domain;
|
|
2333
|
-
var _d3Min;
|
|
2334
2337
|
const secYMin = Array.isArray(lineDomain) ? lineDomain[0] : (_d3Min = (0, _d3array.min)(allLineYValues)) !== null && _d3Min !== void 0 ? _d3Min : 0;
|
|
2335
|
-
var _d3Max;
|
|
2336
2338
|
const secYMax = Array.isArray(lineDomain) ? lineDomain[1] : (_d3Max = (0, _d3array.max)(allLineYValues)) !== null && _d3Max !== void 0 ? _d3Max : 0;
|
|
2337
2339
|
secondaryYAxisProps.secondaryYScaleOptions = {
|
|
2338
2340
|
yMinValue: secYMin,
|
|
@@ -2347,7 +2349,6 @@ function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkT
|
|
|
2347
2349
|
const { yMinValue, yMaxValue } = extractYMinMax(encoding, dataValues);
|
|
2348
2350
|
// Extract axis category ordering
|
|
2349
2351
|
const categoryOrderProps = extractAxisCategoryOrderProps(encoding);
|
|
2350
|
-
var _spec_height, _encoding_color_legend_disable;
|
|
2351
2352
|
return {
|
|
2352
2353
|
data: chartData,
|
|
2353
2354
|
chartTitle: titles.chartTitle,
|
|
@@ -2356,7 +2357,7 @@ function transformVegaLiteToVerticalStackedBarChartProps(spec, colorMap, isDarkT
|
|
|
2356
2357
|
...titles.titleStyles ? titles.titleStyles : {},
|
|
2357
2358
|
width: spec.width,
|
|
2358
2359
|
height: (_spec_height = spec.height) !== null && _spec_height !== void 0 ? _spec_height : DEFAULT_CHART_HEIGHT,
|
|
2359
|
-
hideLegend: (
|
|
2360
|
+
hideLegend: (_ref = (_encoding_color1 = encoding.color) === null || _encoding_color1 === void 0 ? void 0 : (_encoding_color_legend = _encoding_color1.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref !== void 0 ? _ref : false,
|
|
2360
2361
|
showYAxisLables: true,
|
|
2361
2362
|
roundCorners: true,
|
|
2362
2363
|
hideTickOverlap: true,
|
|
@@ -2455,6 +2456,7 @@ function transformVegaLiteToGroupedVerticalBarChartProps(spec, colorMap, isDarkT
|
|
|
2455
2456
|
};
|
|
2456
2457
|
}
|
|
2457
2458
|
function transformVegaLiteToHorizontalBarChartProps(spec, colorMap, isDarkTheme) {
|
|
2459
|
+
var _ref;
|
|
2458
2460
|
var _encoding_color, _encoding_color_legend, _encoding_color1;
|
|
2459
2461
|
// Initialize transformation context
|
|
2460
2462
|
const { dataValues, encoding, markProps } = initializeTransformContext(spec);
|
|
@@ -2552,7 +2554,6 @@ function transformVegaLiteToHorizontalBarChartProps(spec, colorMap, isDarkTheme)
|
|
|
2552
2554
|
const titles = getVegaLiteTitles(spec);
|
|
2553
2555
|
const annotations = extractAnnotations(spec);
|
|
2554
2556
|
const tickConfig = extractTickConfig(spec);
|
|
2555
|
-
var _encoding_color_legend_disable;
|
|
2556
2557
|
const result = {
|
|
2557
2558
|
data: barData,
|
|
2558
2559
|
chartTitle: titles.chartTitle,
|
|
@@ -2560,7 +2561,7 @@ function transformVegaLiteToHorizontalBarChartProps(spec, colorMap, isDarkTheme)
|
|
|
2560
2561
|
yAxisTitle: titles.yAxisTitle,
|
|
2561
2562
|
...titles.titleStyles ? titles.titleStyles : {},
|
|
2562
2563
|
// Hide legend for single-series horizontal bars (no color encoding)
|
|
2563
|
-
hideLegend: !colorField ? true : (
|
|
2564
|
+
hideLegend: !colorField ? true : (_ref = (_encoding_color1 = encoding.color) === null || _encoding_color1 === void 0 ? void 0 : (_encoding_color_legend = _encoding_color1.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref !== void 0 ? _ref : false
|
|
2564
2565
|
};
|
|
2565
2566
|
if (annotations.length > 0) {
|
|
2566
2567
|
result.annotations = annotations;
|
|
@@ -2600,6 +2601,7 @@ function transformVegaLiteToAreaChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2600
2601
|
};
|
|
2601
2602
|
}
|
|
2602
2603
|
function transformVegaLiteToScatterChartProps(spec, colorMap, isDarkTheme) {
|
|
2604
|
+
var _ref;
|
|
2603
2605
|
var _encoding_x, _encoding_y, _encoding_y1, _encoding_y2, _encoding_y_axis, _encoding_y3, _encoding_color_legend, _encoding_color;
|
|
2604
2606
|
// Initialize transformation context
|
|
2605
2607
|
const { dataValues, encoding, markProps } = initializeTransformContext(spec);
|
|
@@ -2686,7 +2688,6 @@ function transformVegaLiteToScatterChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2686
2688
|
const { yMinValue, yMaxValue } = extractYMinMax(encoding, dataValues);
|
|
2687
2689
|
// Extract axis category ordering
|
|
2688
2690
|
const categoryOrderProps = extractAxisCategoryOrderProps(encoding);
|
|
2689
|
-
var _encoding_color_legend_disable;
|
|
2690
2691
|
const result = {
|
|
2691
2692
|
data: {
|
|
2692
2693
|
chartTitle: titles.chartTitle,
|
|
@@ -2720,7 +2721,7 @@ function transformVegaLiteToScatterChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2720
2721
|
yMaxValue: yOrdinalLabels.length - 0.5
|
|
2721
2722
|
},
|
|
2722
2723
|
...categoryOrderProps,
|
|
2723
|
-
hideLegend: (
|
|
2724
|
+
hideLegend: (_ref = (_encoding_color = encoding.color) === null || _encoding_color === void 0 ? void 0 : (_encoding_color_legend = _encoding_color.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref !== void 0 ? _ref : false
|
|
2724
2725
|
};
|
|
2725
2726
|
if (annotations.length > 0) {
|
|
2726
2727
|
result.annotations = annotations;
|
|
@@ -2780,6 +2781,7 @@ function transformVegaLiteToDonutChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2780
2781
|
};
|
|
2781
2782
|
}
|
|
2782
2783
|
function transformVegaLiteToHeatMapChartProps(spec, colorMap, isDarkTheme) {
|
|
2784
|
+
var _spec_height;
|
|
2783
2785
|
var _encoding_color, _encoding_color1, _encoding_x, _encoding_x1, _encoding_color_scale, _encoding_color2, _encoding_color_scale1, _encoding_color3;
|
|
2784
2786
|
// Initialize transformation context
|
|
2785
2787
|
const { dataValues, encoding } = initializeTransformContext(spec);
|
|
@@ -2832,9 +2834,9 @@ function transformVegaLiteToHeatMapChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2832
2834
|
const dataPointMap = new Map();
|
|
2833
2835
|
const rectTextMap = new Map();
|
|
2834
2836
|
heatmapDataPoints.forEach((point)=>{
|
|
2837
|
+
var _point_rectText;
|
|
2835
2838
|
const key = `${String(point.x)}|${String(point.y)}`;
|
|
2836
2839
|
dataPointMap.set(key, point.value);
|
|
2837
|
-
var _point_rectText;
|
|
2838
2840
|
rectTextMap.set(key, (_point_rectText = point.rectText) !== null && _point_rectText !== void 0 ? _point_rectText : point.value);
|
|
2839
2841
|
});
|
|
2840
2842
|
// Generate complete grid - fill missing cells with 0
|
|
@@ -2853,15 +2855,14 @@ function transformVegaLiteToHeatMapChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2853
2855
|
}
|
|
2854
2856
|
yValuesArray.forEach((yVal)=>{
|
|
2855
2857
|
xValuesArray.forEach((xVal)=>{
|
|
2858
|
+
var _dataPointMap_get, _rectTextMap_get;
|
|
2856
2859
|
const key = `${xVal}|${yVal}`;
|
|
2857
|
-
var _dataPointMap_get;
|
|
2858
2860
|
const value = (_dataPointMap_get = dataPointMap.get(key)) !== null && _dataPointMap_get !== void 0 ? _dataPointMap_get : 0; // Use 0 for missing cells
|
|
2859
2861
|
// Update min/max to include filled values
|
|
2860
2862
|
if (value !== 0 || dataPointMap.has(key)) {
|
|
2861
2863
|
minValue = Math.min(minValue, value);
|
|
2862
2864
|
maxValue = Math.max(maxValue, value);
|
|
2863
2865
|
}
|
|
2864
|
-
var _rectTextMap_get;
|
|
2865
2866
|
completeGridDataPoints.push({
|
|
2866
2867
|
x: xVal,
|
|
2867
2868
|
y: yVal,
|
|
@@ -2931,7 +2932,6 @@ function transformVegaLiteToHeatMapChartProps(spec, colorMap, isDarkTheme) {
|
|
|
2931
2932
|
}
|
|
2932
2933
|
}
|
|
2933
2934
|
}
|
|
2934
|
-
var _spec_height;
|
|
2935
2935
|
return {
|
|
2936
2936
|
chartTitle: titles.chartTitle,
|
|
2937
2937
|
data: [
|
|
@@ -3087,6 +3087,7 @@ function transformVegaLiteToHistogramProps(spec, colorMap, isDarkTheme) {
|
|
|
3087
3087
|
};
|
|
3088
3088
|
}
|
|
3089
3089
|
function transformVegaLiteToPolarChartProps(spec, colorMap, isDarkTheme) {
|
|
3090
|
+
var _ref;
|
|
3090
3091
|
var _encoding_theta, _encoding_color_legend, _encoding_color;
|
|
3091
3092
|
// Initialize transformation context
|
|
3092
3093
|
const { dataValues, encoding, markProps, primarySpec } = initializeTransformContext(spec);
|
|
@@ -3201,7 +3202,6 @@ function transformVegaLiteToPolarChartProps(spec, colorMap, isDarkTheme) {
|
|
|
3201
3202
|
const thetaValues = Array.from(new Set(dataValues.map((row)=>String(row[thetaField]))));
|
|
3202
3203
|
angularAxis.categoryOrder = thetaValues;
|
|
3203
3204
|
}
|
|
3204
|
-
var _encoding_color_legend_disable;
|
|
3205
3205
|
return {
|
|
3206
3206
|
data: polarData,
|
|
3207
3207
|
...titles.chartTitle && {
|
|
@@ -3210,7 +3210,7 @@ function transformVegaLiteToPolarChartProps(spec, colorMap, isDarkTheme) {
|
|
|
3210
3210
|
...titles.titleStyles ? titles.titleStyles : {},
|
|
3211
3211
|
width: typeof spec.width === 'number' ? spec.width : undefined,
|
|
3212
3212
|
height: typeof spec.height === 'number' ? spec.height : 400,
|
|
3213
|
-
hideLegend: (
|
|
3213
|
+
hideLegend: (_ref = (_encoding_color = encoding.color) === null || _encoding_color === void 0 ? void 0 : (_encoding_color_legend = _encoding_color.legend) === null || _encoding_color_legend === void 0 ? void 0 : _encoding_color_legend.disable) !== null && _ref !== void 0 ? _ref : false,
|
|
3214
3214
|
radialAxis,
|
|
3215
3215
|
angularAxis
|
|
3216
3216
|
};
|