'; $output .= ''; $output .= ''; } if (!$return) { echo $output; } return $output; } function d3_relationship_graph($elements, $matrix, $width=700, $return=false, $height=700) { global $config; if (is_array($elements)) { $elements = json_encode($elements); } if (is_array($matrix)) { $matrix = json_encode($matrix); } $output = '
'; $output .= include_javascript_d3(true); $output .= ""; if (!$return) { echo $output; } return $output; } function d3_tree_map_graph($data, $width=700, $height=700, $return=false, $id_container='tree_map', $child_links=false) { global $config; if (is_array($data)) { $data = json_encode($data); } $output = '
"; $output .= include_javascript_d3(true); $output .= ''; $output .= ""; if ($child_links === true) { $output .= html_print_input_image( 'resize_parent', '/images/normal_screen.png', 1, 'background-color: white !important; padding: 4px !important;', true, ['class' => 'resize_button invisible'] ); } if (!$return) { echo $output; } return $output; } function d3_sunburst_graph($data, $width=700, $height=700, $return=false, $tooltip=true, $id_container=false) { global $config; if (is_array($data)) { $data = json_encode($data); } $id_container = ($id_container === false) ? '#sunburst' : $id_container; $output = "
"; $output .= include_javascript_d3(true); $output .= ''; $output .= ""; if (!$return) { echo $output; } return $output; } function d3_bullet_chart( $chart_data, $width, $height, $color, $legend, $homeurl, $unit, $font, $font_size ) { global $config; $output = ''; $output .= include_javascript_d3(true); $output .= ''; $id_bullet = uniqid(); $font = array_shift(explode('.', array_pop(explode('/', $font)))); $invert_color = ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $invert_color = 'filter: invert(100%);'; } $output .= '
'; return $output; } function d3_gauges( $chart_data, $width, $height, $color, $legend, $homeurl, $unit, $font, $font_size, $no_data_image, $transitionDuration ) { global $config; if (is_array($chart_data)) { $data = json_encode($chart_data); } $output = include_javascript_d3(true); foreach ($chart_data as $module) { $output .= "
"; } $output .= ""; return $output; } function ux_console_phases_donut( $phases, $id, $width=800, $height=500, $return=false ) { global $config; foreach ($phases as $i => $phase) { $phases[$i]['phase_name'] = io_safe_output($phase['phase_name']); } if (is_array($phases)) { $phases = json_encode($phases); } $recipient_name = 'phases_donut_'.$id; $recipient_name_to_js = '#phases_donut_'.$id; $output = '
"; $output .= include_javascript_d3(true); $output .= ''; $output .= "'; if ($return === false) { echo $output; } return $output; } function d3_progress_bar( $id, $percentile, $width, $height, $color, $unit='%', $text='', $fill_color='#FFFFFF', $radiusx=10, $radiusy=10, $transition=1 ) { global $config; $recipient_name = 'progress_bar_'.$id; $recipient_name_to_js = '#progress_bar_'.$id; $output = ''; $output .= '
"; $output .= include_javascript_d3(true); $output .= "'; return $output; } function d3_progress_bubble($id, $percentile, $width, $height, $color, $unit='%', $text='', $fill_color='#FFFFFF') { global $config; $recipient_name = 'progress_bubble_'.$id; $recipient_name_to_js = '#progress_bubble_'.$id; $output = ''; $output .= '
"; $output .= include_javascript_d3(true); $output .= ""; return $output; } function progress_circular_bar($id, $percentile, $width, $height, $color, $unit='%', $text='', $fill_color='#FFFFFF', $transition=1) { global $config; $recipient_name = 'circular_progress_bar_'.$id; $recipient_name_to_js = '#circular_progress_bar_'.$id; $output = ''; $output .= '
"; $output .= include_javascript_d3(true); $output .= ""; return $output; } function progress_circular_bar_interior($id, $percentile, $width, $height, $color, $unit='%', $text='', $fill_color='#FFFFFF') { global $config; $recipient_name = 'circular_progress_bar_interior_'.$id; $recipient_name_to_js = '#circular_progress_bar_interior_'.$id; $output = ''; $output .= '
"; $output .= include_javascript_d3(true); $output .= ""; return $output; } function d3_donut_graph($id, $width, $height, $module_data, $resume_color) { global $config; $module_data = json_encode($module_data); $recipient_name = 'donut_graph_'.$id; $recipient_name_to_js = '#donut_graph_'.$id; $output = ''; $output .= '
"; $output .= include_javascript_d3(true); $output .= ''; $output .= ""; return $output; } function print_clock_analogic_1( $time_format, $timezone, $clock_animation, $width, $height, $id_element, $color, $title=true ) { $output = ''; $tz = $timezone; $timestamp = time(); $dt = new DateTime('now', new DateTimeZone($tz)); // first argument "must" be a string. $dt->setTimestamp($timestamp); // adjust the object to correct timestamp. $dateTimeZoneOption = new DateTimeZone(date_default_timezone_get()); $dateTimeZonePandora = new DateTimeZone($timezone); $dateTimeOption = new DateTime('now', $dateTimeZoneOption); $dateTimePandora = new DateTime('now', $dateTimeZonePandora); $timeOffset = $dateTimeZonePandora->getOffset($dateTimeOption); $output .= include_javascript_d3(true); if ($width == 0) { $date_width = 200; } else { $date_width = $width; } if ($title === true) { $output .= '
'; if ($time_format == 'timedate') { $output .= $dt->format('d / m / Y').' - '; } $output .= $dt->format('a').'
'; $timezone_short = explode('/', $timezone); $timezone_short_end = end($timezone_short); $output .= '
'.$timezone_short_end.'
'; } $output .= ""; return $output; } function print_clock_digital_1($time_format, $timezone, $clock_animation, $width, $height, $id_element, $color) { global $config; $output .= ''; $output .= include_javascript_d3(true); $tz = $timezone; $timestamp = time(); $dt = new DateTime('now', new DateTimeZone($tz)); // first argument "must" be a string $dt->setTimestamp($timestamp); // adjust the object to correct timestamp $dateTimeZoneOption = new DateTimeZone(date_default_timezone_get()); $dateTimeZonePandora = new DateTimeZone($timezone); $dateTimeOption = new DateTime('now', $dateTimeZoneOption); $dateTimePandora = new DateTime('now', $dateTimeZonePandora); $timeOffset = $dateTimeZonePandora->getOffset($dateTimeOption); $output .= include_javascript_d3(true); if ($width == 0) { $date_width = 200; } else { $date_width = $width; } if ($time_format == 'timedate') { $output .= '
'; $output .= $dt->format('d / m / Y').'
'; } $output .= ' '; $output .= ""; $timezone_short = explode('/', $timezone); $timezone_short_end = end($timezone_short); $output .= '
'.$timezone_short_end.'
'; return $output; }