2 * @fileoverview Test cases for how axis labels are chosen and formatted.
4 * @author dan@dygraphs.com (Dan Vanderkam)
6 var MultiCsvTestCase
= TestCase("multi-csv");
8 MultiCsvTestCase
.prototype.setUp
= function() {
9 document
.body
.innerHTML
= "<div id='graph'></div>";
12 MultiCsvTestCase
.prototype.tearDown
= function() {
15 function getXLabels() {
16 var x_labels
= document
.getElementsByClassName("dygraph-axis-label-x");
18 for (var i
= 0; i
< x_labels
.length
; i
++) {
19 ary
.push(x_labels
[i
].innerHTML
);
24 MultiCsvTestCase
.prototype.testOneCSV
= function() {
36 var graph
= document
.getElementById("graph");
37 var g
= new Dygraph(graph
, data
, opts
);
39 assertEquals(['0', '1', '2'], getXLabels());
42 MultiCsvTestCase
.prototype.testTwoCSV
= function() {
54 var graph
= document
.getElementById("graph");
55 var g
= new Dygraph(graph
, data
, opts
);
57 assertEquals(['0', '1', '2'], getXLabels());
59 g
.updateOptions({file
: data
});
61 assertEquals(['0', '1', '2'], getXLabels());