@@ -465,10 +465,9 @@ static public function parseGraphSeriesJS($seriesData, $label, $units, $linecolo
465465 * @param object $cfg jtg configuration object
466466 * @param object $params jtg parameters object
467467 * @param boolean $usepace use pace instead of speed
468- * @param boolean $showgraph show graph even if the settings in the params are off (used in plugin)
469468 * @param string $elementid id of element on the page where the graph is shown
470469 **/
471- static public function parseGraphJS ($ gpsTrack , $ cfg , $ params , $ usepace , $ showgraph = false , $ elementid ='elevation ' ) {
470+ static public function parseGraphJS ($ gpsTrack , $ cfg , $ params , $ usepace , $ elementid ='elevation ' ) {
472471 $ defaultlinecolor = "#000000 " ;
473472 $ bgColor = $ cfg ->charts_bg ? '# ' . $ cfg ->charts_bg :"#ffffff " ;
474473
@@ -477,15 +476,15 @@ static public function parseGraphJS($gpsTrack, $cfg, $params, $usepace, $showgra
477476
478477 $ axisnumber = 0 ;
479478
480- if ( ( $ showgraph OR $ params ->get ("jtg_param_show_heightchart " ) ) AND $ gpsTrack ->elevationDataExists )
479+ if ( $ params ->get ("jtg_param_show_heightchart " ) AND $ gpsTrack ->elevationDataExists )
481480 {
482481 $ charts_linec = $ cfg ->charts_linec ? '# ' . $ cfg ->charts_linec : $ defaultlinecolor ;
483482 $ axesJS [] = JtgMapHelper::parseGraphAxisJS (JText::_ ('COM_JTG_ELEVATION ' ), JText::_ ('COM_JTG_ELEVATION_UNIT ' ), $ charts_linec ,'false ' );
484483 $ seriesJS [] = JtgMapHelper::parseGraphSeriesJS ($ gpsTrack ->elevationData , JText::_ ('COM_JTG_ELEVATION ' ), JText::_ ('COM_JTG_ELEVATION_UNIT ' ), $ charts_linec , $ axisnumber );
485484 $ axisnumber ++;
486485 }
487486
488- if ( ( $ showgraph OR $ params ->get ("jtg_param_show_speedchart " ) ) AND $ gpsTrack ->speedDataExists )
487+ if ( $ params ->get ("jtg_param_show_speedchart " ) AND $ gpsTrack ->speedDataExists )
489488 {
490489 $ speedcharthide = 0 ;
491490 if ($ usepace )
@@ -508,7 +507,7 @@ static public function parseGraphJS($gpsTrack, $cfg, $params, $usepace, $showgra
508507 $ axisnumber ++;
509508 }
510509
511- if (( $ showgraph OR $ params ->get ("jtg_param_show_speedchart " ) ) AND $ gpsTrack ->beatDataExists )
510+ if ($ params ->get ("jtg_param_show_speedchart " ) AND $ gpsTrack ->beatDataExists )
512511 {
513512 // Beatchart is on left (first) axis or on right axis when there is a heighchart or a speed chart
514513 $ beatchartaxis = $ axisnumber + 1 ;
@@ -540,7 +539,7 @@ static public function parseGraphJS($gpsTrack, $cfg, $params, $usepace, $showgra
540539 $ autocenter = (bool ) $ params ->get ("jtg_param_use_map_autocentering " , true ) ? 'true ' :'false ' ;
541540 if (! (bool ) $ params ->get ("jtg_param_disable_map_animated_cursor " , false )) $ animatedCursor = 'true, animatedCursorLayer, animatedCursorIcon, allpoints ' ; else $ animatedCursor ='false ' ;
542541 $ graphJS .= '<script type="text/javascript"> ' ."\n" .
543- "makeGraph(' $ elementid',jtgAxes, jtgSeries, ' " .JText::_ ('COM_JTG_DISTANCE ' )."', ' " .JText::_ ('COM_JTG_DISTANCE_UNIT_ ' .strtoupper ($ cfg ->unit ))."', ' $ clicktohide', ' $ bgColor', ' $ autocenter' , $ animatedCursor); \n" .
542+ "makeGraph(' $ elementid',jtgAxes, jtgSeries, ' " .JText::_ ('COM_JTG_DISTANCE ' )."', ' " .JText::_ ('COM_JTG_DISTANCE_UNIT_ ' .strtoupper ($ cfg ->unit ))."', ' $ clicktohide', ' $ bgColor', $ autocenter, $ animatedCursor); \n" .
544543 "</script> \n" ;
545544 }
546545 return $ graphJS ;
0 commit comments