fix(图表): 修复地图图例配置图形大小无效的问题

This commit is contained in:
jianneng-fit2cloud
2024-12-04 09:36:43 +08:00
parent 04cc4afac8
commit b2a2c32945

View File

@@ -389,9 +389,22 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
},
'l7plot-legend__category-marker': {
...LEGEND_SHAPE_STYLE_MAP[legend.icon],
width: '9px',
height: '9px',
...(legend.icon === 'triangle' ? {} : { border: '0.01px solid #f4f4f4' })
width: legend.size + 'px',
height: legend.size + 'px',
...(legend.icon === 'triangle'
? {
...LEGEND_SHAPE_STYLE_MAP[legend.icon]['triangle'],
borderLeft: `${legend.size / 2}px solid transparent`,
borderRight: `${legend.size / 2}px solid transparent`,
borderBottom: `${legend.size}px solid var(--bgColor)`
}
: { border: '0.01px solid #f4f4f4' }),
...(legend.icon === 'diamond'
? {
transform: 'rotate(45deg)',
marginBottom: `${legend.size / 4}px`
}
: {})
}
}
}