|
|
@@ -70,7 +70,7 @@ function barOption(data, barConfig, themeConfig, styleConfig, drillDown) {
|
|
|
const { xAxis, yAxis, groupBy } = barConfig;
|
|
|
const { barMaxWidth, barMinHeight, barGap, stack, labelVisible, labelPosition, labelDistance,
|
|
|
labelRotate, xNameLocation, xNameGap, xNameRotate, xLabelHiddenCover, xLabelRotate, dataZoomVisible,
|
|
|
- xLabelMargin, yNameLocation, yNameGap, yNameRotate, labelZeroVisible } = styleConfig;
|
|
|
+ xLabelMargin, yNameLocation, yNameGap, yNameRotate, labelZeroVisible, xNameHidden, yNameHidden } = styleConfig;
|
|
|
let xTitle = xAxis?`${xAxis.column.label}`:null
|
|
|
let yTitle = yAxis?`${yAxis.column.label}`:null
|
|
|
let xGranularityV = xAxis?`${xAxis.granularity.value}`:null
|
|
|
@@ -108,7 +108,7 @@ function barOption(data, barConfig, themeConfig, styleConfig, drillDown) {
|
|
|
xAxis: [{
|
|
|
type: 'category',
|
|
|
nameLocation: (xNameLocation === '' || xNameLocation === null || xNameLocation === undefined) ? 'end' : xNameLocation,
|
|
|
- nameGap: (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
+ nameGap: xNameHidden ? -9999 : (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
nameRotate: (xNameRotate === '' || xNameRotate === null || xNameRotate === undefined) ? 0 : Number(xNameRotate),
|
|
|
axisLabel: {
|
|
|
interval: xLabelHiddenCover === undefined ? 'auto' : (!!xLabelHiddenCover ? 'auto' : 0),
|
|
|
@@ -142,7 +142,7 @@ function barOption(data, barConfig, themeConfig, styleConfig, drillDown) {
|
|
|
name: yTitle || '纵轴',
|
|
|
type: 'value',
|
|
|
nameLocation: (yNameLocation === '' || yNameLocation === null || yNameLocation === undefined) ? 'end' : yNameLocation,
|
|
|
- nameGap: (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
+ nameGap: yNameHidden ? -9999 : (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
nameRotate: (yNameRotate === '' || yNameRotate === null || yNameRotate === undefined) ? 0 : Number(yNameRotate),
|
|
|
}],
|
|
|
series: data.serieses.map(s => {
|
|
|
@@ -192,7 +192,7 @@ function lineOption(data, lineConfig, themeConfig, styleConfig, drillDown) {
|
|
|
}
|
|
|
const { labelSymbol, xNameLocation, xNameGap, xNameRotate, xLabelRotate, xLabelMargin, xLabelHiddenCover,
|
|
|
yNameLocation, yNameGap, yNameRotate, stack, labelVisible, labelPosition, labelDistance, labelRotate,
|
|
|
- lineSmooth, labelSymbolSize, dataZoomVisible } = styleConfig;
|
|
|
+ lineSmooth, labelSymbolSize, dataZoomVisible, xNameHidden, yNameHidden } = styleConfig;
|
|
|
const { xAxis, yAxis, groupBy } = lineConfig;
|
|
|
let xTitle = xAxis?`${xAxis.column.label}`:null
|
|
|
let yTitle = yAxis?`${yAxis.column.label}`:null
|
|
|
@@ -232,7 +232,7 @@ function lineOption(data, lineConfig, themeConfig, styleConfig, drillDown) {
|
|
|
name: xTitle || '横轴',
|
|
|
type: 'category',
|
|
|
nameLocation: (xNameLocation === '' || xNameLocation === null || xNameLocation === undefined) ? 'end' : xNameLocation,
|
|
|
- nameGap: (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
+ nameGap: xNameHidden ? -9999 : (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
nameRotate: (xNameRotate === '' || xNameRotate === null || xNameRotate === undefined) ? 0 : Number(xNameRotate),
|
|
|
axisLabel: {
|
|
|
interval: xLabelHiddenCover === undefined ? 'auto' : (!!xLabelHiddenCover ? 'auto' : 0),
|
|
|
@@ -265,7 +265,7 @@ function lineOption(data, lineConfig, themeConfig, styleConfig, drillDown) {
|
|
|
name: yTitle || '纵轴',
|
|
|
type: 'value',
|
|
|
nameLocation: (yNameLocation === '' || yNameLocation === null || yNameLocation === undefined) ? 'end' : yNameLocation,
|
|
|
- nameGap: (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
+ nameGap: yNameHidden ? -9999 : (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
nameRotate: (yNameRotate === '' || yNameRotate === null || yNameRotate === undefined) ? 0 : Number(yNameRotate),
|
|
|
}],
|
|
|
series: data.serieses.map(s => {
|
|
|
@@ -412,7 +412,7 @@ function pieOption(data, pieConfig, themeConfig, styleConfig, drillDown) {
|
|
|
function scatterOption(data, scatterConfig, themeConfig, styleConfig) {
|
|
|
const { labelSymbol, xNameLocation, xNameGap, xNameRotate, yNameLocation, yNameGap,
|
|
|
yNameRotate, labelSymbolSize, dataZoomVisible, xLabelRotate, xLabelMargin,
|
|
|
- yLabelRotate, yLabelMargin} = styleConfig;
|
|
|
+ yLabelRotate, yLabelMargin, xNameHidden, yNameHidden } = styleConfig;
|
|
|
const { xAxis, yAxis, groupBy } = scatterConfig;
|
|
|
let xTitle = xAxis?`${xAxis.column.label}`:null
|
|
|
let yTitle = yAxis?`${yAxis.column.label}`:null;
|
|
|
@@ -439,7 +439,7 @@ function scatterOption(data, scatterConfig, themeConfig, styleConfig) {
|
|
|
type : 'value',
|
|
|
name: xTitle || '横轴',
|
|
|
nameLocation: (xNameLocation === '' || xNameLocation === null || xNameLocation === undefined) ? 'end' : xNameLocation,
|
|
|
- nameGap: (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
+ nameGap: xNameHidden ? -9999 : (xNameGap === '' || xNameGap === null || xNameGap === undefined) ? 15 : Number(xNameGap),
|
|
|
nameRotate: (xNameRotate === '' || xNameRotate === null || xNameRotate === undefined) ? 0 : Number(xNameRotate),
|
|
|
axisLabel: {
|
|
|
rotate: (xLabelRotate === '' || xLabelRotate === null || xLabelRotate === undefined) ? 0 : Number(xLabelRotate),
|
|
|
@@ -454,7 +454,7 @@ function scatterOption(data, scatterConfig, themeConfig, styleConfig) {
|
|
|
type : 'value',
|
|
|
name: yTitle || '纵轴',
|
|
|
nameLocation: (yNameLocation === '' || yNameLocation === null || yNameLocation === undefined) ? 'end' : yNameLocation,
|
|
|
- nameGap: (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
+ nameGap: yNameHidden ? -9999 : (yNameGap === '' || yNameGap === null || yNameGap === undefined) ? 15 : Number(yNameGap),
|
|
|
nameRotate: (yNameRotate === '' || yNameRotate === null || yNameRotate === undefined) ? 0 : Number(yNameRotate),
|
|
|
axisLabel: {
|
|
|
rotate: (yLabelRotate === '' || yLabelRotate === null || yLabelRotate === undefined) ? 0 : Number(yLabelRotate),
|