testNullFencepost.htm 1.64 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<hmtl>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>CurvedLines Plugin for flot</title>
		<script language="javascript" type="text/javascript" src="../flot/jquery.min.js"></script>
		<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../flot/excanvas.min.js"></script><![endif]-->
		<script language="javascript" type="text/javascript" src="../flot/jquery.flot.min.js"></script>
		<script language="JavaScript" type="text/javascript" src="../curvedLines.js"></script>
		<script language="JavaScript" type="text/javascript" src="_TestSetup.js"></script>
		<link rel="stylesheet" type="text/css" href="_TestSetup.css"></link>
	</head>
	<body>
		<div id="placeholder" style="width: 800;height: 400;"></div>
		<div id="parameters" style="width: 800"></div>

		<script id="source" language="javascript" type="text/javascript">
			$(function() {
				//data	fencepost
				var d1 = [[null, 200], [40, 60], [50,30], [80, 80], [90, 80], [200, null]];

				//general plot options
				var options = {
					series : {
						curvedLines : {
							active : true
						}
					}
				};
				
				//curved line paramters
				var defaultParameters = {
					apply: true,
33
					legacyOverride: true
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
				}

				//plot function
				function replot(parameters) {
					$.plot($("#placeholder"), [{
						data : d1,
						lines : {
							show : true,
							lineWidth : 3
						},
						curvedLines : parameters
					}, {
						data : d1,
						points : {
							show : true
						}
					}], options);
				}
				
				//combine everything
				TestSetup($("#parameters"), defaultParameters, [replot])
			});
		</script>
	</body>

</hmtl>