Skip to content

Create GenericChart from Json #421

Answered by kMutagene
uittorio asked this question in Q&A
Discussion options

You must be logged in to vote

The thing with our strongly typed layers is that they unfortunately only work well for JSON creation. plotly.js JSON has properties that have arbitrary types, which you can do in a dynamically typed language such as JavaScript or python, but is quite hard to do in .NET.

We circumvent this on object creation by offering a strongly typed subset of possible types and by using DynamicObj, which lets us set members dynamically. However, this basically prevents deserialization - even if you could deserialize all nested objects into DynamicObj (which does not work), there is no way of knowing whether that DynamicObj represents a Trace, a LinearAxis, or any other strong type abstraction provided …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by uittorio
Comment options

You must be logged in to vote
1 reply
@uittorio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants