|
From: <var...@us...> - 2021-09-28 15:43:35
|
Revision: 10598
http://sourceforge.net/p/phpwiki/code/10598
Author: vargenau
Date: 2021-09-28 15:43:33 +0000 (Tue, 28 Sep 2021)
Log Message:
-----------
Chart plugin: new argument "legend"
Modified Paths:
--------------
trunk/lib/plugin/Chart.php
Modified: trunk/lib/plugin/Chart.php
===================================================================
--- trunk/lib/plugin/Chart.php 2021-09-28 15:43:02 UTC (rev 10597)
+++ trunk/lib/plugin/Chart.php 2021-09-28 15:43:33 UTC (rev 10598)
@@ -63,7 +63,7 @@
// 'xlabel' => 'x', // TODO
// 'ylabel' => 'y', // TODO
'color' => 'green',
- // 'legend' => false, // TODO
+ 'legend' => '',
'data' => false // required
);
}
@@ -90,7 +90,7 @@
}
extract($args);
- $html = HTML();
+ $html = HTML::figure();
$js = JavaScript('', array('src' => $WikiTheme->_findData('ASCIIsvg.js')));
$html->pushContent($js);
@@ -156,6 +156,9 @@
'script' => $source);
$embed = new SVG_HTML("embed", $embedargs);
$html->pushContent($embed);
+ if (isset($legend) && ($legend != '')) {
+ $html->pushContent(HTML::figcaption($legend));
+ }
return $html;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|