From 1ef9b128bb73b6ae12cb0df17e9f6a3799db62d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Titas=20Bu=C4=8Delis?= <66130422+Titas22@users.noreply.github.com> Date: Fri, 17 Nov 2023 06:39:30 +0000 Subject: [PATCH] allow NaN/Inf values in JSON --- src/PlotlyLight.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl index 35fbe19..e7a550b 100644 --- a/src/PlotlyLight.jl +++ b/src/PlotlyLight.jl @@ -76,7 +76,7 @@ function download_schema!() end function load_schema(force=false) if force || !isassigned(schema) - schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config) + schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config; allow_inf=true) end return schema[] end @@ -160,7 +160,7 @@ module Preset export $f function $f() file = joinpath(templates_dir[], $(string(t)) * ".json") - SETTINGS.layout.template = open(io -> JSON3.read(io, Config), file) + SETTINGS.layout.template = open(io -> JSON3.read(io, Config; allow_inf=true), file) return SETTINGS end end @@ -267,7 +267,7 @@ function Base.show(io::IO, M::MIME"text/html", o::Plot; setting::Settings = SETT show(io, M, setting.load_plotlyjs()) show(io, M, setting.make_container(id)) print(io, "") else iframe = setting.iframe