Skip to content

Commit

Permalink
fix multigauge
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <[email protected]>
  • Loading branch information
Musilah committed Mar 8, 2024
1 parent 6fe15a5 commit b3baead
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions ui/web/static/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ class GaugeChart extends Echart {
);
if (response.ok) {
const data = await response.json();
console.log("message:", data.messages);
gaugeChart.setOption({
series: [
{
Expand Down Expand Up @@ -1159,23 +1158,43 @@ class MultiGaugeChart extends Echart {
);
if (response.ok) {
const data = await response.json();
console.log("message:", data.messages);
multiGaugeChart.setOption({
series: [
{
data: [
{
{
value: data.messages[0].value,
name: '${gaugeLabel[0]}',
title: {
offsetCenter: ['0%', '-30%']
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '-18%']
}
},
{
{
value: data.messages[1].value,
name: '${gaugeLabel[1]}',
title: {
offsetCenter: ['0%', '0%']
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '12%']
}
},
{
{
value: data.messages[2].value,
name: '${gaugeLabel[2]}',
},
title: {
offsetCenter: ['0%', '28%']
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '40%']
}
}
],
},
],
Expand Down Expand Up @@ -1532,7 +1551,6 @@ class SpeedGaugeChart extends Echart {
);
if (response.ok) {
const data = await response.json();
console.log("message:", data.messages);
speedGaugeChart.setOption({
series: [
{
Expand Down Expand Up @@ -1841,7 +1859,6 @@ class TempGaugeChart extends Echart {
if (response.ok) {
const data = await response.json();
var newValue = data.messages[0].value;
console.log("message:", data.messages);
tempGaugeChart.setOption({
series: [
{
Expand Down

0 comments on commit b3baead

Please sign in to comment.