gpt4 book ai didi

label - 标签中的 Jvectormap 简单 html

转载 作者:行者123 更新时间:2023-12-04 02:47:34 25 4
gpt4 key购买 nike

我是 Jvectormap 的新手,它真的很棒!!!
我只想做一些简单的事情,但我不知道怎么做(没有 JavaScript 知识)
我怎样才能在标签中有两行(带有中断的 html)?

示例(标记):
名称:'里约热内卢',人口:'63.23 亿',

在标签中有:
里约热内卢
63.23 亿

我希望你能帮助我。

非常感谢。

最佳答案

看这里:http://jvectormap.com/tutorials/data-visualization/ .

你可以看到标签是如何构建的:

onMarkerLabelShow: function(event, label, index){
label.html(
'<b>'+data.metro.names[index]+'</b><br/>'+'<b>Population:</b>'+data.metro.population[val][index]+'</br>'+'<b>Unemployment rate: </b>'+data.metro.unemployment[val][index]+'%'
);
}

在此处查看结果:http://jvectormap.com/examples/usa-unemployment/

关于label - 标签中的 Jvectormap 简单 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18584686/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com