X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Ftwo-axes-vr.html;h=b714b36e06926a7b273953525d4116e29149e22c;hb=ca8c85838e6a98c17d7f62bb4e3f43e9244b1385;hp=0646b9a24e0baefdef961530077892f9a99f11c4;hpb=21ebe38bb1eeae3a7fd73335a411bfd81c66d985;p=dygraphs.git
diff --git a/tests/two-axes-vr.html b/tests/two-axes-vr.html
index 0646b9a..b714b36 100644
--- a/tests/two-axes-vr.html
+++ b/tests/two-axes-vr.html
@@ -1,16 +1,12 @@
-
Multiple y-axes with valueRange
-
-
+
@@ -43,13 +39,8 @@
{
labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
series : {
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- }
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
valueRange: [40, 70],
axes: {
@@ -59,8 +50,7 @@
}
},
ylabel: 'Primary y-axis',
- y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ y2label: 'Secondary y-axis'
}
);
@@ -70,13 +60,8 @@
{
labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
series : {
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- }
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
axes: {
y: {
@@ -89,27 +74,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' ],
series : {
- 'Y3': {
- axis: {
- }
- },
- 'Y4': {
- axis: 'Y3' // use the same y-axis as series Y3
- }
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
},
axes: {
y: {
- valueRange: [40, 80]
+ valueRange: [40, 80],
+ axisLabelWidth: 60
},
y2: {
// set axis-related properties here
@@ -118,8 +103,7 @@
}
},
ylabel: 'Primary y-axis',
- y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ y2label: 'Secondary y-axis'
}
);