Using TC Pro Ax v2013, when exporting a line chart with a date x axis, the axis labels disappear. Exporting to the HTML5/Canvas version includes the labels, but we don't want to use this as we want the interactivity (pan/zoom) the JS version allows. I've attached a ZIP file containing three sample files, all exported from the same source chart: A native .TEE file, the JS version and the Canvas version. You can see that x-axis labels (formatted dates) are missing the from JS version.
I exported these using the chart editor UI, so if there's a way to accomplish this through code, please let me know.
Otherwise, is there any other way I can export to JS and ensure that the labels are included in the output - or is this not (yet?) supported?
Thanks,
Jared
JS Export missing labels
-
- Newbie
- Posts: 2
- Joined: Mon Dec 02, 2013 12:00 am
JS Export missing labels
- Attachments
-
- samples.zip
- (62.89 KiB) Downloaded 776 times
Re: JS Export missing labels
Hi Jared,
I think this is due to the differences between the "zero" date in VB6 and JavaScript.
If I'm not wrong, in VB6 the zero corresponds to 12/30/1899 while in Javascript the zero corresponds to 1/1/1970.
So, converting the doubles to Dates as follows isn't enough:
Don't hesitate to let us know if you still find problems with it
I think this is due to the differences between the "zero" date in VB6 and JavaScript.
If I'm not wrong, in VB6 the zero corresponds to 12/30/1899 while in Javascript the zero corresponds to 1/1/1970.
So, converting the doubles to Dates as follows isn't enough:
Code: Select all
msecsInADay=86400000; //24*60*60*1000
for (s=0; s<Chart1.series.count(); s++) {
for (t=0; t<Chart1.series.items[s].count(); t++) {
Chart1.series.items[s].data.x[t] = new Date(Chart1.series.items[s].data.x[t]*msecsInADay);
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |