For a more complete angular directive, use angular-rickshaw. This example is based on @hendrickswan's Using D3 with Rickshaw and Angular Tutorial and Screencast.