node-export-server icon indicating copy to clipboard operation
node-export-server copied to clipboard

Data labels are not visible on a packedbubble chart when exporting PNG or JPEG

Open shaiarmis opened this issue 1 year ago • 1 comments

Expected behaviour

Data labels to be clearly visible on the bubbles

Actual behaviour

Data labels are invisible

Reproduction steps

Send the following chart config:

{
  "chart": {
    "type": "packedbubble"
  },
  "plotOptions": {
    "packedbubble": {
      "dataLabels": {
        "enabled": true
      }
    }
  },
  "series": [
    {
      "data": [
        1,
        2,
        3
      ]
    }
  ]
}

When exporting a SVG or PDF, the labels are shown correctly:

Screenshot 2024-10-15 at 09 38 41

curl 'http://localhost:7801/' \
  --data-raw '{"infile":"{\n  \"chart\": {\n    \"type\": \"packedbubble\"\n  },\n    \"exporting\": {\n      \"allowHTML\": true\n    },\n  \"plotOptions\": {\n    \"packedbubble\": {\n      \"dataLabels\": {\n        \"enabled\": true\n      }\n    }\n  },\n  \"series\": [\n    {\n      \"data\": [\n        1,\n        2,\n        3\n      ]\n    }\n  ]\n}\n","width":false,"scale":"2","constr":"chart","type":"image/png","b64":true}'

But when exporting to PNG or to JPEG:

Screenshot 2024-10-15 at 09 38 32

curl 'http://localhost:7801/' \
  --data-raw '{"infile":"{\n  \"chart\": {\n    \"type\": \"packedbubble\"\n  },\n    \"exporting\": {\n      \"allowHTML\": true\n    },\n  \"plotOptions\": {\n    \"packedbubble\": {\n      \"dataLabels\": {\n        \"enabled\": true\n      }\n    }\n  },\n  \"series\": [\n    {\n      \"data\": [\n        1,\n        2,\n        3\n      ]\n    }\n  ]\n}\n","width":false,"scale":"2","constr":"chart","type":"image/svg+xml","b64":true}'

shaiarmis avatar Oct 15 '24 07:10 shaiarmis

Thanks for reporting! I've added it to our backlog.

Internal note: works via exporting module by SVG (https://jsfiddle.net/nwqehgyz/)

jszuminski avatar Nov 20 '24 17:11 jszuminski