mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Fix float format of donut chart attributes
This commit is contained in:
parent
5aa83ea0d9
commit
fb124b37cf
@ -228,7 +228,7 @@ class Donut
|
|||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'cx' => 20,
|
'cx' => 20,
|
||||||
'cy' => 20,
|
'cy' => 20,
|
||||||
'r' => $this->radius,
|
'r' => sprintf('%F', $this->radius),
|
||||||
'fill' => $this->getCenterColor()
|
'fill' => $this->getCenterColor()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -239,7 +239,7 @@ class Donut
|
|||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'cx' => 20,
|
'cx' => 20,
|
||||||
'cy' => 20,
|
'cy' => 20,
|
||||||
'r' => $this->radius,
|
'r' => sprintf('%F', $this->radius),
|
||||||
'fill' => $this->getCenterColor(),
|
'fill' => $this->getCenterColor(),
|
||||||
'stroke-width' => $this->getThickness(),
|
'stroke-width' => $this->getThickness(),
|
||||||
'class' => 'slice-state-not-checked'
|
'class' => 'slice-state-not-checked'
|
||||||
@ -263,11 +263,11 @@ class Donut
|
|||||||
'attributes' => $slice[1] + array(
|
'attributes' => $slice[1] + array(
|
||||||
'cx' => 20,
|
'cx' => 20,
|
||||||
'cy' => 20,
|
'cy' => 20,
|
||||||
'r' => $this->radius,
|
'r' => sprintf('%F', $this->radius),
|
||||||
'fill' => 'transparent',
|
'fill' => 'transparent',
|
||||||
'stroke-width' => $this->getThickness(),
|
'stroke-width' => $this->getThickness(),
|
||||||
'stroke-dasharray' => $slice[0] . ' ' . (99.9 - $slice[0]), // 99.9 prevents gaps (slight overlap)
|
'stroke-dasharray' => sprintf('%F', $slice[0]) . ' ' . sprintf('%F', (99.9 - $slice[0])), // 99.9 prevents gaps (slight overlap)
|
||||||
'stroke-dashoffset' => $offset
|
'stroke-dashoffset' => sprintf('%F', $offset)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// negative values shift in the clockwise direction
|
// negative values shift in the clockwise direction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user