Polaris Viz
Polaris Viz is a data visualization React component library. It was built to help Shopify merchants better understand their data.
Installation
Run the following command using npm:
npm install @shopify/polaris-viz --save
If you prefer Yarn, use the following command instead:
yarn add @shopify/polaris-viz
Usage
If your app is set up to consume esnext
builds, import components where you want to use them and the styles will automatically be applied.
If your app is not set up for esnext
, import the styles where you import components from the library:
import '@shopify/polaris-viz/styles.css';
Components
Components inherit their sizes from their containers, so place your component inside an element with a width and height specified.
- Normalized stacked bar chart
- Sparkline
Normalized stacked bar chart
Used for positive datasets with two to four items.
View documentation →
Sparkline
Used in small sizes to give an overview of how a metric has performed over time.
View documentation →
Line chart
Used to show change over time, comparisons, and trends.
View documentation →
Bar chart
Used to show comparison across categories.
View documentation →
Grouped bar chart
Used to show comparison of different types, across categories.
View documentation →
Stacked area chart
Used to compare multiple series of data and display the total value.
View documentation →
Contributing
Pull requests are welcome.
Licenses
- Source code is under a custom license based on MIT. The license restricts Polaris Viz usage to applications that integrate or interoperate with Shopify software or services, with additional restrictions for external, stand-alone applications.