This is expected behaviour.
For example, if I had a time series, I would want it to show
2013-12-25: Presents: 5, Xmas Tree: 1
I understand that you want to show a value rather than time. So with the above in mind, you just need to pass your x-axis as another y-axis, e.g.
[
//X Y1 Y2
[0.4, 0.4, 0.5]
[0.6, 0.6, 0.7]
]
AND hide the resulting legend label.
My example code:
g = new Dygraph(
document.getElementById("OptimisationCloud"),
[
[0.4,0.4,0.5],
[0.6,0.6,0.7],
],
{
strokeWidth: 0.0,
drawPoints: true,
axes: {
x: {
axisLabelFormatter: function (x) {
return (x * 100).toFixed(0) + "%";
},
valueFormatter: function (y) {
return ""; //Hide legend label
}
},
y: {
axisLabelFormatter: function (y) {
return (y * 100).toFixed(0) + '%';
},
valueFormatter: function (y) {
return (y * 100).toFixed(2) + '%';
}
},
y2: {
axisLabelFormatter: function (y) {
return (y * 100).toFixed(0) + '%';
},
valueFormatter: function (y) {
return (y * 100).toFixed(2) + '%';
}
}
},
labels:["X", "Ann Vol", "Ann Ret"], //The "X" is hidden by returning the empty string above
xlabel: "Annualised Volatility",
ylabel: "Annualised Return",
colors: ["#1f4e6c"],
}
);