()
| 130 | } |
| 131 | |
| 132 | getTarget(): { |
| 133 | baseMapProvider: ComponentModel | NullUndefined |
| 134 | // May extend. |
| 135 | } { |
| 136 | if (this._target) { |
| 137 | return this._target; |
| 138 | } |
| 139 | |
| 140 | // Find by `seriesId`/`seriesIndex`. |
| 141 | let series = this.getReferringComponents('series', { |
| 142 | useDefault: false, enableAll: false, enableNone: false |
| 143 | }).models[0]; |
| 144 | if (series) { |
| 145 | if (series.subType !== 'graph') { |
| 146 | series = null; |
| 147 | if (__DEV__) { |
| 148 | error(`series.${series.subType} is not supported in thumbnail.`, true); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | else { |
| 153 | // If no xxxId and xxxIndex specified, find the first series.graph. If other components, |
| 154 | // such as geo, is supported in future, the default stretagy may be extended. |
| 155 | series = this.ecModel.queryComponents({mainType: 'series', subType: 'graph'})[0]; |
| 156 | } |
| 157 | |
| 158 | this._target = { |
| 159 | baseMapProvider: series |
| 160 | }; |
| 161 | |
| 162 | return this._target; |
| 163 | } |
| 164 | |
| 165 | } |
no test coverage detected