在固定画布上排列可变大小的元素
输入: 我已经创建并填充了速度数组/表。该数组当前包含 3 个内容:(
请注意,此示例纯属虚构)
- 顶级社区名称(例如 Stack Overflow USA、Stack Overflow BEL)
- 子社区(例如 stackOverflow.com/r/USA/CSS 和 stackOverflow.com/r/BEL ) /JSON)
- 子社区的所有者(例如 Frank)
根据情况和时间点,具有可变数量子社区的顶级社区的数量分别由可变数量的所有者拥有。并且,每个顶级社区还可以有一个或多个所有者。
(输入)表示例:
SO USA, , Phil
SO USA, CSS, Frank
SO USA, JSON, Marc
SO BEL, CSS, Marieke
SO BEL, CSS, Francis
SO BEL, JSON, Patrick
SO FRA, , Francois
输出:
我现在想在这样的网页上以图形方式定位这些社区和子社区
取决于根据子社区的数量,顶级社区将具有不同的大小,因此应在页面上最适合的位置进行解析(例如在 600pxx800px 画布上)。
这是我的问题:
- 有人知道已经编写来解决此类问题的代码吗?
- 如果没有,我该如何最好地解决这个问题?
Input:
I have created and filled an array/table in velocity. This array currently contains 3 things:
(note that this example is pure fiction)
- Top level community name (e.g. Stack Overflow USA, Stack Overflow BEL)
- Subcommunity (e.g. stackOverflow.com/r/USA/CSS and stackOverflow.com/r/BEL/JSON)
- Owner(s) of the subcommunity (e.g. Frank)
Depending on the situation and the point in time, the amount of top level communities, that have a variable number of subcommunities are each owned by a variable number of owners. And, each top level community can also have one or more owners.
(input) table example:
SO USA, , Phil
SO USA, CSS, Frank
SO USA, JSON, Marc
SO BEL, CSS, Marieke
SO BEL, CSS, Francis
SO BEL, JSON, Patrick
SO FRA, , Francois
output:
I now want to position these communities and sub communities graphically on a webpage like this
Depending on the amount of subcommunities, the top level community will have a different size, and should therefore be parsed where it fits best on the page (e.g on a 600pxx800px canvas).
Here are my questions:
- does somebody know code that has already been written to solve this kind of problem?
- if not, how would I best tackle this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论