Sha256: 4d256851ac084c40f45af363351bf09dbcea15c855f8b25085125b9a7d3ab33e

Contents?: true

Size: 1.69 KB

Versions: 2

Compression:

Stored size: 1.69 KB

Contents

<!doctype html>  

<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<title>flot.tooltip plugin example page</title>
	<meta name="author" content="@krzysu, myviews.pl">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
    <!--[if lte IE 8]><script src="../js/excanvas.min.js"></script><![endif]-->
	<script src="js/jquery.flot.js"></script>
	<script src="../js/jquery.flot.tooltip.js"></script>
	
	<style type="text/css">
		body {font-family: sans-serif; font-size: 16px; margin: 50px; max-width: 800px;}
		#flotTip {}
	</style>
</head>

<body>
    <h1>flot.tooltip plugin example page</h1>

    <div id="placeholder" style="width: 825px; height: 150px;"></div>
	<a href="javascript:void(0);" class="button" id="replot">Plot</a>

	<script type="text/javascript">
	$(document).ready(function(){
		
		plot();
		
		function plot(){
			var values = [ [0.75, 123], [1, 550], [2.823695, 320], [3, 700],[4,17000],[5,300] ]
		
			var options = {
				series: {
					lines: { show: true },
					points: { show: true }
				},
				grid: {
					hoverable: true //IMPORTANT! this is needed for tooltip to work
				},
				yaxis:{
                                    tickFormatter: function(val, axis) {
					  return '$' + val.toLocaleString()+"$";
				    },
				},
				tooltip: {
					show: true,
					content: "%s of %x.2 is %y",
					shifts: {
						x: -60,
						y: 25
					}
				}
			};
		
			var plotObj = $.plot( $("#placeholder"),
				[ { data: values, label: "Series 1"}],
				options );
		}
	});
	</script>

</body>
</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_modular_admin-1.0.0 app/assets/node_modules/jquery.flot.tooltip/examples/dollar_in_tickformatter.html
rails_modular_admin-0.4.0 app/assets/node_modules/jquery.flot.tooltip/examples/dollar_in_tickformatter.html