-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
ng-alain/delon
#1063Labels
Description
Reproduction link
https://stackblitz.com/edit/ng-alain-pie-issue?file=src/app/app.component.ts
Steps to reproduce
As the following code shows, if pieData
is initialized as []
and is assigned later, the pie is not rendered correctly
import { Component } from "@angular/core";
import { of } from "rxjs";
import { delay } from "rxjs/operators";
@Component({
selector: "my-app",
template: `
<g2-pie
[hasLegend]="true"
subTitle="vote"
[data]="pieData"
height="400"
></g2-pie>
`
})
export class AppComponent {
pieData = [];
ngOnInit() {
of([{ x: "a", y: 1 }, { x: "b", y: 1 }])
.pipe(delay(1000))
.subscribe(v => (this.pieData = v));
}
}
What is expected?
The pie should render correctly, for the example, it should be 2 semi-circles
What is actually happening?
The pie renders wrongly, the whole pie has only one color
Environment | Info |
---|---|
ng-alain | 10.0.2 |
Browser | Chrome 86 |