在Google注释图表中,而不是选定的开始日期和结束日期,而是显示时间。 我想在注释图表上显示用户的开始日期和结束日期。
这是ts文件:
this.subscription6 = this.dashboardService.getData(postData)
.subscribe(orderData => {
const that = this;
this.orderHistoryData = [
['Year', 'Fuifilled Orders', 'Cancelled Orders', 'Pending
Orders']
];
console.log(orderData);
orderData.forEach(item => {
this.orderHistoryData.push([
new Date(item.date),
item.paidCount,
item.cancelledCount,
item.pendingCount
]);
});
this.lineChartData = {
chartType: 'AnnotationChart',
dataTable: this.orderHistoryData,
options: {
title: 'Orders History',
curveType: 'function',
colors: ['#128e43', '#f44242', '#ffca05', '#4285f4'],
// displayZoomButtons: false
zoomButtonsOrder: [ '1-day', '1-week',
'1-month']
}
};
this.isOrderSearching = false;
this.blockUI.stop();
});