Skip to content

Plot selected/unselected attribute not working #60

@Wingmore

Description

@Wingmore

Problem
Nothing happens when passing in a marker object into selected/unselected variable

I'm trying to edit code from the tutorial here: https://dash-julia.plotly.com/interactive-graphing.

At the very bottom, there is code which seems to suggest you can edit properties of selected and unselected points. However when I try to edit the marker = ... line, nothing happens

Code

using DataFrames, Dash, DashHtmlComponents, DashCoreComponents, PlotlyJS

df4 = DataFrame(rand(30, 2), :auto)
plot(
    df4, x=:x1, y=:x2,
    mode="event+markers+text",
    marker_size=20,
    text=1:size(df4)[1],
    selectedpoints=selectedpoints,
    unselected=(
        marker=(opacity=0.1, size=55, textfont_color = "rgba(0,0,0,0)")
    )
)

The documentation here https://plotly.com/julia/reference/scatter/#scatter-selected also seems to suggest you can pass in a dictionary, and i have tried

unselected = Dict("size"=>40)

but this time I get an error which goes

ERROR: LoadError: MethodError: no method matching setindex!(::PlotlyBase.PlotlyAttribute{Dict{Symbol, Any}}, ::Int64, ::Missing, ::Symbol, ::String)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions