(lineData: SeriesData, idx: number, seriesScope?: LineDrawSeriesScope)
| 223 | } |
| 224 | |
| 225 | _updateCommonStl(lineData: SeriesData, idx: number, seriesScope?: LineDrawSeriesScope) { |
| 226 | const seriesModel = lineData.hostModel as SeriesModel; |
| 227 | |
| 228 | const line = this.childOfName('line') as ECLinePath; |
| 229 | |
| 230 | let emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle; |
| 231 | let blurLineStyle = seriesScope && seriesScope.blurLineStyle; |
| 232 | let selectLineStyle = seriesScope && seriesScope.selectLineStyle; |
| 233 | |
| 234 | let labelStatesModels = seriesScope && seriesScope.labelStatesModels; |
| 235 | |
| 236 | let emphasisDisabled = seriesScope && seriesScope.emphasisDisabled; |
| 237 | let focus = (seriesScope && seriesScope.focus) as DefaultEmphasisFocus; |
| 238 | let blurScope = (seriesScope && seriesScope.blurScope) as BlurScope; |
| 239 | |
| 240 | // Optimization for large dataset |
| 241 | if (!seriesScope || lineData.hasItemOption) { |
| 242 | const itemModel = lineData.getItemModel<LineDrawModelOption>(idx); |
| 243 | const emphasisModel = itemModel.getModel('emphasis'); |
| 244 | |
| 245 | emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle(); |
| 246 | blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle(); |
| 247 | selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle(); |
| 248 | emphasisDisabled = emphasisModel.get('disabled'); |
| 249 | focus = emphasisModel.get('focus'); |
| 250 | blurScope = emphasisModel.get('blurScope'); |
| 251 | |
| 252 | labelStatesModels = getLabelStatesModels(itemModel); |
| 253 | } |
| 254 | |
| 255 | const lineStyle = lineData.getItemVisual(idx, 'style'); |
| 256 | const visualColor = lineStyle.stroke; |
| 257 | |
| 258 | line.useStyle(lineStyle); |
| 259 | line.style.fill = null; |
| 260 | line.style.strokeNoScale = true; |
| 261 | |
| 262 | line.ensureState('emphasis').style = emphasisLineStyle; |
| 263 | line.ensureState('blur').style = blurLineStyle; |
| 264 | line.ensureState('select').style = selectLineStyle; |
| 265 | |
| 266 | // Update symbol |
| 267 | each(SYMBOL_CATEGORIES, function (symbolCategory) { |
| 268 | const symbol = this.childOfName(symbolCategory) as ECSymbol; |
| 269 | if (symbol) { |
| 270 | // Share opacity and color with line. |
| 271 | symbol.setColor(visualColor); |
| 272 | symbol.style.opacity = lineStyle.opacity; |
| 273 | |
| 274 | for (let i = 0; i < SPECIAL_STATES.length; i++) { |
| 275 | const stateName = SPECIAL_STATES[i]; |
| 276 | const lineState = line.getState(stateName); |
| 277 | if (lineState) { |
| 278 | const lineStateStyle = lineState.style || {}; |
| 279 | const state = symbol.ensureState(stateName); |
| 280 | const stateStyle = state.style || (state.style = {}); |
| 281 | if (lineStateStyle.stroke != null) { |
| 282 | stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke; |
no test coverage detected