latitude-dev / latitude

Developer-first embedded analytics
https://latitude.so
GNU Lesser General Public License v3.0
872 stars 42 forks source link

Visualizations - Make dimensions more flexible instead of fixed px #378

Closed samulatitude closed 4 months ago

samulatitude commented 5 months ago

Feature Description

Allow setting flexible dimensions instead of fixed dimensions in visualization components.

Goal of Feature

Gain more control over chart dimensions to adapt them to different layouts or screen sizes as needed, instead of a fixed width and height that can cause unwanted scrolling or a broken design.

Current Solution / Workarounds

Set a fixed height={} that works more or less in any screen size.

Alternatives

@andresgutgon suggested that we could control the dimensions of visualizations from the container, so that the visualization would take the 100% available width and height defined by the parent.

geclos commented 5 months ago

But what is the specific proposal?

Allow setting flexible dimensions instead of fixed dimensions in visualization components.

How? What's the API?

andresgutgon commented 5 months ago

I am not sure. One idea we had is to have a aspectRatio prop so the height/width change in synchrony.

Another idea is not use height prop and let parent wrapper defined width/height. I think for that we need to stop passing height or pass it undefined.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.