- 除了#nodeTemplate 和#linkTemplate,我们如何使用customTemplate 向ngx-graphs 添加更多元素?
<ngx-graph id="main_drawing_board" class="chart-container" [view]="view" [legend]="showLegend"
[links]="hierarchicalGraph.links" (legendLabelClick)="onLegendLabelClick($event)"
[nodes]="hierarchicalGraph.nodes" [scheme]="colorScheme" [orientation]="orientation" [curve]="curve" (select)="select($event)" [update$]="update$">
<ng-template #defsTemplate>
......................
</ng-template>
<ng-template #nodeTemplate let-node>
.....................
</ng-template>
<ng-template #linkTemplate let-link>
..............
</ng-template>
<ng-template #customTemplate>
<svg:text x="300" y="200">custom text</svg:text>
</ng-template>
</ngx-graph>