After I set GaugePanel.calcs to be one of the options, e.g. GAUGE_CALC_MEAN = 'mean' it should return me a correct GaugePanel json.
What happened?
The GaugePanel is mal-formatted. I got the error message from frontend that TypeError: undefined is not an object (evaluating 'e.reduceOptions.values'). After I compare the differences between the code-generated Json and the json generated from UI editor, I notice the following schema difference:
The reduce function in the code-genereted json (grafanalib) one is
You can clearly see a shift where the calcs are located between these two are different.
And one more thing I noticed that the param reduceCalc in Stat behaves correctly, which files calcs under options.reduceOptions instead of fieldConfig. So I suspect this to be a bug (un-synced components).
What you expected to happen?
After I set
GaugePanel.calcs
to be one of the options, e.g.GAUGE_CALC_MEAN = 'mean'
it should return me a correct GaugePanel json.What happened?
The GaugePanel is mal-formatted. I got the error message from frontend that
TypeError: undefined is not an object (evaluating 'e.reduceOptions.values')
. After I compare the differences between the code-generated Json and the json generated from UI editor, I notice the following schema difference:The reduce function in the code-genereted json (grafanalib) one is
and the one generated from UI (my grafana cluster) is
You can clearly see a shift where the
calcs
are located between these two are different.And one more thing I noticed that the param
reduceCalc
inStat
behaves correctly, which filescalcs
underoptions.reduceOptions
instead offieldConfig
. So I suspect this to be a bug (un-synced components).