有谁熟悉javascript dygraph库?我想为这个dygraph添加一个注释,但它看起来与在线教程中的内容完全不同。
g = new Dygraph(
document.getElementById("visualization"),
chart_data, {
labelsDiv: document.getElementById('status'),
labelsSeparateLines: false,
labelsKMB: true,
labels: ["X", "Val"],
legend: 'onmouseover',
colors: ["rgb(88,143,235)"],
width: 640,
height: 480,
//title: '<? ?>',
//xlabel: '<?= $xAxisLabel ?>',
//ylabel: '<?= $yAxisLabel ?>',
axisLineColor: 'white',
//valueRange: <?= $yAxisRangeStr ?>,
showRangeSelector: true,
dateWindow: [(d.getTime() - 2 * 7 * 24 * 60 * 60 * 1000), d.getTime()],
underlayCallback: function (ctx, area, dygraph) {
ctx.strokeStyle = 'black';
ctx.strokeRect(area.x, area.y, area.w, area.h);
}
// echo($chart["dygraphs-scaling"]) ?>
// drawXGrid: false
});