Incorecttarget / protovis-js

Automatically exported from code.google.com/p/protovis-js
1 stars 0 forks source link

labels of axis can't be a function #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
// X-axis and ticks.
vis.add(pv.Rule)
    .data(x.ticks())
    .visible(function(d){return d})
    .left(x)
    .bottom(-5)
    .height(5)
  .anchor("bottom").add(pv.Label)
    .text(x.tickFormat); <<< cant be a function

like:
// X-axis and ticks.
vis.add(pv.Rule)
    .data(x.ticks())
    .visible(function(d){return d})
    .left(x)
    .bottom(-5)
    .height(5)
  .anchor("bottom").add(pv.Label)
    .text(function(){x.tickFormat}); <<< cant be a function

so when i re-render it will update with a dynamic value.

generally i want the scales to be dynamic from dynamic data from ajax

Original issue reported on code.google.com by helpmep...@gmail.com on 4 Mar 2012 at 2:40

GoogleCodeExporter commented 9 years ago
correction:
like:
// X-axis and ticks.
vis.add(pv.Rule)
    .data(x.ticks())
    .visible(function(d){return d})
    .left(x)
    .bottom(-5)
    .height(5)
  .anchor("bottom").add(pv.Label)
    .text(function(){return x.tickFormat}); <<< cant be a function

Original comment by helpmep...@gmail.com on 4 Mar 2012 at 2:40