I'm trying to create a line chart using the component <p:chart>
of the Primefaces 5.1.
And I need the X axis displays the time. Something like this:
But only against documentation of the old version.
I found several things like:
But in version 5.1 there is no such tag <p:lineChart>
, and not even the attribute extender=""
.
I created my chart based on the showcase:
But this example does not help much, because it is only working with date. And to complicate are as String. I need the hours.
I wonder if someone has already created something similar in the newer versions of Primefaces.
EDIT:
Searching a bit more, I found this topic:
I used the example mentioned it, and I could make it work.
What I could see, when it is a DateAxis is required to set the axis.setMax()
. At the end looked like this:
It worked as I needed, but two things I did not understand:
First: The reason to be required to set the axis.setMax()
.
Second: What is this pattern used in axis.setTickFormat("%H:%#M:%S")
?