Description:
Fixes #15262
The average order value on the evolution overview charts was always shown as zero, this was caused by pre-formatted values in the datatable breaking the jqplot data generation.
This fix attempts to solve this by:
- Respecting evolution chart visualization calls which set
format_metrics = 0
(only setting a format_metrics
default value if there are no request override parameters)
- Having evolution charts set
format_metrics = 0
- Passing the series units to the jqplot data generation
setAxisYValues
method
- If the series unit is a percent then convert chart data values to display percentages.
- jqplot chart number formatting currently doesn't fully support internationalization (eg. forcing a dot as a decimal point separator), all series formatting units were being added as a postfix, I added a minor tweak to show dollar and pound currency symbols as prefixes. This is obviously not ideal but should be a slight improvement for some people, if we had a reliable way to determine the currency symbol position then we could possibly add that as metadata to
core/Metrics::getUnit()
and make it available to the jqplot formatting code.
Review