Skip to content

Instantly share code, notes, and snippets.

@ygaller
Last active April 22, 2017 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ygaller/a20fbb2d556f3abad9379f0882707091 to your computer and use it in GitHub Desktop.
Save ygaller/a20fbb2d556f3abad9379f0882707091 to your computer and use it in GitHub Desktop.
<div class="widget">
<h2>Service & component with CSV data source</h2>
<d3-circle-packing-renderer [root]="csvRoot"></d3-circle-packing-renderer>
</div>
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [
flareCsvServiceProvider(FLARE_CSV)
],
})
export class AppComponent {
public csvRoot;
constructor(private flareCsvService: FlareCsvService,
private flareJsonService: FlareJsonService) {
this.csvRoot = flareCsvService.getRoot();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment