Chart is blank when I change color programmatically via Observables

Title is esplicative.

When I change the color with BehaviorSubject.next method, everything turns white.

I uploaded a sample video: https://imgur.com/OhhBdXV


2 Replies

PB Piersante Bolzon September 27, 2021 11:59 AM UTC

Just figured out that the problem is the gradient in the svg.



DG Durga Gopalakrishnan Syncfusion Team September 28, 2021 03:24 PM UTC

Hi Piersante 

Greetings from Syncfusion. 

We have ensured your reported scenario with attached video, unfortunately we are unable to replicate an issue from our end. We have attached the tested sample for your reference. We have changed the fill color for chart series using BehaviorSubject.next method. Please check with below snippet and video. 

  public data: BehaviorSubject<string> = new BehaviorSubject(""); 
  public letters: string[] = ["red", "green", "orange", "yellow", "blue"]; 
    private getAsync2 = (): void => { 
      interval().subscribe(x=> this.data.next(this.letters[Math.floor(Math.random() * 4) + 1]));   
      this.fill= this.data.value == "" ? "red" : this.data.value;  
    } 



Kindly revert us if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon