using d3-graphviz in angular, I can render a simple graphviz graph if I input it as a string like the below. But I would like to read in graphs from a dot file instead. Does anyone know what the correct way to do this is?
import { Component } from '@angular/core';
import { graphviz } from 'd3-graphviz';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'd3-graphviz in Angular';
ngOnInit() {
graphviz('div').renderDot('digraph {a -> b}');
}
}