I have the following code to display a graph with two axes. The data is of the form:
Date, Value1, Value2
var sg = new Dygraph(document.getElemantById("div"),
lGraphData,
{
labels: ['Date', string1, string2],
legend: 'always',
series: {
string2 : {
axis: 'y2'
}
},
ylabel: string1,
y2label: string2
});
Instead of displaying the y2axis
, both series appear on the graph and only y axis
showing.
If I replace string2
(a variable string) with Y2
in the above code, both axes appear.
What am I doing wrong?