値とデータカテゴリの両方をグラフに表示したいと思います。これは棒グラフであり、データ値と文字列を棒の左側の列に印刷したいと思います。
A 1#
B 3 ###
2つのadd(pv.Label)呼び出しをグラフにチェーンしようとしましたが、何も実行されないようです-2番目のラベルセットは追加されていません。これはprotovisでもできることですか?何かアドバイス?
vis = new pv.Panel()
.def("j", -1)
.width(800)
.height(50)
.right(3);
vis.add(pv.Bar)
.data(wData)
.bottom(0)
.width(20)
.height(function(d) d[1] * 1.2)
.left(function() this.index * 27)
.fillStyle(function() vis.j() == this.index ? "orange" : "steelblue")
.add(pv.Label) **// does nothing!!**
.bottom(0)
.textAlign("center")
.textStyle("white")
.text(function(d) d[0] )
.event("mouseover", function() vis.j(this.index))
.event("mouseout", function() vis.j(-1))
.anchor("top").add(pv.Label)
.visible(function() vis.j() >= 0)
.textStyle("white")
.text(function(d) d[1]);
vis.render();