|
@@ -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
|
|
|
}
|