How can I get a format like this: '09 Oct 10:20 AM', I tried changing the labelFormat according to the documents and did so unsuccessfully. I apologize for asking a second question, thank you for helping.
|
|
|
public axislabelrender(args: IAxisLabelRenderEventArgs): void {
if (args.axis.valueType !== 'DateTime') {
return;
}
let label: string[] = [args.text];
label = label[0].split(',');
label.splice(1, 1);
let time: string[] = label[1].split(':');
label = label[0].split(' ');
time[2] = time[2].split(' ').splice(1, 1).toString();
args.text = label[1] + ' ' + label[0] + ' ' + time[0] + ':' + time[1] + ' ' + time[2];
}
|
|
|
Thank you for the assistance.
One question, is there a way to get the chart's width to the maximum upon starting the browser? I tried, but it gave me errors for doing so.
|
|
|
|
I tried using the solution you proprose (code changes), but still receive the same error. I changed the codes to emphasize the problem.
TypeError: Cannot read property 'calculateRangeAndInterval' of undefined
That error will pop up if I use this.chartv0.refresh() in ngOnInit. Is there a solution to allow the chart to be shown widescreen without the error?
Thank you for answering.
|
|
|
|
|
|
It works. Thank you for the assistance.