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

Method renderBackground

src/component/visualMap/VisualMapView.ts:72–92  ·  view source on GitHub ↗

* @protected

(group: Group)

Source from the content-addressed store, hash-verified

70 * @protected
71 */
72 renderBackground(group: Group) {
73 const visualMapModel = this.visualMapModel;
74 const padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);
75 const rect = group.getBoundingRect();
76
77 group.add(new Rect({
78 z2: -1, // Lay background rect on the lowest layer.
79 silent: true,
80 shape: {
81 x: rect.x - padding[3],
82 y: rect.y - padding[0],
83 width: rect.width + padding[3] + padding[1],
84 height: rect.height + padding[0] + padding[2]
85 },
86 style: {
87 fill: visualMapModel.get('backgroundColor'),
88 stroke: visualMapModel.get('borderColor'),
89 lineWidth: visualMapModel.get('borderWidth')
90 }
91 }));
92 }
93
94 /**
95 * @protected

Callers 2

_buildViewMethod · 0.80
doRenderMethod · 0.80

Calls 3

getMethod · 0.45
getBoundingRectMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected