flot widget: no option to format ticks

41 views
Skip to first unread message

mraccola

unread,
Jan 13, 2011, 5:04:03 PM1/13/11
to Lift
I don't see any option to format the ticks on a flot chart. I would
like my flot chart to have string labels for each bar instead of the
default numeric ticks. The flot library supports this will a
"tickFormatter" option and also by passing in arrays to the "ticks"
property like this:

xaxis: {
ticks: [0, [Math.PI/2, "\u03c0/2"], [Math.PI, "\u03c0"],
[Math.PI * 3/2, "3\u03c0/2"], [Math.PI * 2, "2\u03c0"]]
},

The Lift FlotAxisOptions only allows a List[Double] for the "ticks"
field which prevents this kind of mapping.

Is there a way to accomplish this?

Derek Chen-Becker

unread,
Jan 13, 2011, 7:01:10 PM1/13/11
to lif...@googlegroups.com
I don't think that this is possible with the current impl. There's explicitly a TODO in the source to support tickFormatter, but the ticks themselves are definitely doubles. Please file an enhancement ticket.

Derek


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


mraccola

unread,
Jan 14, 2011, 9:32:45 AM1/14/11
to Lift
Reply all
Reply to author
Forward
0 new messages