We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are migrating about 40 dashboards from Graph to TimeSeries, and created wrapper that converts things, like this:
Graph
TimeSeries
def G(*args, **kwargs): if OLD_GRAFANA: return Graph(*args, **kwargs) if "stack" in kwargs: if kwargs.pop("stack"): kwargs["stacking"] = {"mode": "normal"} if "yAxes" in kwargs: yAxes = kwargs.pop("yAxes") if yAxes.left.label is not None: kwargs["axisLabel"] = yAxes.left.label if yAxes.left.min is not None: pass # ??? if yAxes.left.max is not None: pass # ??? if yAxes.left.format: kwargs["unit"] = yAxes.left.format if yAxes.left.logBase and yAxes.left.logBase != 1: kwargs["scaleDistributionType"] = "log" kwargs["scaleDistributionLog"] = yAxes.left.logBase return TimeSeries(*args, **kwargs)
But i noticed that TimeSeries does not provide min, max, softMin and softMax.
min
max
softMin
softMax
If in Grafana UI, I click "Migrate", I got these fieldConfig:
fieldConfig
"fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisLabel": "Latency", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "stepAfter", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "links": [], "mappings": [], "max": 1e-7, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "s" }, "overrides": [] },
So I see there are options for these things.
The text was updated successfully, but these errors were encountered:
As a workaround:
... if yAxes.left.min is not None: kwargs.setdefault("extraJson", {}).setdefault("fieldConfig", {}).setdefault("defaults", {})["min"] = yAxes.left.min if yAxes.left.max is not None: kwargs.setdefault("extraJson", {}).setdefault("fieldConfig", {}).setdefault("defaults", {})["max"] = yAxes.left.max ...
Sorry, something went wrong.
No branches or pull requests
We are migrating about 40 dashboards from
Graph
toTimeSeries
, and created wrapper that converts things, like this:But i noticed that
TimeSeries
does not providemin
,max
,softMin
andsoftMax
.If in Grafana UI, I click "Migrate", I got these
fieldConfig
:So I see there are options for these things.
The text was updated successfully, but these errors were encountered: