Skip to content

Commit

Permalink
rewrite default_config_type()
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Oct 13, 2023
1 parent 75641aa commit fdbb82e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Charts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const PLOT_TYPE_VOLUME = "volume"
const PLOT_TYPE_ISOSURFACE = "isosurface"

const DEFAULT_CONFIG_TYPE = Ref{DataType}()
const PB_PKGID = Base.PkgId(Base.UUID("a03496cd-edff-5a9b-9e67-9cda94a718b5"), "PlotlyBase")

kebapcase(s::String) = lowercase(replace(s, r"([A-Z])" => s"-\1"))
kebapcase(s::Symbol) = Symbol(kebapcase(String(s)))
Expand All @@ -70,9 +71,9 @@ end

function default_config_type()
if DEFAULT_CONFIG_TYPE[] == Charts.PlotConfig
pkgid = Base.identify_package("PlotlyBase")
if haskey(Base.loaded_modules, pkgid)
DEFAULT_CONFIG_TYPE[] = Base.loaded_modules[pkgid].PlotConfig
pkg = get(Base.loaded_modules, PB_PKGID, nothing)
if pkg !== nothing
DEFAULT_CONFIG_TYPE[] = pkg.PlotConfig
end
end
DEFAULT_CONFIG_TYPE[]
Expand Down

2 comments on commit fdbb82e

@hhaensel
Copy link
Member Author

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/93332

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.13.9 -m "<description of version>" fdbb82e106f2e4cf59cf66d48358cf2e89a83309
git push origin v0.13.9

Please sign in to comment.