-
Notifications
You must be signed in to change notification settings - Fork 60
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(react-components): hide/show properties from legend #2208
Conversation
packages/react-components/src/components/chart/legend/icons.tsx
Outdated
Show resolved
Hide resolved
3e70386
to
e5ea40b
Compare
packages/react-components/src/components/chart/legend/useChartsLegend.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/src/components/chart/store/contextDataStreams.ts
Show resolved
Hide resolved
packages/react-components/src/components/chart/store/contextDataStreams.ts
Show resolved
Hide resolved
...ges/react-components/src/components/chart/trendCursor/tests/useVisualizedDataStreams.spec.ts
Outdated
Show resolved
Hide resolved
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 the icons should be in their own .svg files, please take a look at the other examples. other comments are just minor nits
a29b5fe
to
67a1484
Compare
f3e3af0
to
59b4b44
Compare
0431ab7
to
62de077
Compare
...react-components/src/components/chart/trendCursor/getTrendCursor/components/markers/index.ts
Outdated
Show resolved
Hide resolved
packages/react-components/src/components/chart/trendCursor/series/useHandleSeries.ts
Outdated
Show resolved
Hide resolved
packages/react-components/src/components/chart/utils/getStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/src/components/chart/legend/useChartsLegend.tsx
Outdated
Show resolved
Hide resolved
8ad42cb
to
8467b65
Compare
@@ -44,5 +45,5 @@ export const useHandleSeries = ({ | |||
}; | |||
|
|||
delayedRender({ updateFunction: update }); | |||
}, [chartRef, series.length, setGraphic]); | |||
}, [chartRef, seriesString, setGraphic]); |
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 tested locally and this change causes TCs to rerender a ton of times if any part of the series changes (color, line style, symbol, y axis)
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.
could we keep series.length and also do number of series with an opacity of 0?
3fce554
to
bd124c6
Compare
Overview
Allow users to toggle the visibility of a property from within the legend.
Verifying Changes
Screen.Recording.2023-12-13.at.2.08.33.PM.mov
Legal
This project is available under the Apache 2.0 License.