(option: any, isTheme?: boolean)
| 257 | } |
| 258 | |
| 259 | export default function globalCompatStyle(option: any, isTheme?: boolean) { |
| 260 | each(toArr(option.series), function (seriesOpt) { |
| 261 | isObject(seriesOpt) && processSeries(seriesOpt); |
| 262 | }); |
| 263 | |
| 264 | const axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar']; |
| 265 | isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis'); |
| 266 | |
| 267 | each( |
| 268 | axes, |
| 269 | function (axisName) { |
| 270 | each(toArr(option[axisName]), function (axisOpt) { |
| 271 | if (axisOpt) { |
| 272 | compatTextStyle(axisOpt, 'axisLabel'); |
| 273 | compatTextStyle(axisOpt.axisPointer, 'label'); |
| 274 | } |
| 275 | }); |
| 276 | } |
| 277 | ); |
| 278 | |
| 279 | each(toArr(option.parallel), function (parallelOpt) { |
| 280 | const parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault; |
| 281 | compatTextStyle(parallelAxisDefault, 'axisLabel'); |
| 282 | compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label'); |
| 283 | }); |
| 284 | |
| 285 | each(toArr(option.calendar), function (calendarOpt) { |
| 286 | convertNormalEmphasis(calendarOpt, 'itemStyle'); |
| 287 | compatTextStyle(calendarOpt, 'dayLabel'); |
| 288 | compatTextStyle(calendarOpt, 'monthLabel'); |
| 289 | compatTextStyle(calendarOpt, 'yearLabel'); |
| 290 | }); |
| 291 | |
| 292 | // radar.name.textStyle |
| 293 | each(toArr(option.radar), function (radarOpt) { |
| 294 | compatTextStyle(radarOpt, 'name'); |
| 295 | // Use axisName instead of name because component has name property |
| 296 | if (radarOpt.name && radarOpt.axisName == null) { |
| 297 | radarOpt.axisName = radarOpt.name; |
| 298 | delete radarOpt.name; |
| 299 | if (__DEV__) { |
| 300 | deprecateLog('name property in radar component has been changed to axisName'); |
| 301 | } |
| 302 | } |
| 303 | if (radarOpt.nameGap != null && radarOpt.axisNameGap == null) { |
| 304 | radarOpt.axisNameGap = radarOpt.nameGap; |
| 305 | delete radarOpt.nameGap; |
| 306 | if (__DEV__) { |
| 307 | deprecateLog('nameGap property in radar component has been changed to axisNameGap'); |
| 308 | } |
| 309 | } |
| 310 | if (__DEV__) { |
| 311 | each(radarOpt.indicator, function (indicatorOpt: any) { |
| 312 | if (indicatorOpt.text) { |
| 313 | deprecateReplaceLog('text', 'name', 'radar.indicator'); |
| 314 | } |
| 315 | }); |
| 316 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…