Creating a React Library for Consistent Data Visualization - Shopify
Mar 15, 20226 min read
Opens shopify.engineeringWhat the post covers
This post details the creation of the Polaris Viz React library to address inconsistencies in data visualization across Shopify's internal teams.
- It introduces a theming system with default light and dark themes, a `PolarisVizProvider` for centralized theme management, and `createTheme`/`createThemes` functions to ensure complete and consistent theme definitions.
- The library also allows for overwriting default themes and defining multiple custom themes.
- Additionally, it enhances data series coloring by allowing optional colors to be passed directly to data series, enabling dynamic color adjustments based on data.




