Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] scatterplot colour not properly recognised after removal #229

Open
jorgeboucas opened this issue Apr 3, 2023 · 0 comments
Open

[BUG] scatterplot colour not properly recognised after removal #229

jorgeboucas opened this issue Apr 3, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jorgeboucas
Copy link
Member

App
scatterplot

Describe the bug
when colour is given and then removed an error occurs due to ""

Expected behavior
recognise as option not picked

Additional context

scatterplot

Traceback (most recent call last):

File "/myapp/myapp/routes/apps/scatterplot.py", line 1714, in make_fig_output

fig=make_figure(df,pa)

File "/myapp/pyflaski/scatterplot.py", line 133, in make_figure

fig.add_trace(go.Scatter(x=x, y=y, text=text,\

File "/usr/local/lib/python3.10/site-packages/plotly/graph_objs/_scatter.py", line 3258, in __init__

self["marker"] = _v

File "/usr/local/lib/python3.10/site-packages/plotly/basedatatypes.py", line 4851, in __setitem__

self._set_compound_prop(prop, value)

File "/usr/local/lib/python3.10/site-packages/plotly/basedatatypes.py", line 5262, in _set_compound_prop

val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)

File "/usr/local/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 2455, in validate_coerce

v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)

File "/usr/local/lib/python3.10/site-packages/plotly/graph_objs/scatter/_marker.py", line 1596, in __init__

self["color"] = _v

File "/usr/local/lib/python3.10/site-packages/plotly/basedatatypes.py", line 4859, in __setitem__

self._set_prop(prop, value)

File "/usr/local/lib/python3.10/site-packages/plotly/basedatatypes.py", line 5203, in _set_prop

raise err

File "/usr/local/lib/python3.10/site-packages/plotly/basedatatypes.py", line 5198, in _set_prop

val = validator.validate_coerce(val)

File "/usr/local/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 1375, in validate_coerce

self.raise_invalid_val(v)

File "/usr/local/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 288, in raise_invalid_val

raise ValueError(

ValueError:

Invalid value of type 'builtins.str' received for the 'color' property of scatter.marker

Received value: ' '

The 'color' property is a color and may be specified as:

- A hex string (e.g. '#ff0000')

- An rgb/rgba string (e.g. 'rgb(255,0,0)')

- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')

- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')

- A named CSS color:

aliceblue, antiquewhite, aqua, aquamarine, azure,

beige, bisque, black, blanchedalmond, blue,

blueviolet, brown, burlywood, cadetblue,

chartreuse, chocolate, coral, cornflowerblue,

cornsilk, crimson, cyan, darkblue, darkcyan,

darkgoldenrod, darkgray, darkgrey, darkgreen,

darkkhaki, darkmagenta, darkolivegreen, darkorange,

darkorchid, darkred, darksalmon, darkseagreen,

darkslateblue, darkslategray, darkslategrey,

darkturquoise, darkviolet, deeppink, deepskyblue,

dimgray, dimgrey, dodgerblue, firebrick,

floralwhite, forestgreen, fuchsia, gainsboro,

ghostwhite, gold, goldenrod, gray, grey, green,

greenyellow, honeydew, hotpink, indianred, indigo,

ivory, khaki, lavender, lavenderblush, lawngreen,

lemonchiffon, lightblue, lightcoral, lightcyan,

lightgoldenrodyellow, lightgray, lightgrey,

lightgreen, lightpink, lightsalmon, lightseagreen,

lightskyblue, lightslategray, lightslategrey,

lightsteelblue, lightyellow, lime, limegreen,

linen, magenta, maroon, mediumaquamarine,

mediumblue, mediumorchid, mediumpurple,

mediumseagreen, mediumslateblue, mediumspringgreen,

mediumturquoise, mediumvioletred, midnightblue,

mintcream, mistyrose, moccasin, navajowhite, navy,

oldlace, olive, olivedrab, orange, orangered,

orchid, palegoldenrod, palegreen, paleturquoise,

palevioletred, papayawhip, peachpuff, peru, pink,

plum, powderblue, purple, red, rosybrown,

royalblue, rebeccapurple, saddlebrown, salmon,

sandybrown, seagreen, seashell, sienna, silver,

skyblue, slateblue, slategray, slategrey, snow,

springgreen, steelblue, tan, teal, thistle, tomato,

turquoise, violet, wheat, white, whitesmoke,

yellow, yellowgreen

- A number that will be interpreted as a color

according to scatter.marker.colorscale

- A list or array of any of the above
@jorgeboucas jorgeboucas added the bug Something isn't working label Apr 3, 2023
@jorgeboucas jorgeboucas self-assigned this Apr 3, 2023
@jorgeboucas jorgeboucas changed the title [BUG] [BUG] scatterplot colour not properly recognised after removal Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant