• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using String Time stamps on xAxis LineChart

Daniel Velson
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using JavaFX. I've modified an example of a Zoom function on a LineChart. I get an exception when doing the zoom. I've figured out that there is a mismatch between Types on the xAxis, it wants Numbers and I'm using String Time stamps. How can I adapt this to work with time strings like "12:33:23" on xAxis?

It works like this. Draw a rectangle in the Linechart for the area to zoom in. Then press the zoom button. The sample code above gives an exception due to the problem with time strings. To get it to work use this instead:

Thanks for your help!
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!