Skip to content

Commit

Permalink
chore: produce empty series for single value
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Sep 11, 2024
1 parent b782cb2 commit f9c5508
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
isYearOverYear,
VIS_TYPE_LINE,
VIS_TYPE_SCATTER,
VIS_TYPE_SINGLE_VALUE,
} from '../../../../../modules/visTypes.js'
import { getAxisStringFromId } from '../../../../util/axisId.js'
import {
Expand Down Expand Up @@ -225,6 +226,9 @@ export default function ({
displayStrategy,
}) {
switch (layout.type) {
case VIS_TYPE_SINGLE_VALUE:
series = null
break
case VIS_TYPE_PIE:
series = getPie(
series,
Expand All @@ -249,7 +253,7 @@ export default function ({
})
}

series.forEach((seriesObj) => {
series?.forEach((seriesObj) => {
// animation
seriesObj.animation = {
duration: getAnimation(
Expand Down

0 comments on commit f9c5508

Please sign in to comment.