Skip to content

Commit

Permalink
Fill missing data for sparkline charts
Browse files Browse the repository at this point in the history
  • Loading branch information
susiekims committed Apr 3, 2024
1 parent 3fc430b commit 353ac45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/polaris-viz/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
## Unreleased

### Changed

- Fill missing values for SparkLine charts

## [12.4.1] - 2024-04-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {

import {ChartContainer} from '../ChartContainer';
import {ChartSkeleton} from '../ChartSkeleton';
import {fillMissingDataPoints} from '../../utilities/fillMissingDataPoints';

import {Chart} from './Chart';

Expand All @@ -20,7 +21,7 @@ export function SparkLineChart(props: SparkLineChartProps) {
const {defaultTheme} = usePolarisVizContext();

const {
data,
data: dataSeries,
accessibilityLabel,
id,
isAnimated,
Expand All @@ -35,6 +36,8 @@ export function SparkLineChart(props: SparkLineChartProps) {
...props,
};

const data = fillMissingDataPoints(dataSeries, true);

return (
<ChartContainer
id={id}
Expand Down

0 comments on commit 353ac45

Please sign in to comment.