|
|
@@ -112,6 +112,7 @@ function tableConfig(model) {
|
|
|
function barConfig(model) {
|
|
|
let { type, config, layout } = model;
|
|
|
let { fontSize, title, subtitle, xtitle, xtype, xfields, ytitle, ytype, yfields, series } = config;
|
|
|
+ series = (series instanceof Array) ? series : [series];
|
|
|
let xf = (xfields instanceof Array) ? xfields : (xfields.replace(['['], '').replace([']'], '').split(','));
|
|
|
return {
|
|
|
type: 'charts',
|
|
|
@@ -165,6 +166,7 @@ function barConfig(model) {
|
|
|
function lineConfig(model) {
|
|
|
let { type, config, layout } = model;
|
|
|
let { fontSize, title, subtitle, xtitle, xtype, xfields, ytitle, ytype, yfields, series } = config;
|
|
|
+ series = (series instanceof Array) ? series : [series];
|
|
|
let xf = (xfields instanceof Array) ? xfields : (xfields.replace(['['], '').replace([']'], '').split(','));
|
|
|
return {
|
|
|
type: 'charts',
|
|
|
@@ -224,6 +226,7 @@ function lineConfig(model) {
|
|
|
function pieConfig(model) {
|
|
|
let { type, config, layout } = model;
|
|
|
let { fontSize, title, subtitle, series } = config;
|
|
|
+ series = (series instanceof Array) ? series : [series];
|
|
|
series = series.map((v, i) => {
|
|
|
v.value = v.data;
|
|
|
return v;
|
|
|
@@ -282,7 +285,7 @@ function getBarSeries(fontSize, layout, series) {
|
|
|
formatter: '{c}',
|
|
|
}
|
|
|
},
|
|
|
- barGap: 0
|
|
|
+ barGap: '10%'
|
|
|
}
|
|
|
s = series.map((v, i) => {
|
|
|
let m = Object.assign({}, model);
|