File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -418,9 +418,13 @@ function stackSeries<TDatum>(
418
418
const stacker = stack ( )
419
419
. keys ( seriesIndices )
420
420
. value ( ( _ , seriesIndex , index ) => {
421
- const val = axisOptions . getValue (
421
+ const originalDatum =
422
422
axisSeries [ Number ( seriesIndex ) ] ?. datums [ index ] ?. originalDatum
423
- )
423
+
424
+ const val =
425
+ typeof originalDatum !== 'undefined'
426
+ ? axisOptions . getValue ( originalDatum )
427
+ : 0
424
428
425
429
if ( typeof val === 'undefined' || val === null ) {
426
430
return 0
@@ -439,11 +443,13 @@ function stackSeries<TDatum>(
439
443
440
444
stacked . forEach ( ( s , sIndex ) => {
441
445
s . forEach ( ( datum , i ) => {
442
- // @ts -ignore
443
- datum . data = axisSeries [ sIndex ] . datums [ i ]
446
+ if ( axisSeries [ sIndex ] . datums [ i ] ) {
447
+ // @ts -ignore
448
+ datum . data = axisSeries [ sIndex ] . datums [ i ]
444
449
445
- axisSeries [ sIndex ] . datums [ i ] . stackData =
446
- datum as unknown as StackDatum < TDatum >
450
+ axisSeries [ sIndex ] . datums [ i ] . stackData =
451
+ datum as unknown as StackDatum < TDatum >
452
+ }
447
453
} )
448
454
} )
449
455
}
You can’t perform that action at this time.
0 commit comments