@@ -14,7 +14,7 @@ import Big from "big.js";
14
14
import { googleMapsApiUrl } from "../basicChartComp/chartConfigs/chartUrls" ;
15
15
import opacityToHex from "../../util/opacityToHex" ;
16
16
import parseBackground from "../../util/gradientBackgroundColor" ;
17
- import { ba } from "@fullcalendar/core/internal-common" ;
17
+ import { ba , s } from "@fullcalendar/core/internal-common" ;
18
18
import { chartStyleWrapper , styleWrapper } from "../../util/styleWrapper" ;
19
19
20
20
export function transformData (
@@ -108,7 +108,9 @@ export function getSeriesConfig(props: EchartsConfigProps) {
108
108
encodeY = props . xAxisKey ;
109
109
}
110
110
const markLineData = s . getView ( ) . markLines . map ( line => ( { type : line . getView ( ) . type } ) ) ;
111
- const markAreaData = s . getView ( ) . markAreas . map ( area => ( [ { name : area . getView ( ) . name , xAxis : area . getView ( ) . from } , { xAxis : area . getView ( ) . to } ] ) ) ;
111
+ const markAreaData = s . getView ( ) . markAreas . map ( area => ( [ { name : area . getView ( ) . name , [ horizontalX ?"xAxis" :"yAxis" ] : area . getView ( ) . from , label : {
112
+ position : horizontalX ?"top" :"right" ,
113
+ } } , { [ horizontalX ?"xAxis" :"yAxis" ] : area . getView ( ) . to } ] ) ) ;
112
114
return {
113
115
name : props . chartConfig . subtype === "waterfall" && index === 0 ?" " :s . getView ( ) . seriesName ,
114
116
selectedMode : "single" ,
@@ -326,7 +328,8 @@ export function getEchartsConfig(
326
328
...finalXyConfig . yConfig ,
327
329
axisLabel : {
328
330
...styleWrapper ( props ?. yAxisStyle , theme ?. yAxisStyle , 11 )
329
- }
331
+ } ,
332
+ data : finalXyConfig . yConfig . type === "category" && ( props . xAxisData as [ ] ) . length !== 0 ?props ?. xAxisData :transformedData . map ( ( i : any ) => i [ props . xAxisKey ] ) ,
330
333
} ,
331
334
} ;
332
335
0 commit comments