Reputation: 538
on the ngx-graph, is it possible to change the link template?. if yes, how to change the color of the links. By default, it is black.
<ng-template #linkTemplate let-link>
<svg:g class="edge"
[attr.fill-opacity]="0.4"
>
<svg:path
[attr.fill]="'red'"
[attr.color]="'red'"
class="line"
marker-end="url(#arrow)"
stroke-width="2"
style="fill: green">
</svg:path>
<svg:text class="edge-label" text-anchor="middle">
<textPath [attr.href]="'#' + link.id" [style.dominant-baseline]="link.dominantBaseline"
class="text-path" startOffset="80%">
{{link.label}}
</textPath>
</svg:text>
</svg:g>
</ng-template>
Upvotes: 0
Views: 1195
Reputation: 538
I have found the answer for this myself. maybe its useful for someone.
just set the stroke value.
<svg:path
class="line"
marker-end="url(#arrow)"
stroke-width="2"
stroke='red'">
</svg:path>
Upvotes: 2