@shopify/polaris-viz
Shopify’s viz component library
Last updated 3 months ago by shopify-dep .
SEE LICENSE IN LICENSE.md · Original npm · Tarball · package.json
$ cnpm install @shopify/polaris-viz 
SYNC missed versions from official npm registry.

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 libary:

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.

Viz Use cases Props
Normalized stacked bar chart

Used for positive datasets with two to four items. If your dataset has more than four items, consider grouping the fourth item and the remainder into an “other” category before passing data to the component.
  • data (required): {formattedValue: string, value: number, label: string}[]
  • accessibilityLabel: string
  • size: small | medium | large
  • orientation: vertical | horizontal
  • colors: colors[] | ColorScheme
Sparkline

Used in small sizes to give an overview of how a metric has performed over time.
  • data (required): {x: number, y: number}[]
  • accessibilityLabel: string
  • color: Color
  • useAnimation: boolean
  • showArea: boolean

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.

Current Tags

  • 0.0.6                                ...           latest (3 months ago)

6 Versions

  • 0.0.6                                ...           3 months ago
  • 0.0.5                                ...           3 months ago
  • 0.0.4                                ...           4 months ago
  • 0.0.3                                ...           4 months ago
  • 0.0.2                                ...           4 months ago
  • 0.0.1                                ...           4 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |