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/view/Report.js | 55 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 11 deletions(-) (limited to 'web/app/view/Report.js') diff --git a/web/app/view/Report.js b/web/app/view/Report.js index 5851c4c3..bc78fe07 100644 --- a/web/app/view/Report.js +++ b/web/app/view/Report.js @@ -16,7 +16,7 @@ */ Ext.define('Traccar.view.Report', { - extend: 'Ext.grid.Panel', + extend: 'Ext.panel.Panel', xtype: 'reportView', requires: [ @@ -67,17 +67,50 @@ Ext.define('Traccar.view.Report', { }] }, - listeners: { - selectionchange: 'onSelectionChange' + layout: { + type: 'fit' }, - forceFit: true, - - columns: { - defaults: { - minWidth: Traccar.Style.columnWidthNormal + items: [{ + xtype: 'grid', + itemId: 'grid', + listeners: { + selectionchange: 'onSelectionChange' + }, + hidden: true, + forceFit: true, + flex: 1, + columns: { + defaults: { + minWidth: Traccar.Style.columnWidthNormal + }, + items: [ + ] + }, + style: 'borderTop: 1px solid lightgray' + }, { + xtype: 'cartesian', + itemId: 'chart', + plugins: { + ptype: 'chartitemevents', + moveEvents: true + }, + hidden: true, + forceFit: true, + flex: 1, + store: 'ReportRoute', + axes: [{ + title: Strings.reportCharts, + type: 'numeric', + position: 'left' + }, { + type: 'time', + position: 'bottom', + fields: ['fixTime'] + }], + listeners: { + itemclick: 'onChartMarkerClick' }, - items: [ - ] - } + insetPadding: Traccar.Style.chartPadding + }] }); -- cgit v1.2.3