mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
@@ -73,6 +73,8 @@ declare interface Chart {
|
||||
showPosition: string
|
||||
|
||||
extColor: Axis[]
|
||||
|
||||
fontFamily?: string
|
||||
}
|
||||
declare type CustomAttr = DeepPartial<ChartAttr> | JSONString<DeepPartial<ChartAttr>>
|
||||
declare type CustomStyle = DeepPartial<ChartStyle> | JSONString<DeepPartial<ChartStyle>>
|
||||
|
||||
@@ -358,7 +358,6 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
|
||||
fill: style.stroke
|
||||
}
|
||||
}
|
||||
console.log(optionTmp)
|
||||
return optionTmp
|
||||
}
|
||||
protected setupOptions(chart: Chart, options: LineOptions): LineOptions {
|
||||
|
||||
@@ -146,6 +146,11 @@ export function getTheme(chart: Chart) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chart.fontFamily) {
|
||||
theme.styleSheet = {
|
||||
fontFamily: chart.fontFamily
|
||||
}
|
||||
}
|
||||
return theme
|
||||
}
|
||||
// 通用label
|
||||
|
||||
@@ -225,7 +225,8 @@ const renderChart = async (view, callback?) => {
|
||||
// 与默认图表对象合并,方便增加配置项
|
||||
const chart = deepCopy({
|
||||
...defaultsDeep(view, cloneDeep(BASE_VIEW_CONFIG)),
|
||||
data: chartData.value
|
||||
data: chartData.value,
|
||||
fontFamily: props.fontFamily
|
||||
})
|
||||
const chartView = chartViewManager.getChartView(view.render, view.type)
|
||||
recursionTransObj(customAttrTrans, chart.customAttr, scale.value, terminal.value)
|
||||
|
||||
@@ -1151,6 +1151,7 @@ const titleTooltipWidth = computed(() => {
|
||||
:show-position="showPosition"
|
||||
:element="element"
|
||||
:suffixId="suffixId"
|
||||
:font-family="fontFamily"
|
||||
v-else-if="
|
||||
showChartView(ChartLibraryType.G2_PLOT, ChartLibraryType.L7_PLOT, ChartLibraryType.L7)
|
||||
"
|
||||
@@ -1167,6 +1168,7 @@ const titleTooltipWidth = computed(() => {
|
||||
:show-position="showPosition"
|
||||
:element="element"
|
||||
:drill-length="drillClickLength"
|
||||
:font-family="fontFamily"
|
||||
v-else-if="showChartView(ChartLibraryType.S2)"
|
||||
ref="chartComponent"
|
||||
@onPointClick="onPointClick"
|
||||
|
||||
Reference in New Issue
Block a user