[英]PrimeFaces Bar Chart Formatting
I'm trying to do 2 things on my Bar Chart:我正在尝试在条形图上做两件事:
tooltip
to show just the y axis value.tooltip
以仅显示 y 轴值。 14554 in instead of 1,14554 I've tried using custom extender, but I couldn't find out the JPlot code to it.我试过使用自定义扩展器,但我找不到它的 JPlot 代码。
I'm using PrimeFaces 5.1.我正在使用 PrimeFaces 5.1。
In order to achieve what you want with your primefaces bar chart, add following to your custom jqPlot
extender:为了使用 primefaces 条形图实现您想要的效果,请将以下内容添加到您的自定义
jqPlot
扩展器中:
To format Y axes
numbers as ###,###
(digit grouping)将
Y axes
编号格式化为###,###
(数字分组)
this.cfg.axes.yaxis.tickOptions.formatString = "%'d";
( jqPlot
uses single quote (') to format number with digit grouping) (
jqPlot
使用单引号 (') 用数字分组来格式化数字)
To force tooltip
to show only yaxis
values强制
tooltip
仅显示yaxis
值
this.cfg.highlighter={show: true,tooltipAxes: 'y',useAxesFormatters: false,tooltipFormatString: "%'d"};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.