mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
XYChart: Use same auto-ranging logic for X and Y axes (#88584)
This commit is contained in:
parent
cd3dab2736
commit
f1dce0c7d7
@ -253,11 +253,11 @@ Set the y-axis to be centered on zero.
|
||||
|
||||
### Soft min and soft max
|
||||
|
||||
Set a **Soft min** or **soft max** option for better control of y-axis limits. By default, Grafana sets the range for the y-axis automatically based on the dataset.
|
||||
Set a **Soft min** or **soft max** option for better control of all axes limits. By default, Grafana sets the range automatically based on the dataset.
|
||||
|
||||
**Soft min** and **soft max** settings can prevent small variations in the data from being magnified when it's mostly flat. In contrast, hard min and max values help prevent obscuring useful detail in the data by clipping intermittent spikes past a specific point.
|
||||
|
||||
To define hard limits of the y-axis, set standard min/max options. For more information, refer to [Configure standard options](ref:configure-standard-options).
|
||||
To define hard limits of the axes, set standard min/max options. For more information, refer to [Configure standard options](ref:configure-standard-options).
|
||||
|
||||

|
||||
|
||||
|
@ -156,11 +156,6 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
|
||||
|
||||
let minMax: uPlot.Range.MinMax = [dataMin, dataMax];
|
||||
|
||||
// don't pad numeric x scales
|
||||
if (scaleKey === 'x' && !isTime && distr === ScaleDistribution.Linear) {
|
||||
return minMax;
|
||||
}
|
||||
|
||||
// happens when all series on a scale are `show: false`, re-returning nulls will auto-disable axis
|
||||
if (!hasFixedRange && dataMin == null && dataMax == null) {
|
||||
return minMax;
|
||||
|
Loading…
Reference in New Issue
Block a user