简体   繁体   English

在Spring MVC中生成标签云

[英]Generating Tag cloud in Spring MVC

I am trying to generate a tag cloud using spring mvc.. i am trying to increase the font size of the tag based on the count.. can anyone give the step by step algorithm in order to automatically increase the font size based on counts..? 我正在尝试使用spring mvc生成标签云。我正在尝试基于计数增加标签的字体大小。任何人都可以逐步给出算法,以便根据计数自动增加字体大小。 。? or is there any efficient way to do this ?.. 还是有任何有效的方法做到这一点?

First count the font size for each element. 首先计算每个元素的字体大小。 Then just pass a map to your template (or other collection). 然后只需将地图传递到您的模板(或其他集合)即可。 Collection should have the item and font size. 集合应具有项目和字体大小。 In your template just render item and pass the font size from it to the style argument in html 在您的模板中,只需渲染项目并将其字体大小传递给html中的style参数

Thats basicly everything you need 基本上就是您需要的一切

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM