X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Ftwo-axes-vr.html;h=c1ebfb2886615b98ff1345b30c43b64adeec516f;hb=6ed703fd07b53ca7e51526407661f3bce416dcc0;hp=5814435eca936cc23b97b15c056ad5204ab5ef07;hpb=5b6d85fdd7b79dc62886a67a08fb9019c98f796c;p=dygraphs.git
diff --git a/tests/two-axes-vr.html b/tests/two-axes-vr.html
index 5814435..c1ebfb2 100644
--- a/tests/two-axes-vr.html
+++ b/tests/two-axes-vr.html
@@ -1,16 +1,13 @@
-
+
Multiple y-axes with valueRange
-
-
+
@@ -42,12 +39,9 @@
data,
{
labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
+ series : {
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
valueRange: [40, 70],
axes: {
@@ -57,8 +51,7 @@
}
},
ylabel: 'Primary y-axis',
- y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ y2label: 'Secondary y-axis'
}
);
@@ -67,12 +60,9 @@
data,
{
labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
+ series : {
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
axes: {
y: {
@@ -85,25 +75,27 @@
},
ylabel: 'Primary y-axis',
y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ axes: {
+ y: {
+ axisLabelWidth: 60
+ }
+ }
}
);
- g2 = new Dygraph(
+ g3 = new Dygraph(
document.getElementById("demodiv_two"),
data,
{
labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
+ series : {
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
axes: {
y: {
- valueRange: [40, 80]
+ valueRange: [40, 80],
+ axisLabelWidth: 60
},
y2: {
// set axis-related properties here
@@ -112,8 +104,7 @@
}
},
ylabel: 'Primary y-axis',
- y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ y2label: 'Secondary y-axis'
}
);