Răsfoiți Sursa

bug_5007 十条之后的所有配置从第一条线条配置开始重新引用

hbchen 4 luni în urmă
părinte
comite
8e08d3fe63

+ 16 - 10
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -633,13 +633,17 @@ export default {
 
 			let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
 			this.tableData.forEach((item,index) => {
-				const noExceed = themeOpt && themeOpt.lineOptionList.length > index //线条数没超过图表可配置的线条数
-				item.ChartColor = item.ChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
-				item.PredictChartColor = item.PredictChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
-				item.ChartStyle = item.ChartStyle || (noExceed &&themeOpt.lineOptionList[index].lineType||'spline');
+				//图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const colorIndex = themeOpt ? index%themeOpt.colorsOptions.length : index
+				const defaultOptIndex = index%defaultOpts.colors.length
+				const lineIndex = themeOpt ? index%themeOpt.lineOptionList.length : index
+
+				item.ChartColor = item.ChartColor || (themeOpt&&themeOpt.colorsOptions[colorIndex]||defaultOpts.colors[defaultOptIndex]);
+				item.PredictChartColor = item.PredictChartColor || (themeOpt&&themeOpt.colorsOptions[colorIndex]||defaultOpts.colors[defaultOptIndex]);
+				item.ChartStyle = item.ChartStyle || (themeOpt &&themeOpt.lineOptionList[lineIndex].lineType||'spline');
 				
 				let configLineWid = index===0?3:1;//兼容预测指标绘图无主题配置
-				this.tableData[index].ChartWidth = this.tableData[index].ChartWidth || (noExceed&&themeOpt.lineOptionList[index].lineWidth||configLineWid);
+				this.tableData[index].ChartWidth = this.tableData[index].ChartWidth || (themeOpt&&themeOpt.lineOptionList[lineIndex].lineWidth||configLineWid);
 			})
 		},
 
@@ -969,14 +973,16 @@ export default {
 
 			let themeOpt = JSON.parse(this.chartInfo.ChartThemeStyle);
 			this.tableData.forEach((item,index) => {
-				const noExceed = themeOpt && themeOpt.lineOptionList.length > index //线条数没超过图表可配置的线条数
+				//图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const colorIndex = themeOpt ? index%themeOpt.colorsOptions.length : index
+				const lineIndex = themeOpt ? index%themeOpt.lineOptionList.length : index
 
-				item.ChartColor = themeOpt.colorsOptions[index];
-				item.PredictChartColor = themeOpt.colorsOptions[index];
-				item.ChartStyle = noExceed && themeOpt.lineOptionList[index].lineType||'spline';
+				item.ChartColor = themeOpt && themeOpt.colorsOptions[colorIndex];
+				item.PredictChartColor = themeOpt && themeOpt.colorsOptions[colorIndex];
+				item.ChartStyle = themeOpt && themeOpt.lineOptionList[lineIndex].lineType||'spline';
 				item.isAxis = item.isAxis||1;
 
-				this.tableData[index].ChartWidth = noExceed && themeOpt.lineOptionList[index].lineWidth;
+				this.tableData[index].ChartWidth = themeOpt && themeOpt.lineOptionList[lineIndex].lineWidth;
 			})
 
 		},

+ 44 - 36
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -819,12 +819,13 @@ export const chartSetMixin = {
           
         //预测指标配置
         let predict_params = item.EdbInfoCategoryType === 1 ? this.getPredictParams(item) : {};
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //数据列
         let obj = {
           data: [],
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: sameSideIndex,
           name:
             dynamic_arr.length > 1
@@ -835,12 +836,12 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           color: item.ChartColor,
-          lineWidth:Number(item.ChartWidth)|| (noExceed&&chartTheme.lineOptionList[index].lineWidth)||1,
-          marker: noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+          lineWidth:Number(item.ChartWidth)|| (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth)||1,
+          marker: chartTheme && chartTheme.lineOptionList[lineIndex].dataMark && chartTheme.lineOptionList[lineIndex].dataMark!='none'?{
             enabled:true,
-            symbol: chartTheme.lineOptionList[index].markType || 'circle',
-            fillColor:chartTheme.lineOptionList[index].markColor,
-            radius: chartTheme.lineOptionList[index].markSize
+            symbol: chartTheme.lineOptionList[lineIndex].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[lineIndex].markColor,
+            radius: chartTheme.lineOptionList[lineIndex].markSize
           }:{},
           ...predict_params
         };
@@ -1024,7 +1025,8 @@ export const chartSetMixin = {
 
         //预测指标配置
         let predict_params = item.EdbInfoCategoryType === 1 ? this.getPredictParams(item,chartStyle) : {};
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //数据列
         let obj = {
           data: [],
@@ -1039,7 +1041,7 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth)||(noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
           fillColor: (this.chartInfo.ChartType === 3 || (this.chartInfo.ChartType === 6 && item.ChartStyle === 'areaspline')) ? item.ChartColor : undefined,
           borderWidth: 1,
           borderColor: item.ChartColor,
@@ -1121,19 +1123,20 @@ export const chartSetMixin = {
         // console.log(j,index);
         //预测指标配置
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        // 图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+        const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: [],
-          type: (noExceed && chartTheme.lineOptionList[index].lineType) || chartData.ChartStyle,
-          dashStyle: (noExceed && chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme && chartTheme.lineOptionList[lineIndex].lineType) || chartData.ChartStyle,
+          dashStyle: (chartTheme && chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: this.isPredictorChart?j.Year:j.ChartLegend,
-          lineWidth: (noExceed && chartTheme.lineOptionList[index].lineWidth) || 1,
-          marker: noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+          lineWidth: (chartTheme && chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
+          marker: chartTheme && chartTheme.lineOptionList[lineIndex].dataMark && chartTheme.lineOptionList[lineIndex].dataMark!='none'?{
             enabled:true,
-            symbol: chartTheme.lineOptionList[index].markType || 'circle',
-            fillColor:chartTheme.lineOptionList[index].markColor,
-            radius: chartTheme.lineOptionList[index].markSize
+            symbol: chartTheme.lineOptionList[lineIndex].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[lineIndex].markColor,
+            radius: chartTheme.lineOptionList[lineIndex].markSize
           }:{},
           ...predict_params
         };
@@ -1604,18 +1607,19 @@ export const chartSetMixin = {
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
         // console.log(filterData)
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: filterData,
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1841,18 +1845,19 @@ export const chartSetMixin = {
       //处理series
       let seriesData=[]
       this.relevanceChartData.YDataList.forEach((item,index)=>{
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: item.Value,
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1967,7 +1972,8 @@ export const chartSetMixin = {
       //数据列
       let series = [];
       DataList.forEach((item,index) => {
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //数据列
         let series_item = {
           data: [],
@@ -1979,7 +1985,7 @@ export const chartSetMixin = {
           chartType: 'linear',
           zIndex:1,
           marker: {
-            radius: (noExceed&&chartTheme.lineOptionList[index].radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList[lineIndex].radius)||5,
           },
         }
         item.EdbInfoList.forEach(_ => {
@@ -2174,18 +2180,19 @@ export const chartSetMixin = {
       //系列
       let series = [];
       YDataList.forEach((item,index) => {
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: item.Value,
           pointPlacement: 'on',
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'line',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'line',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           color: item.Color,
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
           chartType: 'linear'
         };
         series.push(serie_item)
@@ -2261,17 +2268,18 @@ export const chartSetMixin = {
           tickWidth: 1,
         }
 
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let series_item = {
           data: item.Value.map(_ =>[_.X,_.Y]),
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
           yAxis: index,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth)||3,
           chartType: 'linear',
           zIndex:1
         }

+ 41 - 34
src/views/ppt_manage/mixins/mixins.js

@@ -202,23 +202,24 @@ export default {
         : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`
         const nameEn = item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:''
 
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //数据列
         let obj = {
           data: [],
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: sameSideIndex,
           name:nameCh,
           nameCh:nameCh,
           nameEn:nameEn,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth)||(noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
-          marker: noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
+          marker: chartTheme && chartTheme.lineOptionList[lineIndex].dataMark && chartTheme.lineOptionList[lineIndex].dataMark!='none'?{
             enabled:true,
-            symbol: chartTheme.lineOptionList[index].markType || 'circle',
-            fillColor:chartTheme.lineOptionList[index].markColor,
-            radius: chartTheme.lineOptionList[index].markSize
+            symbol: chartTheme.lineOptionList[lineIndex].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[lineIndex].markColor,
+            radius: chartTheme.lineOptionList[lineIndex].markSize
           }:{},
           ...predict_params
         };
@@ -466,19 +467,20 @@ export default {
         let j = chartDataHandle[index]
           //预测指标配置
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: [],
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || chartData.ChartStyle,
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || chartData.ChartStyle,
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: j.ChartLegend,
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
-          marker: noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
+          marker: chartTheme && chartTheme.lineOptionList[lineIndex].dataMark && chartTheme.lineOptionList[lineIndex].dataMark!='none'?{
             enabled:true,
-            symbol: chartTheme.lineOptionList[index].markType || 'circle',
-            fillColor:chartTheme.lineOptionList[index].markColor,
-            radius: chartTheme.lineOptionList[index].markSize
+            symbol: chartTheme.lineOptionList[lineIndex].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[lineIndex].markColor,
+            radius: chartTheme.lineOptionList[lineIndex].markSize
           }:{},
           ...predict_params
         };
@@ -903,18 +905,19 @@ export default {
       data.forEach((item,index) => {
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: filterData,
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1118,18 +1121,19 @@ export default {
       //处理series
       let seriesData=[]
       this.relevanceChartData.YDataList.forEach((item,index)=>{
-      const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: item.Value,
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1244,7 +1248,8 @@ export default {
       let series = [];
       DataList.forEach((item,index) => {
 
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         //数据列
         let series_item = {
           data: [],
@@ -1257,7 +1262,7 @@ export default {
           chartType: 'linear',
           zIndex:1,
           marker: {
-            radius: (noExceed&&chartTheme.lineOptionList[index].radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList[lineIndex].radius)||5,
           },
         }
         item.EdbInfoList.forEach(_ => {
@@ -1420,17 +1425,18 @@ export default {
           max: index===0? Number(LeftMaxValue):Number(RightMaxValue),
           tickWidth: 1,
         }
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let series_item = {
           data: item.Value.map(_ =>[_.X,_.Y]),
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'spline',
           yAxis: index,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth)||3,
           chartType: 'linear',
           zIndex:1
         }
@@ -1686,18 +1692,19 @@ export default {
       //系列
       let series = [];
       YDataList.forEach((item,index) => {
-        const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
+        //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
+				const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
         let serie_item = {
           data: item.Value,
           pointPlacement: 'on',
-          type: (noExceed&&chartTheme.lineOptionList[index].lineType) || 'line',
-          dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || 'line',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
           yAxis: 0,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           color: item.Color,
-          lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
           chartType: 'linear'
         };
         series.push(serie_item)