Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Br chart debugging #736

Closed
wants to merge 8 commits into from
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