projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add the magic <meta> tag for IE8+9
[dygraphs.git]
/
tests
/
significant-figures.html
diff --git
a/tests/significant-figures.html
b/tests/significant-figures.html
index
271fe3e
..
ea1e4c4
100644
(file)
--- a/
tests/significant-figures.html
+++ b/
tests/significant-figures.html
@@
-1,5
+1,7
@@
+<!DOCTYPE html>
<html>
<head>
<html>
<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>significant figures</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
<title>significant figures</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
@@
-74,7
+76,7
@@
<br>
<br>
<br>
<br>
- <p>Check for correct number of significant figures with very
large and
small
+ <p>Check for correct number of significant figures with very small
y values. Both plots have the same input x,y values.</p>
<div id="smallvals1" style="width:600px; height:300px;"></div>
y values. Both plots have the same input x,y values.</p>
<div id="smallvals1" style="width:600px; height:300px;"></div>
@@
-84,15
+86,16
@@
<script type="text/javascript">
var data = [
<script type="text/javascript">
var data = [
- [
new Date("2009/12/01")
, 1.02e-7],
- [
new Date("2009/12/02")
, 1.1e-7],
- [
new Date("2009/12/03")
, 1.2e-7],
- [
new Date("2009/12/04")
, 1.522e-7]
+ [
2.036e-7
, 1.02e-7],
+ [
2.125e-7
, 1.1e-7],
+ [
2.212e-7
, 1.2e-7],
+ [
2.333e-7
, 1.522e-7]
];
new Dygraph(document.getElementById("smallvals1"), data,
{
labels: ["Date","CustomFormatting"],
];
new Dygraph(document.getElementById("smallvals1"), data,
{
labels: ["Date","CustomFormatting"],
+ xValueFormatter: function(x) { return x.toPrecision(4); },
yValueFormatter: function(x) { return x.toPrecision(3); }
});
yValueFormatter: function(x) { return x.toPrecision(3); }
});