How to create layount elements depending on data context in protovis-js?

58 Views Asked by At

I look at this beautiful sample and its so and can't help but wonder how to create lemements like:

bg.add(pv.Wedge)
          .angle(smallAngle)
          .startAngle(function(d) this.proto.startAngle() + smallAngle)
          .outerRadius(function(d) radius(d.penicillin))
          .fillStyle(drugColor.Penicillin)

only if d.penicillin > 0 then call bg.add(pv.Wedge) (so have more or less ui elements depending on data, not only its params)?

0

There are 0 best solutions below