Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

SVG disappears after routing with angular route #299

Open
alex0598 opened this issue Mar 7, 2022 · 1 comment
Open

SVG disappears after routing with angular route #299

alex0598 opened this issue Mar 7, 2022 · 1 comment

Comments

@alex0598
Copy link

alex0598 commented Mar 7, 2022

The current setup is a fixed side navigation with an ngx trend chart. The main components are routed.
If the route changes the svg disappears for some time till (maybe change detection runs).

If we look into the html code i found this line of code:
<path fill="none" class="ng-tns-c514-14 ng-trigger ng-trigger-pathAnimaiton" stroke="url('http://localhost:4200/plant-diagnosis/overview/cabinet/21#ngx-trend-vertical-gradient-7906924350227782')"

What i observed is that the svg comes visible again after this url changes to the right routing url which is after the data set is updated from the api (change detection).
Why is there a url used ?

The comp:

<ngx-trend autoDraw="true" autoDrawDuration="1000" autoDrawEasing="ease-out" smooth="true" [height]="60" [data]="systemCycleTimeData" [gradient]="['#2196F3']" radius="0.1" strokeWidth="2.7" strokeLinecap="round" > </ngx-trend>

@alex0598
Copy link
Author

alex0598 commented Mar 7, 2022

I have changed [gradient]="['#2196F3']" to stroke="#2196F3". Now it works as expected.
But maybe you can look at the issue when gradient is used.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant