Shopify/polaris-viz

Polariz-Viz testing error within the package (in the createGradient utility)

Opened this issue · 2 comments

Bug summary

I have a partner who is creating an app and would like to know if we have any built-in visualization components in Polaris (graphs or bar charts, NOT data tables)? They have tried using Polariz viz, but got errors when testing it. Then they created a new 'Graph' component in React, which imported: 'import {PolarisVizProvider} from '@shopify/polaris-viz';'. They wrapped that specific component in the '' . The support team suggested that they can wrap the anywhere in the tree as long as it wraps the chart itself. It’s easiest to wrap the entire app in the provider so you only have to do it once, but i can go anywhere. Partner followed up saying they did as instructed and get this error: https://screenshot.click/03-44-73189-77784.png. They tried to install the d3-scale separately using npm. Whatever they try, the Polaris Viz still doesn't seem to be supported by the development environment

Expected behavior

Trying to determine if Polaris, a Shopify design system, includes any pre-built visualization components such as graphs or bar charts (excluding data tables).

Actual behavior

They tried to install the d3-scale separately using npm. Whatever they try, the Polaris Viz still doesn't seem to be supported by the development environment
https://screenshot.click/03-44-73189-77784.png

Steps to reproduce the problem

  1. Wrap the anywhere in the tree as long as it wraps the chart itself
  2. Internal team states that "It looks to be an import error within the package (in the createGradient utility) and not with the parter's app".

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

Specifications

  • Polaris-Viz version number:
  • Browser:
  • Device:
  • Operating System:

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris-viz to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

@LeonaTheDev Did you ever find a solution to this? I've just had the exact same issue trying to use Polaris Viz within a remix app.

@LeonaTheDev jfyi, in case you haven't found a solution yet, I found the solution here: #1425