tree: dddb350f910bfc5f92d1d59d64addceaad4abde8 [path history] [tgz]
  1. README.md
  2. d3-helpers/
  3. graph.config.ts
  4. graph.extender.spec.ts
  5. graph.extender.ts
  6. graph.store.spec.ts
  7. graph.store.ts
  8. node-positioner.service.spec.ts
  9. node-positioner.service.ts
  10. renderer/
src/app/service-graph/services/README.md

Service Graph extender example

XosServiceGraphExtender.register('coarse', 'test', (graph: IXosServiceGraph) => {
  graph.nodes = graph.nodes.map(n => {
    // do my changes
    n.label = `reduced_${n.label}`;
    return n;
  });

  graph.links = graph.links.map(l => {
    // do my changes
    return l;
  });
  return graph;
});

Note that if you add classes you'll need to provide CSS for that

What can you change:

Nodes:

You can change any of the property that are present in the node element, plus:

propertytypeeffect
d3Classspace separated stringthe class names get prefixed with ext-
xnumberhorizontal position
ynumbervertical position

Links:

propertytypeeffect
d3Classspace separated stringthe class names get prefixed with ext-