Optimize style of gauge chart

This commit is contained in:
cuigh 2018-06-28 16:48:52 +08:00
parent 67e76ef986
commit 79ebf6937f
4 changed files with 24 additions and 6 deletions

View File

@ -1304,12 +1304,21 @@ var Swirl;
{ {
type: 'gauge', type: 'gauge',
radius: '100%', radius: '100%',
center: ["50%", "58%"], center: ["50%", "50%"],
max: d.value, max: d.value,
axisLine: {
show: false,
lineStyle: { width: 0, opacity: 0, shadowBlur: 0 },
},
axisLabel: { show: false }, axisLabel: { show: false },
axisTick: { show: false },
splitLine: { show: false },
pointer: { show: false }, pointer: { show: false },
detail: { detail: {
formatter: this.formatValue.bind(this),
offsetCenter: [0, 0], offsetCenter: [0, 0],
fontSize: 64,
fontWeight: 'bold',
}, },
data: [{ value: d.value }] data: [{ value: d.value }]
} }

File diff suppressed because one or more lines are too long

View File

@ -216,12 +216,21 @@ namespace Swirl.Core {
// name: d.name, // name: d.name,
type: 'gauge', type: 'gauge',
radius: '100%', radius: '100%',
center: ["50%", "58%"], // 仪表位置 center: ["50%", "50%"], // 仪表位置
max: d.value, max: d.value,
axisLine: {
show: false,
lineStyle: {width: 0, opacity: 0, shadowBlur: 0},
},
axisLabel: {show: false}, axisLabel: {show: false},
axisTick: {show: false},
splitLine: {show: false},
pointer: {show: false}, pointer: {show: false},
detail: { detail: {
formatter: this.formatValue.bind(this),
offsetCenter: [0, 0], offsetCenter: [0, 0],
fontSize: 64,
fontWeight: 'bold',
}, },
data: [{value: d.value}] data: [{value: d.value}]
} }

View File

@ -42,9 +42,6 @@
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<div class="buttons"> <div class="buttons">
<button id="btn-delete" class="button is-danger">
<span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span>
</button>
{{ if .Service.Spec.Mode.Replicated }} {{ if .Service.Spec.Mode.Replicated }}
<button id="btn-scale" class="button is-dark"> <button id="btn-scale" class="button is-dark">
<span class="icon"><i class="fas fa-adjust"></i></span><span>{{ i18n("button.scale") }}</span> <span class="icon"><i class="fas fa-adjust"></i></span><span>{{ i18n("button.scale") }}</span>
@ -56,6 +53,9 @@
<button id="btn-rollback" class="button is-dark"> <button id="btn-rollback" class="button is-dark">
<span class="icon"><i class="fas fa-reply"></i></span><span>{{ i18n("button.rollback") }}</span> <span class="icon"><i class="fas fa-reply"></i></span><span>{{ i18n("button.rollback") }}</span>
</button> </button>
<button id="btn-delete" class="button is-danger">
<span class="icon"><i class="far fa-trash-alt"></i></span><span>{{ i18n("button.delete") }}</span>
</button>
</div> </div>
<div class="message is-primary"> <div class="message is-primary">
<div class="message-body"> <div class="message-body">