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
dashboard: Allow multi-line charts in UtilizationItem #4008
dashboard: Allow multi-line charts in UtilizationItem #4008
Conversation
fc3ba3e
to
8231126
Compare
Looks a little odd 😄 @dlabrecq would you happen to know why this is happening? The Victory example and PatternFly examples don't seem to have this issue. Is the triangle being missing related maybe? |
it is actually the same as Victory example where you have two lines and one tooltip for both - see https://formidable.com/open-source/victory/docs/victory-voronoi-container/#mousefollowtooltips |
Ah I see. Would we be able to use either the behavior of |
8231126
to
9cc48d7
Compare
I used |
that is not set. The tooltip is actually able to go outside the chart. |
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 used
centerOffset
to not have cursor in middle of tooltip. WDYT ?
Much better, thank you! LGTM
@@ -21,6 +21,7 @@ import { getName, getNamespace } from '../../..'; | |||
import { DashboardCardPopupLink } from '../dashboard-card/DashboardCardLink'; | |||
|
|||
import './top-consumer-popover.scss'; | |||
import { getPrometheusQueryResponse } from '@console/internal/actions/dashboards'; |
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.
nit: please move this line up
import { | ||
useMetricDuration, | ||
Duration, | ||
} from '@console/shared/src/components/dashboard/duration-hook'; | ||
import { VMDashboardContext } from '../../vms/vm-dashboard-context'; | ||
import { findVMPod } from '../../../selectors/pod/selectors'; | ||
import { getUtilizationQueries, VMQueries } from './queries'; | ||
import { getUtilizationQueries, getMultilineUtilizationQueries, VMQueries } from './queries'; | ||
import { ByteDataTypes } from '@console/shared/src/graph-helper/data-utils'; |
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.
nit: likewise
@@ -1,4 +1,5 @@ | |||
import * as React from 'react'; | |||
import * as _ from 'lodash-es'; |
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 lodash
for new code
Nitpicks only, otherwise lgtm |
9cc48d7
to
a8432e4
Compare
@mareklibra fixed |
a8432e4
to
bbdbc64
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andybraren, mareklibra, rawagner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test e2e-gcp-console |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
replaces #3089
@mareklibra @andybraren please take a look
note that the cursor is always in the middle of tooltip - the behavior is from VictoryVoronoiContainer which I was not able to alter