feat--增加柱状图柱体间距调整

This commit is contained in:
qianming
2023-11-30 10:16:54 +08:00
parent 94fe184bc9
commit b44eb08cb2
9 changed files with 44 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ export const widgetBarDoubleYaxis = {
name: 'maxWidth',
required: false,
placeholder: '',
value: 10,
value: 15,
},
{
type: 'el-slider',
@@ -43,6 +43,14 @@ export const widgetBarDoubleYaxis = {
placeholder: '',
value: 5,
},
{
type: 'el-slider',
label: '间距',
name: 'barGap',
required: false,
placeholder: '',
value: 10,
},
{
type: 'el-slider',
label: '最小高度',

View File

@@ -34,7 +34,7 @@ export const widgetBarStackMoreShow = {
name: 'maxWidth',
required: false,
placeholder: '',
value: 25,
value: 15,
},
{
type: 'el-slider',
@@ -44,6 +44,14 @@ export const widgetBarStackMoreShow = {
placeholder: '',
value: 5,
},
{
type: 'el-slider',
label: '间距',
name: 'barGap',
required: false,
placeholder: '',
value: 10,
},
{
type: 'el-switch',
label: '背景显示',

View File

@@ -61,7 +61,7 @@ export const widgetBarStack = {
name: 'maxWidth',
required: false,
placeholder: '',
value: 20,
value: 15,
},
{
type: 'el-slider',
@@ -77,7 +77,7 @@ export const widgetBarStack = {
name: 'barGap',
required: false,
placeholder: '',
value: 0,
value: 10,
},
{
type: 'el-switch',

View File

@@ -49,7 +49,7 @@ export const widgetBarchart = {
name: 'maxWidth',
required: false,
placeholder: '',
value: 10,
value: 15,
},
{
type: 'el-slider',
@@ -59,6 +59,14 @@ export const widgetBarchart = {
placeholder: '',
value: 5,
},
{
type: 'el-slider',
label: '间距',
name: 'barGap',
required: false,
placeholder: '',
value: 10,
},
{
type: 'el-slider',
label: '最小高度',

View File

@@ -49,7 +49,7 @@ export const widgetGradientBarchart = {
name: 'maxWidth',
required: false,
placeholder: '',
value: 10,
value: 15,
},
{
type: 'el-slider',
@@ -59,6 +59,14 @@ export const widgetGradientBarchart = {
placeholder: '',
value: 5,
},
{
type: 'el-slider',
label: '间距',
name: 'barGap',
required: false,
placeholder: '',
value: 10,
},
{
type: 'el-switch',
label: '背景显示',

View File

@@ -312,6 +312,7 @@ export default {
const series = this.options.series;
for (const key in series) {
if (series[key].type == "bar") {
series[key].barGap = optionsSetup.barGap + "%";
series[key].label = {
show: optionsSetup.isShow,
position: optionsSetup.fontPosition,

View File

@@ -348,7 +348,7 @@ export default {
name: item.name,
type: "bar",
data: item.list.map((item) => item.data),
barGap: "0%",
barGap: optionsSetup.barGap + "%",
barWidth: optionsSetup.maxWidth,
label: {
show: optionsSetup.isShow,
@@ -449,7 +449,7 @@ export default {
name: item.name,
type: "bar",
data: item.list.map((item) => item.data),
barGap: "0%",
barGap: optionsSetup.barGap + "%",
barWidth: optionsSetup.maxWidth,
label: {
show: optionsSetup.isShow,

View File

@@ -348,7 +348,7 @@ export default {
for (const i in series) {
if (series[i].type == "bar") {
series[i].type = "bar";
series[i].barGap = "0%";
series[i].barGap = optionsSetup.barGap + "%";
series[i].barWidth = optionsSetup.maxWidth;
series[i].barMinHeight = optionsSetup.minHeight;
series[i].label = {
@@ -468,7 +468,7 @@ export default {
const obj = {};
if (val.series[i].type == "bar") {
obj.type = "bar";
obj.barGap = "0%";
obj.barGap = optionsSetup.barGap + "%";
obj.stack = this.getStackStyle();
obj.barWidth = optionsSetup.maxWidth;
obj.barMinHeight = optionsSetup.minHeight;

View File

@@ -306,6 +306,7 @@ export default {
const optionsSetup = this.optionsSetup;
const series = this.options.series;
if (series[0].type == "bar") {
series[0].barGap = optionsSetup.barGap + "%";
series[0].label = {
show: optionsSetup.isShow,
position: optionsSetup.fontPosition,