Re: [csswg-drafts] [css-flexbox] flex-wrap-layout property for wrapped flex lines (#8252)

> > Currently it's not possible to render a simple dynamic bar chart with X and Y axis without using tables or grids.
> 
> This use case actually doesn't sound like it should be solved using Flexbox either but rather a case for SVG. And there are already plenty libraries out there that allow you to create charts.
> 
> Though _if_ you want to solve this using Flexbox and if I understand your use case correctly, then I assume [the `flex` value of `wrap-before` and `wrap-after`](https://www.w3.org/TR/css-text-4/#wrap-before) might come in handy. (Though those properties are not implemented anywhere yet, unfortunately.)
> 
> But even without those it is fairly easy to create a chart in Flexbox. See https://jsfiddle.net/SebastianZ/n52jk6cd/.
> 
> If the current possibilities are not suitable for your use case, please provide an example of what you want to achieve and clarify the issue you are having to get what you want.
> 
> Sebastian

Hi Sebastian,

I meant a simple bar graph like this:

![image](https://user-images.githubusercontent.com/3254259/209568805-a280a1d3-0511-43e8-8853-efb392ddd040.png)

Both the size of the x and y axis can be dynamic with a max width/height.

The bar area fills the remaining area.

`wrap-before` `wrap-after` would not solve the wrap issue but it definitely makes the implementation cleaner.

Thanks,
Attila

-- 
GitHub Notification of comment by artit91
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8252#issuecomment-1365282064 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 26 December 2022 16:48:49 UTC