返回介绍

中文

英文

Line

发布于 2021-10-30 01:00:53 字数 1838 浏览 957 评论 0 收藏 0


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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文