Mirco Pizzichini
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
26 additions and
1 deletions
-
ui/src/app/widget/lib/flot-widget.js
|
|
@ -399,7 +399,8 @@ export default class TbFlot { |
|
|
options.series.bars ={ |
|
|
options.series.bars ={ |
|
|
show: true, |
|
|
show: true, |
|
|
lineWidth: 0, |
|
|
lineWidth: 0, |
|
|
fill: 0.9 |
|
|
fill: 0.9, |
|
|
|
|
|
align: settings.barAlignment || "left" |
|
|
} |
|
|
} |
|
|
ctx.defaultBarWidth = settings.defaultBarWidth || 600; |
|
|
ctx.defaultBarWidth = settings.defaultBarWidth || 600; |
|
|
} |
|
|
} |
|
|
@ -975,6 +976,11 @@ export default class TbFlot { |
|
|
"type": "number", |
|
|
"type": "number", |
|
|
"default": 600 |
|
|
"default": 600 |
|
|
}; |
|
|
}; |
|
|
|
|
|
properties["barAlignment"] = { |
|
|
|
|
|
"title": "Bar alignment", |
|
|
|
|
|
"type": "string", |
|
|
|
|
|
"default": "left" |
|
|
|
|
|
}; |
|
|
} |
|
|
} |
|
|
properties["shadowSize"] = { |
|
|
properties["shadowSize"] = { |
|
|
"title": "Shadow size", |
|
|
"title": "Shadow size", |
|
|
@ -1125,6 +1131,25 @@ export default class TbFlot { |
|
|
} |
|
|
} |
|
|
if (chartType === 'bar') { |
|
|
if (chartType === 'bar') { |
|
|
schema["form"].push("defaultBarWidth"); |
|
|
schema["form"].push("defaultBarWidth"); |
|
|
|
|
|
schema["form"].push({ |
|
|
|
|
|
"key": "barAlignment", |
|
|
|
|
|
"type": "rc-select", |
|
|
|
|
|
"multiple": false, |
|
|
|
|
|
"items": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"value": "left", |
|
|
|
|
|
"label": "Left" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"value": "right", |
|
|
|
|
|
"label": "Right" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"value": "center", |
|
|
|
|
|
"label": "Center" |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
schema["form"].push("shadowSize"); |
|
|
schema["form"].push("shadowSize"); |
|
|
schema["form"].push({ |
|
|
schema["form"].push({ |
|
|
|