|
@@ -561,17 +561,18 @@ function setStatisticFrequency(e){
|
|
|
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,
|
|
|
nameZh: 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
|
|
|
}
|
|
@@ -648,28 +649,29 @@ function setSplineOpt(e){
|
|
|
let temNameEN=setDyncmicSerieName(item,dynamic_arr,'en')
|
|
|
//预测指标配置
|
|
|
let predict_params = item.EdbInfoCategoryType === 1 ? getPredictParams(item) : {};
|
|
|
- const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let seriesItemObj={
|
|
|
data:[],
|
|
|
dataGrouping:{
|
|
|
enabled:false
|
|
|
},
|
|
|
- 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:index,
|
|
|
name:temName,
|
|
|
nameZh:temName,
|
|
|
nameEn:temNameEN,
|
|
|
color: item.ChartColor,
|
|
|
- lineWidth: Number(item.ChartWidth)||(noExceed&&chartTheme.lineOptionList[index].lineWidth)||1,
|
|
|
+ lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth)||1,
|
|
|
visible:true,
|
|
|
LatestDate:item.LatestDate,
|
|
|
LatestValue:item.LatestValue,
|
|
|
- marker:noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
|
|
|
+ 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
|
|
|
}
|
|
@@ -844,24 +846,25 @@ function setSeasonOpt(e){
|
|
|
chartDataHandle.forEach((item,index)=>{
|
|
|
//预测指标配置
|
|
|
let predict_params = data.EdbInfoCategoryType === 1 ? getSeasonPredictParams(item.CuttingDataTimestamp) : {};
|
|
|
- const noExceed = chartTheme && chartTheme.lineOptionList.length > index //线条数没超过图表可配置的线条数
|
|
|
+ //图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
|
|
|
+ const lineIndex = chartTheme ? index%chartTheme.lineOptionList.length : index
|
|
|
let seriesItem={
|
|
|
data:[],
|
|
|
dataGrouping:{
|
|
|
enabled:false
|
|
|
},
|
|
|
- type: (noExceed&&chartTheme.lineOptionList[index].lineType) || data.ChartStyle,
|
|
|
- dashStyle: (noExceed&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
|
|
|
+ type: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineType) || data.ChartStyle,
|
|
|
+ dashStyle: (chartTheme&&chartTheme.lineOptionList[lineIndex].dashStyle)||'Solid',
|
|
|
yAxis:0,
|
|
|
name:item.ChartLegend,
|
|
|
- lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
|
|
|
- color:colorsArr.slice(-chartDataHandle.length)[index],
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
|
|
|
+ // color:colorsArr.slice(-chartDataHandle.length)[lineIndex], //与PC端的配置不同步,导致两边 十条之后的线条颜色不对应
|
|
|
visible:true,
|
|
|
- marker:noExceed && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
|
|
|
+ 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
|
|
|
}
|
|
@@ -871,7 +874,7 @@ function setSeasonOpt(e){
|
|
|
}
|
|
|
series.push(seriesItem)
|
|
|
})
|
|
|
-
|
|
|
+ chartData.colors = colorsArr.slice(-chartDataHandle.length)
|
|
|
//获取上下限
|
|
|
let minLimit = 0,maxLimit = 0
|
|
|
//非ETA图库不使用自定义上下限
|
|
@@ -1607,18 +1610,19 @@ const setCommodityChart = (leftMin,leftMax) => {
|
|
|
data.forEach((item,index) => {
|
|
|
//处理首或/尾全是无效数据的以null填充
|
|
|
let filterData = 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,
|
|
|
nameZh: item.Name,
|
|
|
nameEn: item.NameEn,
|
|
|
color: item.Color,
|
|
|
chartType: 'linear',
|
|
|
- lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
|
|
|
visible: true,
|
|
|
marker: {
|
|
|
enabled: false
|
|
@@ -1803,18 +1807,19 @@ function initRelevanceChart(data){
|
|
|
//处理series
|
|
|
let seriesData=[]
|
|
|
data.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: data.ChartInfo.ChartName,
|
|
|
nameZh: data.ChartInfo.ChartName,
|
|
|
nameEn: data.ChartInfo.ChartNameEn,
|
|
|
color: item.Color,
|
|
|
chartType: 'linear',
|
|
|
- lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 3,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 3,
|
|
|
visible:true,
|
|
|
marker: {
|
|
|
enabled: false
|
|
@@ -1947,7 +1952,8 @@ function setSectionScatterChart({DataResp,ChartInfo}) {
|
|
|
//数据列
|
|
|
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: [],
|
|
@@ -1961,7 +1967,7 @@ function setSectionScatterChart({DataResp,ChartInfo}) {
|
|
|
zIndex:1,
|
|
|
visible: true,
|
|
|
marker: {
|
|
|
- radius: (noExceed&&chartTheme.lineOptionList[index].radius)||5,
|
|
|
+ radius: (chartTheme&&chartTheme.lineOptionList[lineIndex].radius)||5,
|
|
|
},
|
|
|
}
|
|
|
item.EdbInfoList.forEach(_ => {
|
|
@@ -2289,18 +2295,19 @@ function setRadarChart({DataResp,EdbInfoList,ChartInfo}) {
|
|
|
//系列
|
|
|
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 = {
|
|
|
name: item.Name || item.Date,
|
|
|
nameZh: item.Name || item.Date,
|
|
|
nameEn: item.Date,
|
|
|
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,
|
|
|
color: item.Color,
|
|
|
- lineWidth: (noExceed&&chartTheme.lineOptionList[index].lineWidth) || 1,
|
|
|
+ lineWidth: (chartTheme&&chartTheme.lineOptionList[lineIndex].lineWidth) || 1,
|
|
|
chartType: 'linear'
|
|
|
};
|
|
|
series.push(serie_item)
|