-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/utils/map.js b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/utils/map.js
index 6030857ca0..5945fdf986 100644
--- a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/utils/map.js
+++ b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/utils/map.js
@@ -12,53 +12,14 @@ export const DEFAULT_COLOR_CASE = {
}
export const DEFAULT_SIZE = {
barDefault: true,
- barWidth: 40,
- barGap: 0.4,
+ barWidthPercent: 50,
lineWidth: 2,
lineType: 'solid',
- lineSymbol: 'marker',
+ lineSymbol: 'circle',
lineSymbolSize: 4,
lineSmooth: true,
- lineArea: false,
- pieInnerRadius: 0,
- pieOuterRadius: 80,
- pieRoseType: 'radius',
- pieRoseRadius: 5,
- funnelWidth: 80,
- radarShape: 'polygon',
- radarSize: 80,
- tableTitleFontSize: 12,
- tableItemFontSize: 12,
- tableTitleHeight: 36,
- tableItemHeight: 36,
- tablePageSize: '20',
- tableColumnMode: 'custom',
- tableColumnWidth: 100,
- tableHeaderAlign: 'left',
- tableItemAlign: 'right',
- gaugeMin: 0,
- gaugeMax: 100,
- gaugeStartAngle: 225,
- gaugeEndAngle: -45,
- dimensionFontSize: 18,
- quotaFontSize: 18,
- spaceSplit: 10,
- dimensionShow: true,
- quotaShow: true,
- scatterSymbol: 'marker',
+ scatterSymbol: 'circle',
scatterSymbolSize: 15,
- symbolOpacity: 5,
- symbolStrokeWidth: 1,
- treemapWidth: 80,
- treemapHeight: 80,
- liquidMax: 100,
- liquidSize: 80,
- liquidOutlineBorder: 4,
- liquidOutlineDistance: 8,
- liquidWaveLength: 128,
- liquidWaveCount: 3,
- liquidShape: 'circle',
- tablePageMode: 'page'
}
export const COLOR_PANEL = [
'#ff4500',
@@ -73,6 +34,27 @@ export const COLOR_PANEL = [
'#FFFFFF'
]
+export const CHART_FONT_FAMILY = [
+ { name: '微软雅黑', value: 'Microsoft YaHei' },
+ { name: '宋体', value: 'SimSun' },
+ { name: '黑体', value: 'SimHei' },
+ { name: '楷体', value: 'KaiTi' }
+]
+
+export const CHART_FONT_LETTER_SPACE = [
+ { name: '0px', value: '0' },
+ { name: '1px', value: '1' },
+ { name: '2px', value: '2' },
+ { name: '3px', value: '3' },
+ { name: '4px', value: '4' },
+ { name: '5px', value: '5' },
+ { name: '6px', value: '6' },
+ { name: '7px', value: '7' },
+ { name: '8px', value: '8' },
+ { name: '9px', value: '9' },
+ { name: '10px', value: '10' }
+]
+
export const DEFAULT_LABEL = {
show: true,
position: 'middle',
diff --git a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/index.vue b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/index.vue
index d09f5bd268..7124da1491 100644
--- a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/index.vue
+++ b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/index.vue
@@ -330,10 +330,9 @@ export default {
let color = colors && _index < colors.length ? hexColorToRGBA(colors[_index], alpha) : undefined;
if (color && gradient) {
color = setGradientColor(color, true, 270)
- console.log(color)
}
- return {
+ const setting = {
type: _chartType,
name: t.name,
options: {
@@ -362,6 +361,7 @@ export default {
label: _labelSetting,
}
}
+ return this.setSizeSetting(setting);
}) : [];
let _dataExt = this.chart.data && this.chart.data.data && this.chart.data.data.length > 0 ? _.map(_.filter(this.chart.data.data, (c, _index) => {
@@ -390,10 +390,9 @@ export default {
let color = colors && (yaxisCount + _index) < colors.length ? hexColorToRGBA(colors[yaxisCount + _index], alpha) : undefined;
if (color && gradient) {
color = setGradientColor(color, true, 270)
- console.log(color)
}
- return {
+ const setting = {
type: _chartType,
name: t.name,
options: {
@@ -422,6 +421,7 @@ export default {
label: _labelSetting,
}
}
+ return this.setSizeSetting(setting);
}) : [];
@@ -484,6 +484,41 @@ export default {
return params;
},
+ setSizeSetting(setting) {
+ let customAttr = undefined;
+ if (this.chart.customAttr) {
+ customAttr = JSON.parse(this.chart.customAttr);
+ }
+ if (customAttr && customAttr.size) {
+ setting.options.columnWidthRatio = undefined;
+ setting.options.smooth = undefined;
+ setting.options.point = undefined;
+ setting.options.lineStyle = undefined;
+ setting.options.size = undefined;
+ setting.options.shape = undefined;
+
+ if (setting.type === 'column' && !customAttr.size.barDefault) {
+ setting.options.columnWidthRatio = customAttr.size.barWidthPercent / 100.0
+ }
+ if (setting.type === 'line') {
+ setting.options.smooth = customAttr.size.lineSmooth
+ setting.options.point = {
+ size: parseInt(customAttr.size.lineSymbolSize),
+ shape: customAttr.size.lineSymbol
+ }
+ setting.options.lineStyle = {
+ lineWidth: parseInt(customAttr.size.lineWidth)
+ }
+ }
+ if (setting.type === 'scatter') {
+ setting.options.size = parseInt(customAttr.size.scatterSymbolSize)
+ setting.options.shape = customAttr.size.scatterSymbol
+ }
+ }
+
+ return setting;
+ },
+
getAnalyse(chart) {
let senior = {}
const assistLine = []
diff --git a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/style.vue b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/style.vue
index db2e372f99..627c5eefb0 100644
--- a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/style.vue
+++ b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/style.vue
@@ -11,6 +11,10 @@