ZingChart: How do I make my chart have a transparent background?

To make your chart background match the container

 you can set the backgroundColor  property to either transparent  or none .

There are two places you need to set this property. In the plotarea object or the root of your chart configuration object.  The results are different.  Notice here we set the plotarea  to black but the background of the chart to red using backgroundColor  on the root and plotarea respectively.

{
  type: "bar",
  backgroundColor:'red', // This is in the root
  plotarea:{
    backgroundColor:'black'
  }...
}

Now you can drop the background for either region using a value of 'none'  or 'transparent' .  Here we do both.

backgroundColor:'none', // This is in the root
plotarea:{
  backgroundColor:'transparent'
}...

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us