MCPcopy
hub / github.com/apache/echarts / updateDataVisualAndLayout

Method updateDataVisualAndLayout

src/component/marker/MarkLineView.ts:395–433  ·  view source on GitHub ↗
(
            data: SeriesData<MarkLineModel>,
            idx: number,
            isFrom: boolean
        )

Source from the content-addressed store, hash-verified

393 });
394
395 function updateDataVisualAndLayout(
396 data: SeriesData<MarkLineModel>,
397 idx: number,
398 isFrom: boolean
399 ) {
400 const itemModel = data.getItemModel<MarkLineMergedItemOption>(idx);
401
402 updateSingleMarkerEndLayout(
403 data, idx, isFrom, seriesModel, api
404 );
405
406 const style = itemModel.getModel('itemStyle').getItemStyle();
407 if (style.fill == null) {
408 style.fill = getVisualFromData(seriesData, 'color') as ColorString;
409 }
410
411 data.setItemVisual(idx, {
412 symbolKeepAspect: itemModel.get('symbolKeepAspect'),
413 // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
414 symbolOffset: retrieve2(
415 itemModel.get('symbolOffset', true),
416 (symbolOffset as (string | number)[])[isFrom ? 0 : 1]
417 ),
418 symbolRotate: retrieve2(
419 itemModel.get('symbolRotate', true),
420 (symbolRotate as number[])[isFrom ? 0 : 1]
421 ),
422 // TODO: when 2d array is supported, it should ignore parent
423 symbolSize: retrieve2(
424 itemModel.get('symbolSize'),
425 (symbolSize as number[])[isFrom ? 0 : 1]
426 ),
427 symbol: retrieve2(
428 itemModel.get('symbol', true),
429 (symbolType as string[])[isFrom ? 0 : 1]
430 ),
431 style
432 });
433 }
434
435 this.markKeep(lineDraw);
436

Callers

nothing calls this directly

Calls 7

getVisualFromDataFunction · 0.90
getItemModelMethod · 0.80
getItemStyleMethod · 0.80
setItemVisualMethod · 0.80
getModelMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected