Can't get rid of background image when using Chartkick

I am using chartkick in rails 4.1 and for some reason I cannot change the background image!

My config file introduces everything except background transparency. Any help would be great.

My config file:

Chartkick.options = {library: {legend: {enabled: true}, export: {enabled: false}, backgroundColor: "transparent", height: "300px", width: "200px", colors: ["# 2c3e50" , "# 2980b9", "# e74c3c", "# c0392b"]}}

Thank!!

+3


source to share


1 answer


If you are using Google charts with Chartkik, you cannot use the transparency of this property. You can check the documentation on individual chart parameters, for example here on PieChart :



backgroundColor

  • The background color for the main area of ​​the chart. It can be either a simple colored HTML string such as "red" or "# 00cc00", or an object with the following properties:
    • backgroundColor.stroke: the color of the chart border, as an HTML color string.
    • backgroundColor.strokeWidth: the width of the border, in pixels.
    • backgroundColor.fill: Fill color as HTML color string.
+1


source







All Articles