0
我试图用一些系列在LHS轴(“Y”)显示给创建的线图和在RHS轴线一些系列(“其他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()
第二个轴未呈现,第二个绘图(“其他”)的数据未呈现。但是,如果我可以在myChart.series中看到所有数据都在那里!在控制台窗口中没有错误,我正在使用Dojo 1.9和chrome。
任何想法我做错了吗?
请注意,由当你定义第二轴去除最大值和最小值参数,这导致轴不被渲染。这是一个错误? – en51nm
它适用于我...看到http://jsfiddle.net/psoares/nYtAg/20/ – Philippe