* @return {string|Array. } groupId
(groupId)
| 29219 | * @return {string|Array.<module:echarts~ECharts>} groupId |
| 29220 | */ |
| 29221 | function connect(groupId) { |
| 29222 | // Is array of charts |
| 29223 | if (isArray(groupId)) { |
| 29224 | var charts = groupId; |
| 29225 | groupId = null; |
| 29226 | // If any chart has group |
| 29227 | each(charts, function (chart) { |
| 29228 | if (chart.group != null) { |
| 29229 | groupId = chart.group; |
| 29230 | } |
| 29231 | }); |
| 29232 | groupId = groupId || ('g_' + groupIdBase++); |
| 29233 | each(charts, function (chart) { |
| 29234 | chart.group = groupId; |
| 29235 | }); |
| 29236 | } |
| 29237 | connectedGroups[groupId] = true; |
| 29238 | return groupId; |
| 29239 | } |
| 29240 | |
| 29241 | /** |
| 29242 | * @DEPRECATED |