-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Just updated emoncms and graphs module on my live server and now have dozens of account each with dozens of dashboards and graphs etc, all now displaying an ugly "undefined" after every graph legend entry and in multiple places in the graph tooltips.
There are 2 issues here.
First and foremost is the over use of the units field when displaying feed names. A unit is part of the value not the value name. I previously mentioned this in the "added feed unit to tooltip and legend #31" PR comments.
This is an issue even if the unit is defined, for example we have key names used for the apps module that could result in a graph legend like so
emontx: solar_kwh kWh
emontx: export_kwh kWh
emontx: use_kwh kWh
Secondly, it shouldn't display "undefined" even in the correct locations, for this feature of displaying units (when defined) to be backwards compatible it must not display or just display an empty string if the unit is undefined as there are too many pre-existing feeds without units defined.
I am using latest emoncms/master and graph/master at time of writing. db updated and browser cache cleared.
