伙计们! 我正在网站上使用Zingchart地图。我在放置区域名称时遇到问题。如何通过任意x和y坐标放置区域名称?
zingchart.loadModules('maps,maps-uzb',function(e){
zingchart.render({
id: 'uzbchart',
data: {
gui : {
contextMenu : {
empty : true
}
},
backgroundColor:'none',
shapes: [{
type: 'zingchart.maps',
options: {
name: 'uzb',
zooming: false,
panning: false,
scrolling: false,
style: {
items:
mapCon, // shape data
tooltip: {
text: '%long-text',
alpha: 0.5,
backgroundColor: 'white',
borderColor: 'white',
borderRadius: 3,
fontColor: 'black',
fontFamily: 'Georgia',
fontSize: 12,
textAlpha: 1,
cursor: "pointer"
},
controls: {
visible: false
}
}
}
}],
},
height: 600,
width: "100%"
});
});
答案 0 :(得分:0)
我自己解决了。我在标签中添加了x和y配置参数:
zingchart.loadModules('maps, maps-uzb', function(e) {
zingchart.render({
id: 'uzbchart',
data: {
shapes: [{
type: 'zingchart.maps',
options: {
//...
style: {
items:
{
TK: {
//....
lablel: {
//..........
// added following two line codes
x: 650,
y: 280
}
//...
}
},
//...
}
}
}],
},
height: 600,
width: "100%"
});
});