added chart option "unit" for special target units #773
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I missed an option to set the target unit for an observation type in
graphs.conf
. So I would like to introduce a new optionunits
that allows to set the unit individually for each chart. That comes in useful if you want to show graphs for summarized readings with an unit starting with "kilo" or "mega" for long time periods (month, year), but use the base unit for short time periods (day, week, may be). Using that option converts the values of the chart line it is specified for to the given target unit and sets the unit label appropriately. I hope that will be useful to other users, too.Typical units for that would be
watt_hour
andkilowatt_hour
orwatt_hour_per_meter_squared
andkilowatt_hour_per_meter_squared
, respectively.Example: