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

Method getLegendIcon

src/chart/map/MapSeries.ts:258–280  ·  view source on GitHub ↗
(opt: LegendIconParams)

Source from the content-addressed store, hash-verified

256 };
257
258 getLegendIcon(opt: LegendIconParams): ECSymbol | Group {
259 const iconType = opt.icon || 'roundRect';
260 const icon = createSymbol(
261 iconType,
262 0,
263 0,
264 opt.itemWidth,
265 opt.itemHeight,
266 opt.itemStyle.fill
267 );
268
269 icon.setStyle(opt.itemStyle);
270 // Map do not use itemStyle.borderWidth as border width
271 icon.style.stroke = 'none';
272 // No rotation because no series visual symbol for map
273
274 if (iconType.indexOf('empty') > -1) {
275 icon.style.stroke = icon.style.fill;
276 icon.style.fill = tokens.color.neutral00;
277 icon.style.lineWidth = 2;
278 }
279 return icon;
280 }
281
282 __ownRoamView() {
283 return mapSeriesNeedsDrawMap(this) ? this.coordinateSystem.view : null;

Callers

nothing calls this directly

Calls 2

createSymbolFunction · 0.90
setStyleMethod · 0.80

Tested by

no test coverage detected