frappe / charts

Simple, responsive, modern SVG Charts with zero dependencies
https://frappe.io/charts
MIT License
14.9k stars 716 forks source link

Custom background (color or image) #343

Open hofmannsven opened 3 years ago

hofmannsven commented 3 years ago

Hey! Is it possible to customize the background of the chart? I want to customize the background color or even add a background image.

I already tried to add the background image to the website, but the background (image) is no part of the rendered SVG and consequently not included in the exported SVG file. Can you help?

xch1029 commented 3 years ago

for now, you can set background for '.chart-container'. it works well. color or image is ok.

hofmannsven commented 3 years ago

@xch1029 This solution works well for the visual presentation in the browser but is not visible in the exported file. How can I add (background) styles which are also a part of the exported SVG file?

xch1029 commented 3 years ago

for exported file, we need creator to add this feature. for now,the exported function can't deal background color well

hofmannsven commented 3 years ago

@xch1029 Okay. Will it be part of v2?

scmmishra commented 3 years ago

@hofmannsven no guarantees on adding this to v2.

hofmannsven commented 3 years ago

@scmmishra Oh,... Is there any alternative workaround to hook into the export function?