Skip to content

Commit

Permalink
histograph barwidth option
Browse files Browse the repository at this point in the history
  • Loading branch information
Trystan committed Apr 13, 2013
1 parent cd651dd commit 9f68f6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Modules/sap
Modules/time
Modules/rss
Modules/adminusers
Modules/feedconvert
5 changes: 4 additions & 1 deletion Modules/vis/visualisations/histgraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<?php
global $path, $embed;
if (!$feedid) $feedid = 0;

if (!$barwidth) $barwidth = 50;
?>

<!--[if IE]><script language="javascript" type="text/javascript" src="<?php echo $path;?>Lib/flot/excanvas.min.js"></script><![endif]-->
Expand All @@ -40,6 +42,7 @@

<script id="source" language="javascript" type="text/javascript">
//--------------------------------------------------------------------------------------
var barwidth = "<?php echo $barwidth; ?>"; //Fetch table name
var feedid = "<?php echo $feedid; ?>"; //Fetch table name
var path = "<?php echo $path; ?>";
var apikey = "<?php echo $apikey; ?>";
Expand Down Expand Up @@ -77,7 +80,7 @@ function plotGraph()
$.plot(placeholder,[
{
data: graph_data , //data
bars: { show: true, align: "center", barWidth: 50, fill: true }
bars: { show: true, align: "center", barWidth: barwidth, fill: true }
}], {
xaxis: { mode: null }, grid: { show: true, hoverable: true }
});
Expand Down

0 comments on commit 9f68f6d

Please sign in to comment.