Open BatmanAoD opened 3 weeks ago
Provide a simple way to validate a Chart. (In a typical builder pattern, there's a build() function that turns the builder into a final object, and performs validation on it.)
Simple is an understatement, currently we are not doing any validation. This would require a huge amount of effort and also a shift in the library from a strict translation library to a check, validate and translate. I would be interested in implementing this, or help someone to implement this, but I am not sure if it is feasible. Is this being done in echarts when using JavaScript?
Document which elements of a chart are necessary for rendering
I think this would be easier, we could add some documentation on which components are needed. Do you know of an overview where we can easily see the required components for each chart type?
Do something to improve the JavaScript errors themselves (in particular, reading 'get' doesn't say what is missing)
This error message is bad, but I also believe we can't do anything about this. We are just calling the echarts library and the error is propagating from there. (But I am not a JavaScript person, I could be wrong on this)
Simple is an understatement, currently we are not doing any validation. This would require a huge amount of effort and also a shift in the library from a strict translation library to a check, validate and translate.
Right, sorry, I meant "simple" from the user's perspective.
When a chart doesn't have all necessary components, the error isn't seen until attempting to render the chart. When rendering with Deno, the errors are difficult to understand.
For instance, when trying to create a scatterplot without axis definitions and symbol size, I got this error:
I think it would be good for
charming
to do some or all of these:Chart
. (In a typical builder pattern, there's abuild()
function that turns the builder into a final object, and performs validation on it.)reading 'get'
doesn't say what is missing)