Open
Description
Describe the bug
Bubble chart data labels are missing from SVG exports when using chart.download_chart(format="svg")
. The data labels are properly configured with dataLabels.enabled: true
and would display correctly in browser rendering, but they do not appear in the exported SVG file.
To Reproduce
Steps to reproduce the behavior:
- When I attempt to export a bubble chart with data labels using the following code:
from highcharts_core.chart import Chart
# Create bubble chart with data labels enabled
chart_data = {
"chart": {"type": "bubble"},
"plotOptions": {
"bubble": {
"dataLabels": {
"enabled": True,
"format": "{point.code}",
"style": {"fontSize": "12px", "fontWeight": "bold", "color": "white"}
}
}
},
"series": [{
"name": "Test Series",
"data": [{"x": 80, "y": 60, "z": 45, "code": "A-001"}]
}]
}
chart = Chart.from_dict({"options": chart_data})
svg = chart.download_chart(format="svg")
- I receive an SVG file that contains the bubble circles but is missing the data labels (the "A-001" text that should appear on each bubble)
Expected behavior
The exported SVG should contain both the bubble circles AND the data labels as white text overlaid on each bubble, showing the point.code
values ("A-001", "B-002", "C-003", etc.) as configured in the dataLabels.format
setting.
Your Environment:
- OS: macOS 15.5.0 (Sequoia)
- Python Version: 3.12.11
- Highcharts for Python Version: 1.10.3
- Highcharts JavaScript Version: 12.2.0
Additional context
- The issue occurs specifically with the
download_chart()
method's SVG export functionality - Data labels work correctly when the chart is rendered in a browser environment
- The chart configuration is valid and properly structured (bubbles appear correctly, just missing labels)
- This appears to be related to the Highcharts Export Server not properly handling data labels for bubble charts during SVG generation
- The issue reproduces consistently across different bubble chart configurations
- Workarounds attempted include manual SVG post-processing and different data label configurations, but none resolve the core export issue