-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: ✨ Add danger and safe zone to charts #111
Conversation
AntoineThibi
commented
May 26, 2023
✅ Deploy Preview for flashlight-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Flashlight Automated Report 🔦 |
@@ -61,6 +61,9 @@ export const CPUReport = ({ | |||
height={500} | |||
interval={POLLING_INTERVAL} | |||
series={totalCPUUsage} | |||
annotationIntervalList={[ | |||
{ y: 180, y2: 1000, color: "red", label: "Danger Zone" }, |
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.
can we make those constants? to make sure the big useMemo
containing the options doesn't rerender
Also color wise, can we use:
error: "#E62E2E",
success: "#158000"
We can hardcode tbh if we don't have a fast way to reuse the theme
@@ -107,6 +137,7 @@ export const Chart = ({ | |||
}, | |||
annotations: { | |||
xaxis: videoEnabled ? [getVideoCurrentTimeAnnotation()] : [], | |||
yaxis: getAnnotationInterval(annotationIntervalList), |
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.
eslint is saying you need to add the annotationIntervalList
to the array of deps
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 eslint config and prettier is a little weird isn't it ? It does the prettier only after the push...
@@ -72,6 +100,7 @@ export const Chart = ({ | |||
maxValue, | |||
showLegendForSingleSeries, | |||
colors = getColorPalette(), | |||
annotationIntervalList = [], |
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.
same here, make it null
by default to avoid recomputing the option
below
2983b95
to
2bad774
Compare
Flashlight Automated Report 🔦 |
Flashlight Automated Report 🔦 |