-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: add and use charts colors (#2926)
This PR adds the color palette to be used in charts and updates current usages with references to the theme. A new property was added to the theme object: `chartColors`, to hold an static array of colors. Added default colors to the `theme.colors` object for the `Pie` and `LinearTimeline` components, `TimeseriesChart` does not use default colors, but their stories now use colors from `theme`. Changed components: ### Linear Timeline before <img width="408" alt="image" src="https://github.com/lyft/clutch/assets/5430603/f1ab1b14-228e-49ea-b5c5-e93063ab774f"> after <img width="421" alt="image" src="https://github.com/lyft/clutch/assets/5430603/462082ce-c11e-409b-9455-b8ff15fbe496"> Custom styled before <img width="415" alt="image" src="https://github.com/lyft/clutch/assets/5430603/a9fefc14-b7b5-4bf9-8be9-322c771c6ca8"> after <img width="419" alt="image" src="https://github.com/lyft/clutch/assets/5430603/f395d04f-d927-4765-a3f6-fa41d00b3f17"> ### Pie Chart Chart now uses colors from theme Changed labels to get colors from palette before <img width="325" alt="image" src="https://github.com/lyft/clutch/assets/5430603/2f34af8b-19de-42be-8796-a5c1e2adeea0"> after <img width="328" alt="image" src="https://github.com/lyft/clutch/assets/5430603/b2e8bf9c-f5de-4603-88e5-7406d8761ce7"> ### TimeseriesChart before <img width="917" alt="image" src="https://github.com/lyft/clutch/assets/5430603/38bb3a87-97c3-4fe8-952d-8b9faf56c491"> after <img width="917" alt="image" src="https://github.com/lyft/clutch/assets/5430603/4105467c-b8db-4e8c-bbfd-3c82e55eeb4c"> before <img width="895" alt="image" src="https://github.com/lyft/clutch/assets/5430603/386a4623-6092-4af7-87d3-d070b138187c"> after <img width="895" alt="image" src="https://github.com/lyft/clutch/assets/5430603/83545c4f-416f-4a94-a14f-1c863fd5d8c1"> ### Testing Performed manual, unit tests
- Loading branch information
Showing
7 changed files
with
178 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.