Open hyanwong opened 2 months ago
Oh that's annoying. D3ARG.from_json()
has been giving me trouble as we change/add new features. Two aspects of this:
edge_type
, variable_edge_width
, and title
are set on draw()
so they aren't a saved parameter of the D3ARG object. If you want to replicate all of these parameters, then draw_D3()
is your best option. Though that doesn't allow you to modify anything. Similarly, draw_D3()
is broken with the new title feature.None
is already being treated as a string anyways in JavaScript, so I can force the title type to string which solves this JSON issue. Alternatively, we could set it to null
in JavaScript, but I don't think that has any advantage over the forced typing.
When exporting as JSON, the title is now saved as
None
, whereas json requiresnull
, so the following won't work. Also it doesn't remember the edge_type and variable_edge_width options, but I guess that's intentional?