shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

index.html (2342B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
      2 <html>
      3 <head>
      4 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      5 	<title>Flot Examples: Basic Options</title>
      6 	<link href="../examples.css" rel="stylesheet" type="text/css">
      7 	<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
      8 	<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
      9 	<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
     10 	<script type="text/javascript">
     11 
     12 	$(function () {
     13 
     14 		var d1 = [];
     15 		for (var i = 0; i < Math.PI * 2; i += 0.25) {
     16 			d1.push([i, Math.sin(i)]);
     17 		}
     18 
     19 		var d2 = [];
     20 		for (var i = 0; i < Math.PI * 2; i += 0.25) {
     21 			d2.push([i, Math.cos(i)]);
     22 		}
     23 
     24 		var d3 = [];
     25 		for (var i = 0; i < Math.PI * 2; i += 0.1) {
     26 			d3.push([i, Math.tan(i)]);
     27 		}
     28 
     29 		$.plot("#placeholder", [
     30 			{ label: "sin(x)", data: d1 },
     31 			{ label: "cos(x)", data: d2 },
     32 			{ label: "tan(x)", data: d3 }
     33 		], {
     34 			series: {
     35 				lines: { show: true },
     36 				points: { show: true }
     37 			},
     38 			xaxis: {
     39 				ticks: [
     40 					0, [ Math.PI/2, "\u03c0/2" ], [ Math.PI, "\u03c0" ],
     41 					[ Math.PI * 3/2, "3\u03c0/2" ], [ Math.PI * 2, "2\u03c0" ]
     42 				]
     43 			},
     44 			yaxis: {
     45 				ticks: 10,
     46 				min: -2,
     47 				max: 2,
     48 				tickDecimals: 3
     49 			},
     50 			grid: {
     51 				backgroundColor: { colors: [ "#fff", "#eee" ] },
     52 				borderWidth: {
     53 					top: 1,
     54 					right: 1,
     55 					bottom: 2,
     56 					left: 2
     57 				}
     58 			}
     59 		});
     60 
     61 		// Add the Flot version string to the footer
     62 
     63 		$("#footer").prepend("Flot " + $.plot.version + " &ndash; ");
     64 	});
     65 
     66 	</script>
     67 </head>
     68 <body>
     69 
     70 	<div id="header">
     71 		<h2>Basic Options</h2>
     72 	</div>
     73 
     74 	<div id="content">
     75 
     76 		<div class="demo-container">
     77 			<div id="placeholder" class="demo-placeholder"></div>
     78 		</div>
     79 
     80 		<p>There are plenty of options you can set to control the precise looks of your plot. You can control the ticks on the axes, the legend, the graph type, etc.</p>
     81 
     82 		<p>Flot goes to great lengths to provide sensible defaults so that you don't have to customize much for a good-looking result.</p>
     83 
     84 	</div>
     85 
     86 	<div id="footer">
     87 		Copyright &copy; 2007 - 2013 IOLA and Ole Laursen
     88 	</div>
     89 
     90 </body>
     91 </html>