[Python] Update programmatically "value" and "delta" attributes of Indicators using Plotly...

Discussão em 'Python' iniciado por Stack, Agosto 27, 2025.

  1. Stack

    Stack Membro Participativo

    From the examples illustrated in How to make gauge charts in Python with Plotly, I wonder whether it is possible to programmatically update the fields, hereinafter:

    • value
    • delta

    ?

    N.B: By updating programmatically, I mean:


    • assigning global variables like var1, var2 to attributes, while ensuring - in this case - that their values are passed to value, delta:

      fig.add_trace(go.Indicator(
      value = var1,
      delta = {'reference': var2},
      gauge = {
      'axis': {'visible': False}},
      domain = {'row': 0, 'column': 0}))

    Continue reading...

Compartilhe esta Página