mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 22:41:06 +08:00
@@ -268,7 +268,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
||||
textOffset: [0, 0], // 文本相对锚点的偏移量 [水平, 垂直]
|
||||
spacing: 2, // 字符间距
|
||||
padding: [1, 1], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
|
||||
textAllowOverlap: true
|
||||
textAllowOverlap: true,
|
||||
fontFamily: chart.fontFamily ? chart.fontFamily : undefined
|
||||
})
|
||||
configList.push(startTextLayer)
|
||||
}
|
||||
@@ -295,7 +296,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
||||
textOffset: [0, 0], // 文本相对锚点的偏移量 [水平, 垂直]
|
||||
spacing: 2, // 字符间距
|
||||
padding: [1, 1], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
|
||||
textAllowOverlap: true
|
||||
textAllowOverlap: true,
|
||||
fontFamily: chart.fontFamily ? chart.fontFamily : undefined
|
||||
})
|
||||
configList.push(endTextLayer)
|
||||
}
|
||||
|
||||
@@ -384,7 +384,8 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
|
||||
domStyles: {
|
||||
'l7plot-legend__category-value': {
|
||||
fontSize: legend.fontSize + 'px',
|
||||
color: legend.color
|
||||
color: legend.color,
|
||||
'font-family': chart.fontFamily ? chart.fontFamily : undefined
|
||||
},
|
||||
'l7plot-legend__category-marker': {
|
||||
...LEGEND_SHAPE_STYLE_MAP[legend.icon],
|
||||
|
||||
@@ -394,7 +394,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
}
|
||||
`
|
||||
document.head.appendChild(style)
|
||||
const htmlPrefix = `<div style='font-size:${tooltip.fontSize}px;color:${tooltip.color}'>`
|
||||
const htmlPrefix = `<div style='font-size:${tooltip.fontSize}px;color:${tooltip.color};font-family: ${chart.fontFamily}'>`
|
||||
const htmlSuffix = '</div>'
|
||||
const containerElement = document.getElementById(container)
|
||||
if (containerElement) {
|
||||
@@ -522,7 +522,8 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
.style({
|
||||
textAllowOverlap: label.fullDisplay,
|
||||
textAnchor: 'center',
|
||||
textOffset: [0, 0]
|
||||
textOffset: [0, 0],
|
||||
fontFamily: chart.fontFamily ? chart.fontFamily : undefined
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
@@ -196,7 +196,8 @@ export function getLabel(chart: Chart) {
|
||||
layout,
|
||||
style: {
|
||||
fill: l.color,
|
||||
fontSize: l.fontSize
|
||||
fontSize: l.fontSize,
|
||||
fontFamily: chart.fontFamily
|
||||
},
|
||||
formatter: function (param: Datum) {
|
||||
return valueFormatter(param.value, l.labelFormatter)
|
||||
@@ -903,6 +904,9 @@ export function configL7Label(chart: Chart): false | LabelOptions {
|
||||
style.textAllowOverlap = false
|
||||
style.padding = [2, 2]
|
||||
}
|
||||
if (chart.fontFamily) {
|
||||
style.fontFamily = chart.fontFamily
|
||||
}
|
||||
return {
|
||||
visible: label.show,
|
||||
style
|
||||
@@ -981,7 +985,8 @@ export function configL7Tooltip(chart: Chart): TooltipOptions {
|
||||
'l7plot-tooltip': {
|
||||
'background-color': tooltip.backgroundColor,
|
||||
'font-size': `${tooltip.fontSize}px`,
|
||||
'line-height': 1.6
|
||||
'line-height': 1.6,
|
||||
'font-family': chart.fontFamily ? chart.fontFamily : undefined
|
||||
},
|
||||
'l7plot-tooltip__name': {
|
||||
color: tooltip.color
|
||||
|
||||
Reference in New Issue
Block a user