Using D3.js with Angular 2
To use Renderer, you need the raw HTML element (aka nativeElement). So basically you have to use whatever your library is, get the raw element and pass it to Renderer. For example // h3[0][0] contains the raw element var h3 = d3.select(this.el.nativeElement).select(‘h3’); this.renderer.setElementStyle(h3[0][0], ‘background-color’, ‘blue’); The warning about ElementRef is about using it directly. That … Read more