Thursday 8 May 2014

ZK Charts PointFormat ?

I want to customize the output of the tooltip for a chartpoint.

So I use "setPointFormat" to set my desired format, but I can't find the %-Values for "hour" and "minute".

The X-Value is set like in this [example](http://www.zkoss.org/zkchartsdemo/spline_irregular_time) (datetime),
I use **date.getTime()** for the x-Value

    charts.getTooltip().setPointFormat("{point.x:%A, %d.%m.%Y}");
...

    Point point = new Point(1397558652984, 100.0);

where:

 - %A = day of the week
 - %d = day
 - %m = month
 - %Y = year

How do i get **"EEEE, dd.MM.yyyy HH:mm"** ? and is there a list for ["all %" values](http://www.zkoss.org/javadoc/latest/zkcharts/org/zkoss/chart/Tooltip.html#setPointFormat(java.lang.String) ?

P.S.: ZK 7.0.1, Charts 1.0.0-BETA


Answer:   {point.x:%A, %d.%m.%y - %H:%M:%S}

No comments:

Post a Comment