Shopify / polaris-viz

A collection of React and React native components that compose Shopify's data visualization system
https://polaris-viz.shopify.dev
Other
330 stars 25 forks source link

Show partial x-axis labels on BarCharts for large data sets #1419

Open pbojinov opened 2 years ago

pbojinov commented 2 years ago

Feature request summary

In the ShopifyQL Notebooks - friction log video, Glen comes up across a scenarios where the x-axis with dates does not show up because of the amount of data.

It would be nice if we can detect that the number of items on the x-axis are too large to display and show a subset of labels such as

| ----------|---------|---------|---------|
Sep 1.   Sep 7.   Sep 14.   Sep 21.   Sep 30

BarChart

image

LineChart

image

Rationale

Users currently don't have a way to determine what the x-axis data points correspond to without hovering over the data.


🌟 Feature requests that are not yet planned will be closed. We then use the issue’s :+1: upvotes to track and set priorities. See the contribution guidelines for more information.

ShopKlaw commented 2 years ago

This is the propose fix for the line breaks. Lets add that prop: https://github.com/Shopify/polaris-viz/issues/1259