1 $(document
).ready(function() {
2 $("#histogram_form").bind('submit', function() {
4 return check_form_values();
7 var previousPoint
= null;
8 $("#histogram_graph").bind("plothover", function (event
, pos
, item
) {
9 $("#x").text(pos
.x
.toFixed(2));
10 $("#y").text(pos
.y
.toFixed(2));
13 if (previousPoint
!= item
.datapoint
) {
14 previousPoint
= item
.datapoint
;
16 $("#tooltip").remove();
17 var x
= item
.datapoint
[0].toFixed(0),
18 y
= item
.datapoint
[1].toFixed(0);
20 showTooltip(item
.pageX
, item
.pageY
,
21 item
.series
.label
+ ": " + y
+ " (" + get_label(x
) + ")");
22 //item.series.label + " of " + get_label(x) + " = " + y);
25 $("#tooltip").remove();
29 $("#report_period").bind('change', function() {
30 show_calendar($(this).attr('value'));
33 $('#show_all_objects').click(function() {
34 $('#all_objects').toggle('slow');
41 return graph_xlables
[x
];
44 function showTooltip(x
, y
, contents
) {
45 $('<div id="tooltip">' + contents
+ '</div>').css( {
50 border
: '1px solid #fdd',
52 'background-color': '#fee',
54 }).appendTo("body").fadeIn(200);