Skip to content

Invalid property for indicator.Gauge: steps  #1713

@Mahdis-z

Description

@Mahdis-z

Apparently there is a typo (stepss instead of steps). "stepss" is in the list of valid attributes.

import plotly.graph_objects as go

fig = go.Figure(data = go.Indicator(mode = "number+gauge+delta", value = 180, 
delta = {'reference': 200}, domain = {'x': [0.25, 1], 'y': [0.08, 0.25]},
title = {'text': "Revenue"}, gauge = {'shape': "bullet", 'axis': {'range': [None, 300]},
'threshold': {'line': {'color': "black", 'width': 2}, 'thickness': 0.75, 'value': 170}, 
'steps': [{'range': [0, 150], 'color': "gray"}, {'range': [150, 250],
'color': "lightgray"}], 'bar': {'color': "black"}}))

fig.update_layout(width = 300, height = 300, margin = {'t': 0, 'b':0, "l":0, "r":0})
fig.show()

and the error is:
ValueError: Invalid property specified for object of type plotly.graph_objs.indicator.Gauge: 'steps'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions