Line
Line is used to visualize the data flow between two countries. For Selected
country, the line with data flow into it is called in line and the line with data flow out of it is
called out line. The default color of in line is in-line 0x154492 and the default color of out line is
out-line 0xdd380c.
The color of lines can be set through configure API as follow:
controller.configure({
color: {
in:0xff0000,
out:0x00ff00
}
});
Or it can be modified dynamically with setInLineColor() and setOutLineColor().
Can we use different colors for different lines? The answer is yes. This can be done by modifying the
json input data as follow:
{
"e": "CN",
"i": "US",
"v": 100000,
"inColor": "#0000ff",
"outColor": "#00ff00"
}
However this needs to be done before controller.init() is called. See working
with data for details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论