(cherry picked from commit 45707ccf99)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
co-authored by
Leon Sorokin
parent
a318b15cab
commit
c4233171f2
@@ -223,7 +223,14 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{
|
||||
softMin: customConfig.axisSoftMin,
|
||||
softMax: customConfig.axisSoftMax,
|
||||
centeredZero: customConfig.axisCenteredZero,
|
||||
range: customConfig.stacking?.mode === StackingMode.Percent ? [0, 1] : undefined,
|
||||
range:
|
||||
customConfig.stacking?.mode === StackingMode.Percent
|
||||
? (u: uPlot, dataMin: number, dataMax: number) => {
|
||||
dataMin = dataMin < 0 ? -1 : 0;
|
||||
dataMax = dataMax > 0 ? 1 : 0;
|
||||
return [dataMin, dataMax];
|
||||
}
|
||||
: undefined,
|
||||
decimals: field.config.decimals,
|
||||
},
|
||||
field
|
||||
|
||||
Reference in New Issue
Block a user