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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create switch to render line charts using vega-lite #3106
Create switch to render line charts using vega-lite #3106
Changes from 10 commits
d660f1b
f6cd3a2
e4b160d
6830c4e
d9bdb50
62eef08
1dea9df
c94b1b9
99dd114
73a7f81
62a5209
cff7b4f
b1eaaf7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have error handling for the else condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially this is an empty chart which would be expected when they didn't define the x axis yet. There is a unit test for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a more standard error-rendering embeddable pattern to follow - but not a blocker, I can make a follow-up issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to confirm - this won't shrink the chart bounds to fit such that there is no empty positions at the beginning and end of the chart, right? I see you had a comment referencing a different approach here #3106 (comment)
Also, I think we still need time buckets even if there is empty data from the charts (empty rows). This is so the events can still fit into such empty buckets if that is the closest bucket based on their timestamps. Typically this wouldn't be the case with associated plugin resources, but because we are allowing unrelated resources to be added to the charts, it's possible that we have events even with empty data shown for a particular vis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you weren't able to find a good solution via agg params, I think we will need a helper fn and artificially add rows to fit the full bounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline - this won't shrink the chart bounds. We can keep the domain as temporal.
As a follow up I'll need to create a helper fn to add empty rows for potential event datapoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the previous approach was needed since there were some local issues with using scale and domain. The line charts actually do something very similar and dont create extra buckets. We will need to create a helper fn to add rows as changing agg params can cause a lot of unknown side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just adding rows after-the-fact is what we need, we should not touch the agg params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why an empty string instead of
undefined
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. There was a bug here and changed this to
visParams.grid.valueAxis
as it would be true if its there and false if its not there.