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