+ g4 = new Dygraph(
+ document.getElementById("demodiv_one"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ labelsKMB: true,
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ }
+ );
+
+ g5 = new Dygraph(
+ document.getElementById("demodiv_one_right"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ series : {
+ 'Y1': {
+ axis: 'y2'
+ },
+ 'Y2': {
+ axis: 'y2'
+ },
+ 'Y3': {
+ axis: 'y2'
+ },
+ 'Y4': {
+ axis: 'y2'
+ }
+ },
+ axes: {
+ y: {
+ // set axis-related properties here
+ drawGrid: false,
+ independentTicks: false
+ },
+ y2: {
+ // set axis-related properties here
+ labelsKMB: true,
+ drawGrid: true,
+ independentTicks: true
+ }
+ }
+ }
+ );
+