millisecond time and date stamp on x-ais in Jfree Line Chart issue

I am trying to use a time/ Date stamp incl milliseconds as the x-axis on the Jfree line chart. I converted my original unix timestamp using the UNIX timestamp to Date&Time node. I then had to convert this timestamp to the legacy Date&Time as otherwise Jfree didn’t recognise it.

I then get an error stating that
Execute failed: You are trying to add data where the time period class is org.jfree.data.time.Second, but the TimeSeries is expecting an instance of org.jfree.data.time.Millisecond.

If I change the series to EXCLUDE milliseconds it works, but then I have the issue of duplicates appearing.
Execute failed: You are attempting to add an observation for the time period Thu Aug 06 16:11:47 CEST 2020 but the series already contains an observation for that time period. Duplicates are not permitted. Try using the addOrUpdate() method.

Can Jfree import millisecond time and date somehow?

image

I am using the latest version of Knime with the latest updates installed.

Thanks

Hi @piashaw -

As an aside, is there a reason you’re using the older JFreechart instead of the Line Plot or Line Plot (Plotly) nodes for your viz?

I’ll have to ask internally about the issue with the JFreechart and milliseconds.

Only that I didn’t know they existed! So will try them out now. I searched for chart nodes and they didn’t appear!

Thanks

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.