sunburst-chart
sunburst-chart copied to clipboard
Integrate `sunbrust-chart` with Angular 2-9
@vasturiano It is there a way to integrate sunburst-chart with Angular 2-9? I am trying this, but is not working.
import { Component, OnInit } from '@angular/core';
import Sunburst from 'sunburst-chart';
import { sbdata } from '../chart-options/sunburst-mockdata';
@Component({
selector: 'app-sunburst',
templateUrl: './sunburst.component.html',
styleUrls: ['./sunburst.component.scss']
})
export class SunburstComponent implements OnInit {
constructor() {}
ngOnInit() {
const myChart: Sunburst = Sunburst();
myChart.data(sbdata)('sbChart');
}
}
And the .html:
<div class="card" id="sbChart"></div>
@linuradu I'm certain it can be used with Angular, but I'm not familiar enough with the framework to be able to offer much guidance there.
Perhaps someone else more experienced in the Angular ways can be more helpful.
@cjkirk09 Did you managed to integrate the sunburt-chart
with Angular 2-5?
@vasturiano Here is a working solution with Angular 9 https://stackoverflow.com/questions/60541172/integrate-vasturiano-sunbrust-chart-with-angular-2-9/60544969#60544969