addData
Parameter:
data or data group -- In JSON format
1. Load a single data set
Loads data to the controller of Gio and overrides previous data synchronously. The dataset used for
visualization is in JSON format. Each element of the array has an import country (i), an export country
(e) and a value (v).
[
{
"e":
"CN",
"i":
"US",
"v":
3300000
},
{
"e":
"CN",
"i":
"RU",
"v":
10000
}
]
Explanation: The line connects two countries and it has a direction, the moving particle will animate in
this direction, this direction is defined by "e" -> "i". "e" and "i" represent two countries, "e" is the
country where the line is out, "i" is the country where the line is in. The "v" is the value between
these two country, there are particles moving on the line, if the value is small, the size and quantity
of the particles will be small, and moving slowly, if the value is large, the size and quantity be
large, and moving fast. In Gio.js 2.0, v can be defined as continent, checkout Continent
documentation
for more information.
2. Load a data group (multiple data sets)
Loads a data group (multiple data sets) to the controller of Gio synchronously. All data sets defined in
data group can be loaded in to Gio.js Controller in one time, and use switchDataSet()
API to control which
data set to be displayed onto the 3D globe. The format of data group is as defined below:
{
dataSetKeys: [key1, key2, ......],
initDataSet: key1,
key1: dataSet,
key2: dataSet,
...
}
Explanation: Each data set has a specific "key", the attribute "dataSetKeys" stores all keys, the attribute
"initDataSet" stores the key of the data set which will be initially displayed onto the globe. The data
structure of "dataSet" is the same as Load a single data set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论