fiji:chartData converter

  • alex
Posted: Sat, 12/25/2010 - 06:48

Hello everyone,

I have a line chart that displays a time period on the x-aches .

Data for the x-aches is of type long (Date.getTime()) to maintain the relative distance between the separate time points.

Numeric numbers of the long values are not convenient to display as values on the x-aches.

I would like to use a javax.faces.convert.Converter to convert the long value back to a String representation of the date, eg. dd-MM-yyyy.

My approach right now is the following:

This does not work unfortunately. Any suggestions to convert the long value back to a String within the graph labels?

Thanks!

I don't see your code. Could

  • maxkatz
  • 02/17/10
  • Mon, 12/27/2010 - 09:06

I don't see your code. Could you repost it or post it via http://pastie.org?

Oh, Im sorry the code tag

  • alex
  • 12/16/10
  • Tue, 12/28/2010 - 05:59

Oh, Im sorry the code tag seems not to work. Here is the code on pastie:

http://pastie.org/1411049

I'm not sure if a converter

  • maxkatz
  • 02/17/10
  • Tue, 12/28/2010 - 08:42

I'm not sure if a converter would work here, it's not clear what value it would convert. I'd just do the conversation inside the bean and return already formatted values. Hope this helps.

Thanks for the reply, I

  • alex
  • 12/16/10
  • Tue, 12/28/2010 - 11:35

Thanks for the reply,

I already tried the conversion within the bean. The problem here is that if I convert the date to String, I cannot maintain appropriate distances between two dates. The graph will for example display the relative distance between the three dates 01/01, 01/02 and 01/05 equally, if dates 01/03 and 01/04 are missing. This is not optimal.