-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How can I change the color of the crosshair lines? Only found a boolean flag in Tooltip class for switching crosshairs on/off.
Hello,
The color of the crosshair lines can be customized by setCrosshairs(List)
in Tooltip.
For example:
Tooltip tooltip = chart.getTooltip();
// create a list to store the style maps
List<Map<String, String>> crosshairsStyle = new LinkedList<Map<String, String>>();
// add the first map to customize x axis crosshair style
Map<String, String> xStyle = new LinkedHashMap<String, String>();
xStyle.put("color", "#f39c12");
crosshairsStyle.add(xStyle);
// add the second map to customize y axis crosshair style
Map<String, String> yStyle = new LinkedHashMap<String, String>();
yStyle.put("color", "#27ae60");
yStyle.put("dashStyle", "dash");
yStyle.put("width", "2");
crosshairsStyle.add(yStyle);
tooltip.setCrosshairs(crosshairsStyle);
Hello enixser, i believe that you need override some css icon. Searching the net i found that: .z-icon-crosshairs:before{content:"\f05b"}. I'm not sure if it's possible, but maybe you should try.
links found:
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/zul/less/font/_variables.less
Asked: 2014-05-19 11:21:27 +0800
Seen: 17 times
Last updated: May 20 '14