Closed dennisquintel closed 12 years ago
The answer is adding the following gquery: percentage_renewables_in_renewability
, which already multiplies it by a factor 100.
Hmmm... could we use the already existing mutateValue method in renewables.coffee#20-23 ?
# Convert fractions to a percentage.
mutateValue: (value) -> value * 100
displayValue: DISPLAY_PERCENTAGE
Closed by e48e65945.
Value formatting has been removed from the DashboardProp classes. Each Query now has a mutated
and formatted
method which will return the appropriate values. If you want to change the way a query is displayed in the UI, you can find the relevant line in query_transforms.coffee. Each query key is represented in the TRANSFORMS
hash, and the format
function controls how the query value appears throughout the UI.
The query_transforms file is a bit ugly; since ET-Engine already knows the unit of each query (%, factor, PJ, etc) it would be ideal to re-use that. But we can worry about that in a week or two... this should suffice for now.
We need to put 4% here in stead of 0.04...