fix: support the case of multiple line segments each with one vdim #6492
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.
Previously
Path
would accept data that was structured as a list of dictionaries, each dictionary representing a single line segment. Such lists would plot correctly but if you had anyvdims
defined on the dictionary, a warning would be raised when trying to create aColumnDataSource
because the_element_transform
function would make it so that the list of vdims and the list of coordinates had different lengths. This PR fixes this issue, so a list of dictionaries, each with its own coordinates and vdims, is now allowed. The below screenshot illustrates the desired plot.