I am using the primefaces charting component and I really want to change the color of the line in the linechart and 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. so far my javascript styling looks like this
<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
<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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.