Shopify/polaris-viz

Wrong spacing on both sides of the chart

Closed this issue · 2 comments

The spaces are either side of the chart is excessive at small scales.

Image

The ideal setting would be:

  • The gray block represents the most right label on the chart. It’s not visible and “bleeds” outside the container.
  • Both labels and lines respect the 16px margins on both sides of the container
  • The last label is not visible on the chart but should be visible on the tooltip
  • Both the first and last labels (and all the others) are vertically centered aligned with the grids

Image

The layout works when you toggle off the x-axis labels because the left and right don't push the chart to the middle. Here's an example from marketing

Image

This is how the spacing should look like:

  • The grey block represents the right label on the chart. It’s not visible and “bleeds” outside the container.
  • Both labels and lines respect the 16px margins on both sides of the container.
  • The last label is not visible on the chart but should be visible on the tooltip.
  • Both the first and last labels (and all the others) are centered aligned with the grids.

Screen Shot 2022-10-28 at 8 24 32 AM