[英]JSF 2.0 - Primefaces chart color
I am using the primefaces charting component and I really want to change the color of the line in the linechart and columnchart. 我正在使用primefaces图表组件,并且我真的想更改linechart和columnchart中线条的颜色。 I have looked online and maybe I am just missing it but I cant seem to find the name of the javascript attribute that controls this color. 我在网上看过,也许我只是想念它,但似乎无法找到控制此颜色的javascript属性的名称。 so far my javascript styling looks like this 到目前为止,我的javascript样式看起来像这样
<script type="text/javascript">
var chartStyle = {
padding: 20
}
</script>
I figured it out. 我想到了。 You need to style the actual chartSeries of the chart so example would be 您需要设置图表的实际chartSeries的样式,因此示例如下
<script type="text/javascript">
var chartStyle = {
padding: 20
}
var serieStyle {
color: 0x66CCFF
}
</script>
//Primefaces declaration //
<p: stackedColumn value="#{bean.value}"> var="mybean" xfield="mybean.xvalues"> style="chartStyle">
<p:chartSeries label="Values" value="mybean.yvalues" style="seriesStyle" />
</p:stackedColumn>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.