assertEquals(1, results.y2["Y3"]);
assertEquals(1, results.y2["Y4"]);
};
-
-MultipleAxesTestCase.prototype.testDrawHighlightPointCallback = function() {
- var data = MultipleAxesTestCase.getData();
-
- var results = { y : {}, y2 : {}};
- var firstCallback = function(g, seriesName) {
- results.y[seriesName] = 1;
- };
- var secondCallback = function(g, seriesName) {
- results.y2[seriesName] = 1;
- };
-
- g = new Dygraph(
- document.getElementById("graph"),
- data,
- {
- labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- drawPoints : true,
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- },
- axes: {
- y2: {
- drawHighlightPointCallback: secondCallback
- }
- },
- drawHighlightPointCallback: firstCallback
- }
- );
-
- assertEquals(1, results.y["Y1"]);
- assertEquals(1, results.y["Y2"]);
- assertEquals(1, results.y2["Y3"]);
- assertEquals(1, results.y2["Y4"]);
-};