I'm trying to create a line graph with some series displayed on the LHS axis ("y") and some series on the RHS axis ("other y"):
//Init chart and set theme
var myChart = new Chart("graphDiv")
myChart.setTheme(theme)
//Add plot for LHS axis
myChart.addPlot("default", {
type: Lines,
markers: true,
hAxis: "x",
vAxis: "y"
})
//Add additional plot for RHS axis
myChart.addPlot("other", {
type: Lines,
markers: true,
hAxis: "x",
vAxis: "other y"
})
//Add axis
myChart.addAxis("x", {
fixUpper: "major",
fixLower:"minor"
})
myChart.addAxis("y", {
title: "Y Axis Left",
vertical: true,
fixUpper: "major",
fixLower:"minor"
})
myChart.addAxis("other y", {
title: "Y Axis Right",
vertical: true,
leftBottom: false,
fixUpper: "major",
fixLower:"minor",
})
//Add the data
myChart.addSeries('test1',[{x:1,y:2},{x:2,y:2},{x:3,y:2},{x:4,y:2}],{plot:'default'})
myChart.addSeries('test2',[{x:1,y:3},{x:2,y:3},{x:3,y:3},{x:4,y:3}],{plot:'default'})
myChart.addSeries('test3',[{x:1,'other y':5},{x:2,'other y':5},{x:3,'other y':5}, x:4,'other y':5}],{plot:'other'})
myChart.render()
The second axis is not rendered and the data for the second plot ("other") is not rendered. However, if I console.log(myChart)
I can see in myChart.series that all the data is there! There are no errors in the console window, I'm using Dojo 1.9 and chrome.
Any ideas what I'm doing wrong?