-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Labels
Area: Core APIArea: MissingAbstractionPlotly.js functionality that has to be implementedPlotly.js functionality that has to be implementedType: Enhancement
Description
Currently, JSON serialization is hidden internally, for example here:
Plotly.NET/src/Plotly.NET/ChartAPI/GenericChart.fs
Lines 243 to 255 in 324856f
let toChartHTMLNodes gChart = | |
let tracesJson = | |
let traces = getTraces gChart | |
JsonConvert.SerializeObject(traces, Globals.JSON_CONFIG) | |
let layoutJson = | |
let layout = getLayout gChart | |
JsonConvert.SerializeObject(layout, Globals.JSON_CONFIG) | |
let configJson = | |
let config = getConfig gChart | |
JsonConvert.SerializeObject(config, Globals.JSON_CONFIG) | |
It should be an easy addition to add two functions:
GenericChart.toFigureJson
, returns the DTO originally intended for exchange with dash:{ "data": ... "layout": ... "frames": ... }
GenericChart.toJson
, returns the json representatin that is used in the generated html:{ "data": ... "layout": ... "config": ... }
Metadata
Metadata
Assignees
Labels
Area: Core APIArea: MissingAbstractionPlotly.js functionality that has to be implementedPlotly.js functionality that has to be implementedType: Enhancement