私は道場の縦棒グラフを使用しています。プロットに描画されるカスタム ライン (ある種のしきい値ライン) を追加したいと考えています。したがって、y 軸の範囲が 0 から 5 であるとしましょう。プロットを横切る 4.2 の水平線が必要です。縦棒グラフです。プロットでカスタム描画を行うのに役立つ描画 API を見つけたいと思っていましたが、その方法がわかりません。チャートが gfx とサーフェスを使用していることは知っているので、チャート/プロット サーフェスのハンドルを取得できれば、カスタム ラインを描画できますか? これを実現するには、座標マッピングをレンダリングするためのデータも必要です
私の現在のチャートは次のようなコードを使用しています:
var mychart = new dojox.charting.Chart2D("columns").
addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true,
font: "normal normal 10pt Arial",
labels: [{value: 1, text: "Q2 FY11"},
{value: 2, text: "Q3 FY11"},
{value: 3, text: "Q4 FY11"},
{value: 4, text: "Q1 FY12"}]
}).
addAxis("y", {vertical: true, includeZero: false, fixLower: "major", fixUpper: "major", min: 0, max: 5, font: "normal normal 10pt Arial", majorTick: {color: "black", length: 6}, minorTicks: false}).
addPlot("default", {type: "ClusteredColumns", tension: "S", shadows: {dx: 2, dy: 2}, gap: 5, minBarSize : 14, maxBarSize:24, animate: { duration: 1000, easing: dojo.fx.easing.linear} }).
addSeries("Series A", [{ y: 2.3, tooltip: "FFFF"}, { y: 3.5, tooltip: "GGGG"}]).
addSeries("Series B", [1.2, 2.5]);