Skip to content

have js load plotly json directly - #6264

Open
vandenman wants to merge 1 commit into
jasp-stats:developmentfrom
vandenman:plotly_not_in_analyses_json
Open

have js load plotly json directly#6264
vandenman wants to merge 1 commit into
jasp-stats:developmentfrom
vandenman:plotly_not_in_analyses_json

Conversation

@vandenman

Copy link
Copy Markdown
Contributor

Requires jasp-stats/jaspBase#208 and jasp-stats/jaspGraphs#154

As we discussed in the meeting, before in jaspPlot we still printed and saved all the plotly information in analyses.json in a jasp file. This could get quite big and was just duplicate because it's the exact same information as in the actual json files.

In a nutshell:

  • removes loadPlotlyJsonInResults and everything around it.
  • instead js loads the plotly json file directly.
  • jaspBase: instead of ColumnEncoder::decodeJson(plotlyJson); in analysis.cpp, we now do this in R right before writing the json file using writeLines(.plotlyToJson(plotlyOrTryError), plotlyJsonFile). We don't expose decodeJson so this first decodes the R object and then make it into json.
  • jaspGraphs: to properly decode the plotly object I needed to pass extra information to jaspBase that was originally only added when asked for the return value in json form. I could have avoided this PR, but then we would have done an additional json roundtrip.

Obviously made with 🤖 .

@vandenman
vandenman requested a review from JorisGoosen June 17, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant