Skip to content

Commit

Permalink
add a delete! method for HasFields
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Oct 10, 2024
1 parent fc32836 commit d60fe56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/traces_layouts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ function Base.pop!(gt::HasFields, k1::Symbol, k2::Symbol,
pop!(d3, k4, Dict())
end

function Base.delete!(hf::PlotlyBase.HasFields, args...)
pop!(hf, args...)
return hf
end

# Function used to have meaningful display of traces and layouts
function _describe(x::HasFields)
fields = sort(map(String, collect(keys(x.fields))))
Expand Down

0 comments on commit d60fe56

Please sign in to comment.