From 557ffa7f106e44a09a99746dcd8e4f369ea4730d Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 26 Dec 2016 18:06:48 +0500 Subject: Charts implementation --- web/app/store/DistanceUnits.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web/app/store/DistanceUnits.js') diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js index cc9f1e9..57d15fc 100644 --- a/web/app/store/DistanceUnits.js +++ b/web/app/store/DistanceUnits.js @@ -33,6 +33,15 @@ Ext.define('Traccar.store.DistanceUnits', { factor: 0.000539957 }], + convertValue: function (value, unit) { + var model; + if (!unit) { + unit = 'km'; + } + model = this.findRecord('key', unit); + return value * model.get('factor'); + }, + formatValue: function (value, unit) { var model; if (!unit) { -- cgit v1.2.3