sunburst-chart icon indicating copy to clipboard operation
sunburst-chart copied to clipboard

Integrate `sunbrust-chart` with Angular 2-9

Open linuradu opened this issue 4 years ago • 3 comments

@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 avatar Mar 04 '20 20:03 linuradu

@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.

vasturiano avatar Mar 05 '20 05:03 vasturiano

@cjkirk09 Did you managed to integrate the sunburt-chart with Angular 2-5?

linuradu avatar Mar 05 '20 08:03 linuradu

@vasturiano Here is a working solution with Angular 9 https://stackoverflow.com/questions/60541172/integrate-vasturiano-sunbrust-chart-with-angular-2-9/60544969#60544969

linuradu avatar Mar 05 '20 12:03 linuradu