문제

I am trying to add a tool tip to my forecast as well as actuals indicator on a protovis chart by using the title attribute of my marker, but I don't know how to access it.

var vis = new pv.Panel()
.data(bullets)
.width(400)
.height(30)
.margin(20)
.left(100);

var bullet = vis.add(pv.Layout.Bullet)
.orient("left")
.ranges(function(d) d.ranges)
.measures(function(d) d.measures)
.markers(function(d) d.markers);

 bullet.range.add(pv.Bar)
  .event("mouseover", function() self.status ="orange");
 bullet.measure.add(pv.Bar).title(??????);

 bullet.marker.add(pv.Dot)
.shape("bar")
.lineWidth("4")
.height("1")
.title(???????);

What I want to be able to show are the actuals value and the forecast values as my tool tips

도움이 되었습니까?

해결책

Gee, figured it out, you can do it by writing the following code

bullet.marker.add(pv.Dot)
.shape("bar")
.lineWidth("4")
.height("1")
.title(function(d) {
return d
 });
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top