Merge branch 'ent-11680-15857-bug-dashboard-metaconsola-widgets-servicio-con-mapa-sunburts' into 'develop'
Ent 11680 [#15857]Bug Dashboard metaconsola widgets servicio con mapa sunburts See merge request artica/pandorafms!6190
This commit is contained in:
commit
df70aa6ee6
|
@ -150,7 +150,7 @@ function d3_tree_map_graph($data, $width=700, $height=700, $return=false)
|
|||
}
|
||||
|
||||
|
||||
function d3_sunburst_graph($data, $width=700, $height=700, $return=false, $tooltip=true)
|
||||
function d3_sunburst_graph($data, $width=700, $height=700, $return=false, $tooltip=true, $id_container=false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
@ -158,6 +158,8 @@ function d3_sunburst_graph($data, $width=700, $height=700, $return=false, $toolt
|
|||
$data = json_encode($data);
|
||||
}
|
||||
|
||||
$id_container = ($id_container === false) ? '#sunburst' : $id_container;
|
||||
|
||||
$output = "<div id=\"sunburst\" style='overflow: hidden;'></div>";
|
||||
$output .= include_javascript_d3(true);
|
||||
$output .= '<style type="text/css">
|
||||
|
@ -167,7 +169,7 @@ function d3_sunburst_graph($data, $width=700, $height=700, $return=false, $toolt
|
|||
}
|
||||
</style>';
|
||||
$output .= "<script language=\"javascript\" type=\"text/javascript\">
|
||||
sunburst('#sunburst', $data, '$width', '$height', '$tooltip');
|
||||
sunburst('$id_container', $data, '$width', '$height', '$tooltip');
|
||||
</script>";
|
||||
|
||||
if (!$return) {
|
||||
|
|
|
@ -433,7 +433,14 @@ class ServiceMapWidget extends Widget
|
|||
);
|
||||
} else {
|
||||
include_once $config['homedir'].'/include/graphs/functions_d3.php';
|
||||
servicemap_print_sunburst($this->values['serviceId'], $size['width'], $size['height'], false);
|
||||
$id_container = '#container_servicemap_'.$this->values['serviceId'].'_'.$this->cellId.' #sunburst';
|
||||
servicemap_print_sunburst(
|
||||
$this->values['serviceId'],
|
||||
$size['width'],
|
||||
$size['height'],
|
||||
false,
|
||||
$id_container
|
||||
);
|
||||
}
|
||||
|
||||
$output .= ob_get_clean();
|
||||
|
|
Loading…
Reference in New Issue