Show values of all dataset when mouse is over graph.

This commit is contained in:
Darold Gilles 2014-01-31 10:16:23 +01:00
parent 18e15a61f9
commit 06cdeaa3d1
3 changed files with 59 additions and 7188 deletions

View File

@ -3581,6 +3581,17 @@ sub flotr2_bargraph
};
$numticks = 24;
}
my $dateTracker_lblopts = '';
map { if (/label: "([^"]+)"/) { $dateTracker_lblopts .= "'$1',"; } } @legend;
$dateTracker_lblopts =~ s/,$//;
$dateTracker_lblopts = "[$dateTracker_lblopts]";
my $dateTracker_dataopts = '';
map { if (/var (d\d+) =/) { $dateTracker_dataopts .= "$1,"; } } @data;
$dateTracker_dataopts =~ s/,$//;
$dateTracker_dataopts = "[$dateTracker_dataopts]";
return <<EOF;
<div id="$divid"></div>
<script type="text/javascript">
@ -3596,7 +3607,7 @@ $month_array
mouse: {
track: true,
relative: true,
trackFormatter: function(obj){ return dateTracker(obj,'$xtype') },
trackFormatter: function(obj){ return dateTracker(obj,'$xtype',$dateTracker_lblopts,$dateTracker_dataopts) },
},
yaxis: {
min: 0,

File diff suppressed because one or more lines are too long

View File

@ -146,3 +146,16 @@ div.tooltipLink div.tooltip th { font-size:10px; }
div.tooltipLink div.tooltip td { font-size:9px; font-weight:normal; padding:1px; }
div.tooltipLink:hover div.tooltip { display:block; z-index:20; position:absolute; top:1.5em; left:2em; }
.mfigure {
font-weight: bold;
font-size: 1.2em;
/*color:#d26115;*/
color:#76add2;
}
.mfigure small {
font-weight: bold;
font-size: 0.6em;
color:#ffffff;
}