|
@@ -819,12 +819,13 @@ export const chartSetMixin = {
|
|
|
|
|
|
//预测指标配置
|
|
|
let predict_params = item.EdbInfoCategoryType === 1 ? this.getPredictParams(item) : {};
|
|
|
-
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
//数据列
|
|
|
let obj = {
|
|
|
data: [],
|
|
|
- type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
|
|
|
- dashStyle: (chartTheme&&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)||(chartTheme&&chartTheme.lineOptionList[index].lineWidth),
|
|
|
- marker: chartTheme && 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) : {};
|
|
|
-
|
|
|
+ //图表可配置的线条数就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)||(chartTheme&&chartTheme.lineOptionList[index].lineWidth),
|
|
|
+ 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,
|
|
@@ -1050,7 +1052,7 @@ export const chartSetMixin = {
|
|
|
for (let i of item.DataList) {
|
|
|
obj.data.push([i.DataTimestamp, i.Value]);
|
|
|
}
|
|
|
-
|
|
|
+ console.log(obj,'obj');
|
|
|
data.push(obj);
|
|
|
ydata.push(yItem);
|
|
|
});
|
|
@@ -1121,19 +1123,20 @@ export const chartSetMixin = {
|
|
|
// console.log(j,index);
|
|
|
//预测指标配置
|
|
|
let predict_params = chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
|
|
|
-
|
|
|
+ // 图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let serie_item = {
|
|
|
data: [],
|
|
|
- type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || chartData.ChartStyle,
|
|
|
- dashStyle: (chartTheme&&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: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
|
|
|
- marker: chartTheme && 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)
|
|
|
-
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let serie_item = {
|
|
|
data: filterData,
|
|
|
- type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
|
|
|
- dashStyle: (chartTheme&&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: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
|
|
|
marker: {
|
|
|
enabled: false
|
|
|
}
|
|
@@ -1841,17 +1845,19 @@ export const chartSetMixin = {
|
|
|
//处理series
|
|
|
let seriesData=[]
|
|
|
this.relevanceChartData.YDataList.forEach((item,index)=>{
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let serie_item = {
|
|
|
data: item.Value,
|
|
|
- type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
|
|
|
- dashStyle: (chartTheme&&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: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
|
|
|
marker: {
|
|
|
enabled: false
|
|
|
}
|
|
@@ -1966,6 +1972,8 @@ export const chartSetMixin = {
|
|
|
//数据列
|
|
|
let series = [];
|
|
|
DataList.forEach((item,index) => {
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
//数据列
|
|
|
let series_item = {
|
|
|
data: [],
|
|
@@ -1977,7 +1985,7 @@ export const chartSetMixin = {
|
|
|
chartType: 'linear',
|
|
|
zIndex:1,
|
|
|
marker: {
|
|
|
- radius: (chartTheme&&chartTheme.lineOptionList[index].radius)||5,
|
|
|
+ radius: (chartTheme&&chartTheme.lineOptionList[lineIndex].radius)||5,
|
|
|
},
|
|
|
}
|
|
|
item.EdbInfoList.forEach(_ => {
|
|
@@ -2172,17 +2180,19 @@ export const chartSetMixin = {
|
|
|
//系列
|
|
|
let series = [];
|
|
|
YDataList.forEach((item,index) => {
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let serie_item = {
|
|
|
data: item.Value,
|
|
|
pointPlacement: 'on',
|
|
|
- type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'line',
|
|
|
- dashStyle: (chartTheme&&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: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
|
|
|
chartType: 'linear'
|
|
|
};
|
|
|
series.push(serie_item)
|
|
@@ -2258,16 +2268,18 @@ export const chartSetMixin = {
|
|
|
tickWidth: 1,
|
|
|
}
|
|
|
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let series_item = {
|
|
|
data: item.Value.map(_ =>[_.X,_.Y]),
|
|
|
- dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
|
|
|
- type: (chartTheme&&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: (chartTheme&&chartTheme.lineOptionList[index].lineWidth)||3,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth)||3,
|
|
|
chartType: 'linear',
|
|
|
zIndex:1
|
|
|
}
|