3

I'm using chartkick in a rails 4.1, and for some reason I cannot change the background image!

My config file enacts everything except for the background transparency. Any assistance would be excellent.

My config file:

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

Thanks!!

williamthomas
  • 105
  • 1
  • 10

1 Answers1

1

If you are using google charts with Chartkik, you can't use transparent on that property. You can check the documentation on individual chart options, like here on the PieChart:

backgroundColor

  • The background color for the main area of the chart. Can be either a simple HTML color string, for example: '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 border width, in pixels.
    • backgroundColor.fill: The chart fill color, as an HTML color string.
Andión
  • 1,103
  • 15
  • 26