Scatter Plot Date Axis

User dfc0d1fa6e

11-12-2014 14:00:43

Hello,  I have data sets relating structure to timed results.  I would like to use the scatter plot in the form view to plot result vs date (x-axis), but I know that currently only numerical fields can be used in the scatter plot.  Is there a good way around this?  I was planning on using a new field that is the date written YYYYMMDD as an integer, but that opens several other formatting issues.  


 


Thank you.

ChemAxon 26d92e5dcd

19-12-2014 09:54:26

Hello,


I am sorry for delayed answer. Yes, unfortunately we do not support Date fields in chart widgets. The easiest way would be creating an integer calculated field that takes Date field as variable and using a small groovy code snippet convert it to the number in YYYMMDD format. Unfortunately, Date Field does not work in Calculated field either (there is a bug with format parsing that is not yet fixed)


The best would be creating a Data Tree Groovy script that would create the field for you directly. There are methods in groovy to manage dates (see here) and IJC offers API to create fields (full documentation here). 


Meanwhile I will think of some quick code for you that could do that for you.


Wishing all the best


David