[英]Change colors in Primefaces chart
我正試圖從這個鏈接實現Primefaces圖表。
我設法創建了這個例子:
<div id="datachart" style="margin: 0 auto; width:850px; height:400px; position:relative">
<h:form prependId="false">
<p:growl id="growl" showDetail="true" />
<p:barChart id="basic" value="#{bean.categoryModel}"
title="Accounts and Groups" min="0" max="#{DashboardController.chartMaxSize}" style="height:400px"
shadow="true" barMargin="40" barPadding="90" seriesColors="4D94FF, 1975FF"
yaxisLabel="Size" zoom="true">
<p:ajax event="itemSelect" listener="#{bean.itemSelect}" update="growl" />
</p:barChart>
</h:form>
</div>
我創建了這個css以更改圖表顏色標簽:
<style type="text/css">
.jqplot-title{
color:#FFFFFF;
}
.jqplot-xaxis-label{
color:#FFFFFF;
}
.jqplot-yaxis-label{
color:#FFFFFF;
}
.jqplot-xaxis-tick{
color:#FFFFFF;
}
jqplot-yaxis-tick{
color:#FFFFFF;
}
</style>
但由於某種原因,顏色沒有改變。 你能幫我找到我失蹤的東西嗎?
嘗試使用<f:facet name="last">
<f:facet name="last">
your css styles goes here
Or even better drop them into .css file and include it here
</f:facet>
進一步參考看看這個
和
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.