Skip to content

Commit

Permalink
Fix disappearing tooltips on SVG reload
Browse files Browse the repository at this point in the history
Use a unified linebreak in the chart controller, so the tooltip handling will recognize the titles as identical
  • Loading branch information
majentsch committed Sep 8, 2014
1 parent 0fd5619 commit 4061165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/Icinga/Chart/Graph/Tooltip.php
Expand Up @@ -67,7 +67,7 @@ class Tooltip
*/
public function __construct (
$data = array(),
$format = '<b>{title}</b></b><br> {value} of {sum} {label}'
$format = '<b>{title}</b></b><br/> {value} of {sum} {label}'
) {
$this->data = array_merge($this->data, $data);
$this->defaultFormat = $format;
Expand Down
Expand Up @@ -154,7 +154,7 @@ private function drawServiceGroupChart($query)
->setXAxis(new \Icinga\Chart\Unit\StaticAxis())
->setAxisMin(null, 0);

$tooltip = t('<b>{title}:</b><br />{value} of {sum} services are {label}');
$tooltip = t('<b>{title}:</b><br>{value} of {sum} services are {label}');
$this->view->chart->drawBars(
array(
'label' => t('Ok'),
Expand Down Expand Up @@ -206,7 +206,7 @@ private function drawHostGroupChart($query)
$hostgroup->hosts_unreachable_unhandled
);
}
$tooltip = t('<b>{title}:</b><br /> {value} of {sum} hosts are {label}');
$tooltip = t('<b>{title}:</b><br> {value} of {sum} hosts are {label}');
$this->view->chart = new GridChart();
$this->view->chart->alignTopLeft();
$this->view->chart->setAxisLabel('', t('Hosts'))
Expand Down

0 comments on commit 4061165

Please sign in to comment.