forked from github/dataease
refactor: 模板导入适配新的视图逻辑
This commit is contained in:
parent
772530a4dd
commit
d69ebb8ea7
@ -1,5 +1,6 @@
|
||||
package io.dataease.dto.chart;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||
import io.dataease.plugins.common.request.chart.ChartExtFilterRequest;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -32,4 +33,12 @@ public class ChartViewDTO extends ChartViewWithBLOBs {
|
||||
private List<ChartExtFilterRequest> drillFilters;
|
||||
@ApiModelProperty("视图存放位置")
|
||||
private String position;
|
||||
@SerializedName("xaxis")
|
||||
private String xAxis;
|
||||
@SerializedName("xaxisExt")
|
||||
private String xAxisExt;
|
||||
@SerializedName("yaxis")
|
||||
private String yAxis;
|
||||
@SerializedName("yaxisExt")
|
||||
private String yAxisExt;
|
||||
}
|
||||
|
@ -412,12 +412,15 @@ function getCurrentField(valueFieldList, field) {
|
||||
} catch (err) {
|
||||
list = JSON.parse(JSON.stringify(valueFieldList))
|
||||
}
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const f = list[i]
|
||||
if (field.dataeaseName === f.dataeaseName) {
|
||||
res = f
|
||||
break
|
||||
if (list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const f = list[i]
|
||||
if (field.dataeaseName === f.dataeaseName) {
|
||||
res = f
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
@ -2355,13 +2355,15 @@ export function getColors(chart, colors, reset) {
|
||||
} else {
|
||||
series = JSON.parse(chart.yaxis)
|
||||
}
|
||||
for (let i = 0; i < series.length; i++) {
|
||||
const s = series[i]
|
||||
seriesColors.push({
|
||||
name: s.name,
|
||||
color: colors[i % colors.length],
|
||||
isCustom: false
|
||||
})
|
||||
if (series) {
|
||||
for (let i = 0; i < series.length; i++) {
|
||||
const s = series[i]
|
||||
seriesColors.push({
|
||||
name: s.name,
|
||||
color: colors[i % colors.length],
|
||||
isCustom: false
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (chart.data) {
|
||||
|
Loading…
Reference in New Issue
Block a user