projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CSS "reset" to fix Issue 429
[dygraphs.git]
/
auto_tests
/
tests
/
Util.js
diff --git
a/auto_tests/tests/Util.js
b/auto_tests/tests/Util.js
index
66daa7f
..
2b308b3
100644
(file)
--- a/
auto_tests/tests/Util.js
+++ b/
auto_tests/tests/Util.js
@@
-54,7
+54,8
@@
Util.getClassTexts = function(css_class, parent) {
Util.getLegend = function(parent) {
parent = parent || document;
var legend = parent.getElementsByClassName("dygraph-legend")[0];
Util.getLegend = function(parent) {
parent = parent || document;
var legend = parent.getElementsByClassName("dygraph-legend")[0];
- return legend.textContent;
+ var re = new RegExp(String.fromCharCode(160), 'g');
+ return legend.textContent.replace(re, ' ');
};
/**
};
/**
@@
-66,3
+67,15
@@
Util.assertStyleOfChildren = function(selector, property, expectedValue) {
assertEquals(expectedValue, $(child).css(property));
});
};
assertEquals(expectedValue, $(child).css(property));
});
};
+
+
+/**
+ * Takes in an array of strings and returns an array of floats.
+ */
+Util.makeNumbers = function(ary) {
+ var ret = [];
+ for (var i = 0; i < ary.length; i++) {
+ ret.push(parseFloat(ary[i]));
+ }
+ return ret;
+};