[Fusionforge-commits] r19346 - trunk/src/common/reporting

Marc-Etienne VARGENAU vargenau at fusionforge.org
Mon Mar 3 18:47:15 CET 2014


Author: vargenau
Date: 2014-03-03 18:47:15 +0100 (Mon, 03 Mar 2014)
New Revision: 19346

Modified:
   trunk/src/common/reporting/report_utils.php
Log:
Use <figure> and <figcaption>

Modified: trunk/src/common/reporting/report_utils.php
===================================================================
--- trunk/src/common/reporting/report_utils.php	2014-03-03 17:42:33 UTC (rev 19345)
+++ trunk/src/common/reporting/report_utils.php	2014-03-03 17:47:15 UTC (rev 19346)
@@ -357,7 +357,10 @@
 		plot'.$chartid.'.replot();
 		});'."\n";
 	echo '//]]></script>';
+	echo "<figure>\n";
+	echo "<figcaption>"._('Tracker Activity').' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 	echo '<div id="chart'.$chartid.'"></div>';
+	echo "</figure>\n";
 	return true;
 }
 
@@ -392,7 +395,6 @@
 	echo 'jQuery(document).ready(function(){
 		plot'.$chartid.' = jQuery.jqplot (\'chart'.$chartid.'\', [data],
 			{
-				title : \''.$areaname." (".strftime('%x',$start) ." - ". strftime('%x',$end) .")".'\',
 				seriesDefaults: {
 					// Make this a pie chart.
 					renderer: jQuery.jqplot.PieRenderer,
@@ -413,7 +415,10 @@
 			plot'.$chartid.'.replot( { resetAxes: true } );
 		});'."\n";
 	echo '//]]></script>';
+	echo "<figure>\n";
+	echo "<figcaption>".$areaname.' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 	echo '<div id="chart'.$chartid.'"></div>';
+	echo "</figure>\n";
 	return true;
 }
 
@@ -560,7 +565,6 @@
 			axes: {
 				xaxis: {
 					renderer: jQuery.jqplot.CategoryAxisRenderer,
-					label: \''.$label[0].'\',
 				},
 				yaxis: {
 					max: '.++$yMax.',
@@ -583,7 +587,10 @@
 			plot'.$chartid.'.replot( { resetAxes: true } );
 		});'."\n";
 	echo '//]]></script>';
+	echo "<figure>\n";
+	echo "<figcaption>".$label[0].' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 	echo '<div id="chart'.$chartid.'"></div>';
+	echo "</figure>\n";
 	return true;
 }
 
@@ -785,7 +792,7 @@
 			}
 			break;
 		}
-		case REPORT_TYPE_WEEKLY : {
+		case REPORT_TYPE_WEEKLY: {
 			for ($j = 0; $j < count($rdates); $j++) {
 				$wrdates[$j] = date($formatDate, $rdates[$j]);
 			}
@@ -818,7 +825,6 @@
 	}
 	echo 'jQuery(document).ready(function(){
 			plot'.$chartid.' = jQuery.jqplot (\'chart'.$chartid.'\', series, {
-				title : \''.$areaname.' ('.strftime('%x', $start).' - '.strftime('%x', $end).') \',
 				axesDefaults: {
 					tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
 					tickOptions: {
@@ -871,7 +877,10 @@
 		plot'.$chartid.'.replot();
 	});'."\n";
 	echo '//]]></script>';
+	echo "<figure>\n";
+	echo "<figcaption>".$areaname.' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 	echo '<div id="chart'.$chartid.'"></div>';
+	echo "</figure>\n";
 	return true;
 }
 
@@ -953,7 +962,6 @@
 		echo 'jQuery(document).ready(function(){
 			plot'.$chartid.' = jQuery.jqplot (\'chart'.$chartid.'\', [data'.$chartid.'],
 				{
-					title : \''.$arr[$datatype].' ('.strftime('%x', $start) .' - '. strftime('%x', $end) .')\',
 					seriesDefaults: {
 						renderer: jQuery.jqplot.PieRenderer,
 						rendererOptions: {
@@ -973,7 +981,10 @@
 				plot'.$chartid.'.replot( { resetAxes: true } );
 			});'."\n";
 		echo '//]]></script>';
+		echo "<figure>\n";
+		echo "<figcaption>".$arr[$datatype].' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 		echo '<div id="chart'.$chartid.'"></div>';
+		echo "</figure>\n";
 	} else {
 		echo '<p class="information" >'._('No data to display.').'</p>';
 	}
@@ -1019,7 +1030,6 @@
 		echo 'jQuery(document).ready(function(){
 			plot'.$chartid.' = jQuery.jqplot (\'chart'.$chartid.'\', [data'.$chartid.'],
 				{
-					title : \''.$arr[$area].' ('.strftime('%x', $start) .' - '. strftime('%x', $end) .')\',
 					seriesDefaults: {
 						renderer: jQuery.jqplot.PieRenderer,
 						rendererOptions: {
@@ -1037,7 +1047,10 @@
 				plot'.$chartid.'.replot( { resetAxes: true } );
 			});'."\n";
 		echo '//]]></script>';
+		echo "<figure>\n";
+		echo "<figcaption>".$arr[$area].' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 		echo '<div id="chart'.$chartid.'"></div>';
+		echo "</figure>\n";
 	} else {
 		echo '<p class="information" >'._('No data to display.').'</p>';
 	}
@@ -1087,7 +1100,6 @@
 		}
 		echo 'jQuery(document).ready(function(){
 				plot'.$chartid.' = jQuery.jqplot (\'chart'.$chartid.'\', series, {
-					title : \''.$areaname.' ('.strftime('%x', $start).' - '.strftime('%x', $end).') \',
 					axesDefaults: {
 						tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
 						tickOptions: {
@@ -1140,7 +1152,10 @@
 			plot'.$chartid.'.replot();
 		});'."\n";
 		echo '//]]></script>';
+		echo "<figure>\n";
+		echo "<figcaption>".$areaname.' ('.date(_('Y-m-d'), $start).' - '.date(_('Y-m-d'), $end).')'."</figcaption>\n";
 		echo '<div id="chart'.$chartid.'"></div>';
+		echo "</figure>\n";
 	} else {
 		echo '<p class="information">'._('No data to display.').'</p>';
 	}




More information about the Fusionforge-commits mailing list