Store parsed data more similarly to provided data #6766
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This has some of the changes from #6750, which we decided not to move forward with. I'm reopening for discussion purposes even if we decide to go in a different direction
I'd like to be able to skip all parsing if the user provides data in the correct format. Right now that format is essentially an array of objects. Other potential formats such as an array of arrays can be discussed in #6696. Right now, it seems most likely that we'll be accepting data as an array with an entry for each row.
This implements about half the change required to simply utilize user data as passed in. The other half would be to change the keys that the user data is being stored under. Right now we have keys like "x-axis-0" and would need to change that to "x" or change from an object to an array
This is probably about a wash in terms of performance. E.g.
_getParsed
is probably slightly faster andcalculateTotal
is probably slightly slower. Overall I think these effects are fairly negligible though