Primefaces 5 个旋转轴刻度标签 [英] Primefaces 5 Rotated Axis Tick Labels
本文介绍了Primefaces 5 个旋转轴刻度标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Primefaces 4 中,我们可以配置轴刻度标签的旋转如下:
In Primefaces 4 we can configure the rotation of axis tick labels as below:
<p:barChart id="idBars" value="#{chartBean.modelChart}"
[...]
style="xaxisAngle=-30"
>
</p:barChart>
现在,如何使用 Primefaces 5 或更高版本配置轴刻度标签的旋转?
Now, how can I configure the rotation of axis tick labels using Primefaces 5 or higher?
提前致谢.
推荐答案
您可以在模型中进行此操作.(http://www.primefaces.org/docs/api/5.0/org/primefaces/model/chart/BarChartModel.html)
You can make this in the model. (http://www.primefaces.org/docs/api/5.0/org/primefaces/model/chart/BarChartModel.html)
Axis xAxis = barModel.getAxis(AxisType.X);
xAxis.setTickAngle(-30);
这篇关于Primefaces 5 个旋转轴刻度标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文