Tick Formatting
Thanks for a great library. I've figured out most of what I've needed to do from the examples and just playing around. However I was wondering if tick formatting was possible. In regular dc.js you can do something like this to format the axis:
var axis_format = d3.time.format("%x"); over_time.width(1050) .height(350) .dimension(times) .group(time_counts) .xAxis().tickFormat(function(d) { return axis_format(d); });
However, I can't seem to work out specifying axis and format with angular-dc.
Thanks, Dean
@lfarrell The work-around described in https://github.com/TomNeyland/angular-dc/issues/15 should also work for this case.
As I say in that issue, the work-around is a bit inelegant, this sounds like another good use case for a nestable directive.
Thanks, would this apply to the choropleth chart as well? I can't seem to come up with any sane way to add the required overlay option: overlayGeoJson(json, name, keyAccessor) - mandatory
I've been trying this in a renderlet, but it doesn't render:
renderlet: function(chart){ chart.colorCalculator(function (d) { return d ? chart.colors()(d) : '#ccc'; }); chart.overlayGeoJson(m.features, "state", function(d) { return d.properties.name; });
}
Answered my own question. This does work: $scope.postMapSetup = function(chart) { chart.colorCalculator(function (d) { return d ? chart.colors()(d) : '#ccc'; }); chart.overlayGeoJson(m.features, "state", function(d) { return d.properties.name; }); };
Thanks for a cool library. It's saved me a lot of work. :+1: