@@ -2319,6 +2319,9 @@ export default {
2319
2319
this .scaleGroups [datapoint .scaleLabel ].autoScaleYLabels = autoScaleYLabels;
2320
2320
this .scaleGroups [datapoint .scaleLabel ].unique = this .activeSeriesWithStackRatios .filter (el => el .scaleLabel === datapoint .scaleLabel ).length === 1
2321
2321
2322
+ const areaZeroPosition = this .mutableConfig .useIndividualScale ? datapoint .autoScaling ? autoScaleZeroPosition : zeroPosition : this .zero ;
2323
+ const adustedAreaZeroPosition = Math .max (Math .max (datapoint .autoScaling ? autoScaleZeroPosition : scaleYLabels .at (- 1 ).y , this .drawingArea .top ), areaZeroPosition);
2324
+
2322
2325
return {
2323
2326
... datapoint,
2324
2327
yOffset,
@@ -2337,14 +2340,13 @@ export default {
2337
2340
? this .createIndividualAreaWithCuts (datapoint .autoScaling
2338
2341
? autoScalePlots
2339
2342
: plots,
2340
- datapoint . autoScaling ? autoScaleZeroPosition : zeroPosition ,
2343
+ adustedAreaZeroPosition ,
2341
2344
)
2342
2345
: this .createIndividualArea (datapoint .autoScaling
2343
2346
? autoScalePlots .filter (p => p .value !== null )
2344
2347
: plots .filter (p => p .value !== null ),
2345
- datapoint .autoScaling ? autoScaleZeroPosition : zeroPosition,)
2346
- : this .createArea (plots .filter (p => p .value !== null ), yOffset),
2347
-
2348
+ adustedAreaZeroPosition)
2349
+ : this .createIndividualArea (plots .filter (p => p .value !== null ), adustedAreaZeroPosition),
2348
2350
curveAreas: ! datapoint .useArea
2349
2351
? []
2350
2352
: createSmoothAreaSegments (
@@ -2355,7 +2357,7 @@ export default {
2355
2357
: this .FINAL_CONFIG .line .cutNullValues
2356
2358
? plots
2357
2359
: plots .filter (p => p .value !== null ),
2358
- this . mutableConfig . useIndividualScale ? datapoint . autoScaling ? autoScaleZeroPosition : zeroPosition : this . zero ,
2360
+ adustedAreaZeroPosition ,
2359
2361
this .FINAL_CONFIG .line .cutNullValues ),
2360
2362
straight: datapoint .autoScaling ? autoScaleStraight : straight,
2361
2363
groupId: this .scaleGroups [datapoint .scaleLabel ].groupId
@@ -3161,8 +3163,7 @@ export default {
3161
3163
}
3162
3164
}
3163
3165
},
3164
- createArea (plots , yOffset ) {
3165
- const zero = this .mutableConfig .isStacked ? this .drawingArea .bottom - yOffset : this .drawingArea .bottom ;
3166
+ createArea (plots , zero ) {
3166
3167
if (! plots[0 ]) return [- 10 ,- 10 , ' ' , - 10 , - 10 ];
3167
3168
const start = { x: plots[0 ].x , y: zero };
3168
3169
const end = { x: plots .at (- 1 ).x , y: zero };
0 commit comments