Style cleanup and converting spaces to tabs.

pull/1/head
David Schnur 14 years ago
parent 04f4ac25b8
commit 701f2f6e41

@ -9,29 +9,34 @@
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
</head>
<body>
<h1>Flot Examples</h1>
<div id="placeholder" style="width:600px;height:300px"></div>
<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. The idea is that Flot goes to great
lengths to provide sensible defaults so that you don't have to
customize much for a good result.</p>
<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. The idea is that Flot goes to great lengths to provide sensible
defaults so that you don't have to customize much for a good result.</p>
<script type="text/javascript">
$(function () {
var d1 = [];
for (var i = 0; i < Math.PI * 2; i += 0.25)
for ( var i = 0; i < Math.PI * 2; i += 0.25 ) {
d1.push([ i, Math.sin( i ) ]);
}
var d2 = [];
for (var i = 0; i < Math.PI * 2; i += 0.25)
for (var i = 0; i < Math.PI * 2; i += 0.25) {
d2.push([ i, Math.cos( i ) ]);
}
var d3 = [];
for (var i = 0; i < Math.PI * 2; i += 0.1)
for (var i = 0; i < Math.PI * 2; i += 0.1) {
d3.push([ i, Math.tan( i ) ]);
}
$.plot( $("#placeholder"), [
{ label: "sin(x)", data: d1 },
@ -43,7 +48,10 @@ $(function () {
points: { show: true }
},
xaxis: {
ticks: [0, [Math.PI/2, "\u03c0/2"], [Math.PI, "\u03c0"], [Math.PI * 3/2, "3\u03c0/2"], [Math.PI * 2, "2\u03c0"]]
ticks: [
0, [ Math.PI/2, "\u03c0/2" ], [ Math.PI, "\u03c0" ],
[ Math.PI * 3/2, "3\u03c0/2" ], [ Math.PI * 2, "2\u03c0" ]
]
},
yaxis: {
ticks: 10,
@ -56,6 +64,7 @@ $(function () {
}
});
});
</script>
</body>

Loading…
Cancel
Save