Fix disappearing tooltips on SVG reload

Use a unified linebreak in the chart controller, so the tooltip handling will recognize the titles as identical
This commit is contained in:
Matthias Jentsch 2014-09-08 16:23:14 +02:00
parent 0fd561928a
commit 40611659ed
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -154,7 +154,7 @@ class Monitoring_ChartController extends Controller
->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'),
@ -206,7 +206,7 @@ class Monitoring_ChartController extends Controller
$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'))