MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / backwardCompat

Function backwardCompat

libs/echarts/echarts.simple.js:22888–22936  ·  view source on GitHub ↗
(option, isTheme)

Source from the content-addressed store, hash-verified

22886];
22887
22888var backwardCompat = function (option, isTheme) {
22889 compatStyle(option, isTheme);
22890
22891 // Make sure series array for model initialization.
22892 option.series = normalizeToArray(option.series);
22893
22894 each$1(option.series, function (seriesOpt) {
22895 if (!isObject$1(seriesOpt)) {
22896 return;
22897 }
22898
22899 var seriesType = seriesOpt.type;
22900
22901 if (seriesType === 'line') {
22902 if (seriesOpt.clipOverflow != null) {
22903 seriesOpt.clip = seriesOpt.clipOverflow;
22904 }
22905 }
22906 else if (seriesType === 'pie' || seriesType === 'gauge') {
22907 if (seriesOpt.clockWise != null) {
22908 seriesOpt.clockwise = seriesOpt.clockWise;
22909 }
22910 }
22911 else if (seriesType === 'gauge') {
22912 var pointerColor = get(seriesOpt, 'pointer.color');
22913 pointerColor != null
22914 && set$1(seriesOpt, 'itemStyle.color', pointerColor);
22915 }
22916
22917 compatLayoutProperties(seriesOpt);
22918 });
22919
22920 // dataRange has changed to visualMap
22921 if (option.dataRange) {
22922 option.visualMap = option.dataRange;
22923 }
22924
22925 each$1(COMPATITABLE_COMPONENTS, function (componentName) {
22926 var options = option[componentName];
22927 if (options) {
22928 if (!isArray(options)) {
22929 options = [options];
22930 }
22931 each$1(options, function (option) {
22932 compatLayoutProperties(option);
22933 });
22934 }
22935 });
22936};
22937
22938/*
22939* Licensed to the Apache Software Foundation (ASF) under one

Callers 1

EChartsFunction · 0.70

Calls 8

compatStyleFunction · 0.70
normalizeToArrayFunction · 0.70
each$1Function · 0.70
isObject$1Function · 0.70
getFunction · 0.70
set$1Function · 0.70
compatLayoutPropertiesFunction · 0.70
isArrayFunction · 0.70

Tested by

no test coverage detected