diff --git a/packages/polaris-viz/CHANGELOG.md b/packages/polaris-viz/CHANGELOG.md index 7291a8b69..a89efe941 100644 --- a/packages/polaris-viz/CHANGELOG.md +++ b/packages/polaris-viz/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +### Changed + +- Fill missing values for SparkLine charts ## [12.4.1] - 2024-04-03 diff --git a/packages/polaris-viz/src/components/SparkLineChart/SparkLineChart.tsx b/packages/polaris-viz/src/components/SparkLineChart/SparkLineChart.tsx index 023988b62..9a48b37e8 100644 --- a/packages/polaris-viz/src/components/SparkLineChart/SparkLineChart.tsx +++ b/packages/polaris-viz/src/components/SparkLineChart/SparkLineChart.tsx @@ -7,6 +7,7 @@ import { import {ChartContainer} from '../ChartContainer'; import {ChartSkeleton} from '../ChartSkeleton'; +import {fillMissingDataPoints} from '../../utilities/fillMissingDataPoints'; import {Chart} from './Chart'; @@ -20,7 +21,7 @@ export function SparkLineChart(props: SparkLineChartProps) { const {defaultTheme} = usePolarisVizContext(); const { - data, + data: dataSeries, accessibilityLabel, id, isAnimated, @@ -35,6 +36,8 @@ export function SparkLineChart(props: SparkLineChartProps) { ...props, }; + const data = fillMissingDataPoints(dataSeries, true); + return (