Shopify/polaris-viz

`BarChart`'s grid horizontal lines break out of the chart

Closed this issue · 0 comments

Bug summary

Grid's horizontal lines on BarChart are breaking outside of the chart when using the horizontalOverflow: false option on a custom theme.

Expected behavior

The chart should use the drawableWidth here if horizontalOverflow is set to false like LineChart does (link)

Actual behavior

horizontalOverflow: false
image

horizontalOverflow: true
image

Steps to reproduce the problem

  1. Create a custom theme as following
const customTheme = createTheme(
    grid: {
      horizontalOverflow: false,
    },
  {
    ...PolarisVizLightTheme,
  }
);

Specifications

  • Polaris-Viz version number: 7.8.0