ハイチャート/ハイストック API を使用して Yaxis ラベルを描画する方法はありますか? ラベルの値は、シリーズの終了値になります。お色はシリーズ同色になります。
レンダラー API があることを発見しましたが、ポイントの正確な位置を知るのは難しいようです。
ハイチャート/ハイストック API を使用して Yaxis ラベルを描画する方法はありますか? ラベルの値は、シリーズの終了値になります。お色はシリーズ同色になります。
レンダラー API があることを発見しましたが、ポイントの正確な位置を知るのは難しいようです。
renderer 関数を使用する古い例を次に示します。
http://jsfiddle.net/jlbriggs/4FrGG/4/
function(chart){
$(chart.series).each(function(i, serie){
//to get the appropraite 'y' position
var point = serie.data[serie.data.length-1];
chart.renderer.text(
//the text to render
'<span style="font-weight:bold;color:' + serie.color + ';">' + serie.name + '</span>',
//the 'x' position
chart.plotLeft+chart.plotWidth+5,
//the 'y' position
chart.plotTop + point.plotY+3).add()
});
});
最後のデータ ポイントに対してのみ有効なデータ ラベルを使用して、それを行うこともできます。
http://jsfiddle.net/jlbriggs/zXLZA/0/
「tickPositions」プロパティを使用して、軸ラベルのフォーマッタ関数を使用することもできます。