Skip to content
18 changes: 16 additions & 2 deletions client-app/src/desktop/tabs/charts/LineChartModel.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {ChartModel} from '@xh/hoist/cmp/chart';
import {HoistModel, managed, XH} from '@xh/hoist/core';
import {observable, makeObservable, runInAction, bindable} from '@xh/hoist/mobx';
import Highcharts from 'highcharts/highstock';
import {isEmpty} from 'lodash';
import {Highcharts} from '@xh/hoist/kit/highcharts';

export class LineChartModel extends HoistModel {
@bindable currentSymbol: string = '';
Expand Down Expand Up @@ -52,10 +52,24 @@ export class LineChartModel extends HoistModel {
private getChartModelCfg() {
const fillColor = Highcharts.getOptions().colors[0];
return {
exporting: {
enabled: true,
buttons: {
contextButton: {
menuItems: [
'viewFullscreen',
'separator',
...(Highcharts.isWebKit ? ['copyToClipboard'] : []),
'printChart',
'separator',
'downloadCSV'
]
}
}
},
chart: {zoomType: 'x'},
navigator: {enabled: true},
rangeSelector: {enabled: true},
exporting: {enabled: true},
legend: {enabled: false},
scrollbar: {enabled: false},
xAxis: {type: 'datetime'},
Expand Down
9 changes: 8 additions & 1 deletion client-app/src/mobile/grids/zone/ZoneGridPageModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export class ZoneGridPageModel extends HoistModel {
columns: [
companyCol,
winLoseCol,
cityCol,
{
...cityCol,
appData: {
multiZoneLabelRenderer: rec => {
return rec.data.city + ' DON';
}
}
},
profitLossCol,
{...tradeVolumeCol, headerName: 'Vol'},
tradeDateCol,
Expand Down
Loading