- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- }
- }
- );
-
- assertEquals(["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"], getYLabelsForAxis("1"));
- assertEquals(["900K", "1.01M", "1.12M", "1.23M", "1.34M", "1.45M", "1.55M", "1.66M", "1.77M", "1.88M", "1.99M"], getYLabelsForAxis("2"));
-};
-
-MultipleAxesTestCase.prototype.testNewStylePerAxisOptions = function() {
- var data = MultipleAxesTestCase.getData();
-
- var g = new Dygraph(
- document.getElementById("graph"),
- data,
- {
- labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- width: 640,
- height: 350,
- 'Y3': {
- axis: { }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- },
- axes: {
- y2: {
- labelsKMB: true
- }
- }
- }
- );
-
- assertEquals(["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"], getYLabelsForAxis("1"));
- assertEquals(["900K", "1.01M", "1.12M", "1.23M", "1.34M", "1.45M", "1.55M", "1.66M", "1.77M", "1.88M", "1.99M"], getYLabelsForAxis("2"));
-};
-
-MultipleAxesTestCase.prototype.testMultiAxisLayout = function() {
- var data = MultipleAxesTestCase.getData();
-
- var el = document.getElementById("graph");
-
- var g = new Dygraph(
- el,
- data,
- {
- labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- width: 640,
- height: 350,
- 'Y3': {
- axis: { }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- },
- axes: {
- y2: {