apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Download SVG / PNG does not include images / custom annotations

Open eyeswideopen opened this issue 2 years ago • 8 comments

Description

When downloading a chart with the builtin "Download as SVG / PNG" feature custom images (as seen in the official documentation: https://apexcharts.com/react-chart-demos/line-charts/line-chart-annotations/ ) are not included in the resulting image.

Steps to Reproduce

Try yourself in the official example: https://apexcharts.com/react-chart-demos/line-charts/line-chart-annotations/ download as png instagram icon not included

Expected Behavior

include images

Screenshots

chart: Screenshot 2022-05-26 at 14 46 08

resulting png: areachartx2(1)

Reproduction Link

https://apexcharts.com/react-chart-demos/line-charts/line-chart-annotations/

Thanks for the awesome library!!

eyeswideopen avatar May 26 '22 12:05 eyeswideopen

I am having the same issue :(

Loque18 avatar Oct 09 '22 03:10 Loque18

+1 - same issue

lunchev avatar Nov 25 '22 14:11 lunchev

  • 2 the same issue

ChamkhiAnas avatar Jan 22 '23 13:01 ChamkhiAnas

+1

sajornet avatar Apr 25 '23 21:04 sajornet

Has anyone found a solution to this?

abyshake-anand avatar Aug 21 '23 16:08 abyshake-anand

+1

wojciechk avatar Sep 07 '23 18:09 wojciechk

One workaround I have found is using data URIs directly instead of relying on file paths.

Here's an example of how you can do this:

annotations: {
  images: {
    path: 'data:image/svg+xml;base64,<YOUR_SVG_AS_BASE64>'
  }
}

Perhaps this could be solved in the apex library directly by converting these paths before initial rendering of the chart.

chrisjkellett avatar Jan 13 '24 11:01 chrisjkellett

One workaround I have found is using data URIs directly instead of relying on file paths.

Here's an example of how you can do this:

annotations: {
  images: {
    path: 'data:image/svg+xml;base64,<YOUR_SVG_AS_BASE64>'
  }
}

Perhaps this could be solved in the apex library directly by converting these paths before initial rendering of the chart.

Thank you so much! This worked for me with PNG images!

juanxodj avatar Feb 21 '24 22:02 juanxodj