Closed Kade-Powell closed 1 year ago
Hi @Kade-Powell, Thank you for using v-network-graph and asking the question!
Sorry for the lack of clarity. When a function is specified in an item under config.marker, the format of the argument differs from the other items and is as follows:
(args: [Edge, StrokeStyle]) => value
Therefore, try specifying the following:
marker: {
target: {
type: ([edge]) => edge.markerType,
width: 4,
height: 4
}
}
Best Regards
perfect, thank you for the help and the library!
Hello, i'm trying to set the marker type dynamically just as other values are set dynamically in the configuration of the graph.
in my code i'm generating the edges and the edge options, here's the function to generate edge options (includes marker type)
what i expect to happen is i will have different target markers shown based on what parameters i pass in, but this does not happen. The other options do work like i expect for example this is an example graph
What i'm trying to do is have arrows on light blue links and no markers on the purple ones shown, any idea as to what i'm doing wrong?