Skip to content

Commit

Permalink
parse/convert methods to eliminate errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Salceanu committed Oct 28, 2021
1 parent 091cf2c commit bc9c9ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Charts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,19 @@ function Base.parse(::Type{PlotSeries}, x::Dict{String,Any})
PlotSeries(name = x["name"], data = x["data"])
end

function Base.convert(::Type{Vector{PlotSeries}}, a::Vector{Dict{String,Any}})
[parse(PlotSeries, x) for x in a]
end

function Base.parse(::Type{Dict{String,Any}}, ::PlotSeries)
# TODO: not implemented
end

function Base.parse(::Type{PlotData}, x::Vector{Any})
PlotData(x)
end

function Base.parse(::Type{PlotOptions}, d::Dict{String,Any})
function Base.parse(::Type{PlotOptions}, ::Dict{String,Any})
# error("Not implemented") # todo: add parser
end

Expand Down

4 comments on commit bc9c9ca

@essenciary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/47940

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.14.0 -m "<description of version>" bc9c9ca566882032e40d255857708b004d057245
git push origin v0.14.0

@essenciary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/47940

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.14.0 -m "<description of version>" bc9c9ca566882032e40d255857708b004d057245
git push origin v0.14.0

Please sign in to comment.