@@ -11,6 +11,7 @@ import type {
1111 ToolboxComponentOption ,
1212 VisualMapComponentOption ,
1313} from "echarts"
14+ import type { AxisBaseOption } from 'echarts/types/src/coord/axisCommonTypes.js'
1415import { isRtl } from "./document"
1516
1617export const processAria = ( option : ComposeOption < AriaComponentOption > , chartDecal : boolean ) => {
@@ -73,7 +74,7 @@ type GlobalEcOption = ComposeOption<
7374
7475export const processFont = ( toProcess : unknown , elFont : string ) => {
7576 const options = toProcess as GlobalEcOption
76- const { series, title, legend } = options
77+ const { series, title, legend, xAxis , yAxis } = options
7778 processArrayLike ( title , t => {
7879 t . textStyle = {
7980 ...t . textStyle ,
@@ -96,6 +97,15 @@ export const processFont = (toProcess: unknown, elFont: string) => {
9697 fontFamily : l . textStyle ?. fontFamily ?? elFont ,
9798 }
9899 } )
100+ processArrayLike ( xAxis , a => processAxisFont ( a , elFont ) )
101+ processArrayLike ( yAxis , a => processAxisFont ( a , elFont ) )
102+ }
103+
104+ const processAxisFont = ( a : AxisBaseOption , elFont : string ) => {
105+ a . axisLabel = {
106+ ...a . axisLabel ,
107+ fontFamily : a . axisLabel ?. fontFamily ?? elFont ,
108+ }
99109}
100110
101111export const processRtl = ( toProcess : unknown ) => {
0 commit comments