1) How can I round / truncate Stock Chart Y axis in Angular?
2) The date line shows date as "Thursday, Jun 27, 23: 00". How can I format it to show the date in dd/mm/yyyy format?
Please see attached screenshot circled in blue colour.
Example:
Code:
Code: Select all
chartOptions: any = {
credits: {
enabled: false
},
chart: {
type: 'line',
zoomType: 'x'
},
title: {
text: null,
},
subtitle: {
text: null,
},
xAxis: {
type: 'datetime'
},
yAxis: {
title: {
text: 'Cumulative Return'
},
labels: {
formatter: function () {
return this.value * 100;
}
}
},
legend: {
enabled: true
},
tooltip: {
pointFormatter: function () {
return '<b>' + this.series.name + '</b>: ' + Highcharts.numberFormat(this.y * 100, 2);
}
},
plotOptions: {
series: {
marker: {
enabled: false
}
}
},
series: [{},{}]
};
Thanks.