-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
[bug fixes] annotations <> x domains, zeros in text #4194
[bug fixes] annotations <> x domains, zeros in text #4194
Conversation
@fabianmenges is the best person to review this |
I'll first comment on this:
I don't really think this is a bug but a use case that wasn't covered. The concepts of That said, I thought about similar use cases before and there are some foundations you can use to do what you want to do. This line will override the Now, in order to implement what you described you will need to add something like this to the
And make changes to the |
}).filter((r) => { | ||
const isValid = !Number.isNaN(r[e.timeColumn].getMilliseconds()); | ||
if (isValid) { | ||
xMin = xMin < r[e.timeColumn] ? xMin : r[e.timeColumn]; |
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 its a bit weird that the filtering here has side effects. Might be cleaner to find the min and max values in that series after filtering.
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.
👍
!Number.isNaN(r[e.intervalEndColumn].getMilliseconds()) | ||
); | ||
if (isValid) { | ||
xMin = xMin < r[e.timeColumn] ? xMin : r[e.timeColumn]; |
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.
The code currently does not really check that timeColumn
< intervalEndColumn
and will flip them around when necessary. Not sure if we need to handle that though.
@williaster let's try to get this through, please resolve conflict and merge when you have a moment |
@mistercrunch will try to get this done today |
…dth explore charts, allow 0 in text control
I think annotations are broken in production, so will debug that as part of this. |
fa169b0
to
9ac4918
Compare
fixed annotations separately in #4607, updated this PR / should be good to go so PTAL 👀 |
Codecov Report
@@ Coverage Diff @@
## master #4194 +/- ##
==========================================
- Coverage 71.18% 71.18% -0.01%
==========================================
Files 189 189
Lines 14847 14848 +1
Branches 1086 1085 -1
==========================================
Hits 10569 10569
- Misses 4275 4276 +1
Partials 3 3
Continue to review full report at Codecov.
|
@mistercrunch @fabianmenges going to merge this if no objections |
LGTM |
* [bugs] account for annotations in nvd3 x scale domain, fix dynamic width explore charts, allow 0 in text control * tweak TextControl casting * [annotations] filter separately from finding data extent (cherry picked from commit e2bd40c)
* [bugs] account for annotations in nvd3 x scale domain, fix dynamic width explore charts, allow 0 in text control * tweak TextControl casting * [annotations] filter separately from finding data extent
* [bugs] account for annotations in nvd3 x scale domain, fix dynamic width explore charts, allow 0 in text control * tweak TextControl casting * [annotations] filter separately from finding data extent
This PR fixes a couple bugs related to annotation usage
0
in aTextControl
component because the control only updates to values that evaluatetruthy
. I updated the logic to actually check for a value.in examples below I added (
interval
orevent
) annotations with atable slice
data source.before (annotations clipped)
after (annotations included)
@mistercrunch @fabianmenges @graceguo-supercat @michellethomas
some other bugs I noted but didn't fix: