fillOpacity: Number

Sets opacity of the filled color.


Default: .7 for Area Charts and 1 for all other chart types.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data:[{
    type : "area",
    fillOpacity: .3, 

  },
 ]
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 9

    • shravan,

      fillOpacity applies only to filled areas like in case of area, column, etc. Hence it does not apply to line charts.

    • fillOpacity applied to the dataSeries/dataPoint. Color remains same as the default or user set value – color property on dataSeries/dataPoint. May I know what you mean by fillOpacity Color??

  1. I mean it would be great to add an option to change the fill color, making it independent from the area chart color. For example, the area line could be blue, and the fill color red.

    • This feature is not available yet. It will be a nice feature to have. We’ll consider adding into our future version.

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.