tags:

views:

138

answers:

1

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>
A: 

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>
IamBanksy
You can always read more about it in their User Guide
Odelya