I'm developing a Shiny app in Python and have created a heatmap that’s close to what I want.
However, instead of squares, I’d like each cell to be a square that contains a circle similar to the example below.
Here’s the relevant part of my Highcharts heatmap and its output:
options = {
'chart': {
#'type': 'heatmap',
'plotBorderWidth': 1,
'width': 1500,
'height': 800,
},
'title': {'text': postes},
'xAxis': {
'categories': categories_x,
'title': {'text': ''}
},
'yAxis': {
'categories': categories_y,
'title': {'text': ''},
'reversed': True,
'labels': {'useHTML': True}
},
'legend': {'enabled': False},
'series': [
{
'type': 'heatmap',
'name': 'État EVT',
#'borderWidth': 1,
#'borderColor': 'black',
'data': heatmap_data,
'dataLabels': {'enabled': False}
},
{
'type': 'scatter',
'name': 'Alertes',
'data': icons_to_add,
'marker': {
'symbol': 'url(https://cdn-icons-png.flaticon.com/512/80/80795.png)',
'width': 20,
'height': 20
},
'enableMouseTracking': False
}
],
'boost': {'enabled': True},
}
plot_lines = []
for i in range(len(categories_y) - 1):
plot_lines.append({
'color': '#cccccc',
'width': 1,
'value': i + 0.5,
'zIndex': 5
})
options['yAxis']['plotLines'] = plot_lines
options_json = json.dumps(options, ensure_ascii=False)
#### OUTPUT
@output
@render.ui
def hc_container_heatmap():
options_json, dict_lien_ged_json, _, styled_df = donnees_compilees()
return ui.HTML(f"""
""")

And here's what I'm trying to achieve :

Is there a way to modify the Highcharts (or similar) configuration to achieve the look above?
Or, is there a better approach to render a graph with the same dataframe and integration within Shiny for Python?