How to change plain line to arrow line in infovis?
Currently there are some lines between blocks, I found some css files, but I cannot find which content describing the line behaviour such that I can change the plain line to arrow line.
Thanks.
How to change plain line to arrow line in infovis?
Currently there are some lines between blocks, I found some css files, but I cannot find which content describing the line behaviour such that I can change the plain line to arrow line.
Thanks.
Copyright © 2021 Jogjafile Inc.
Generally spoken: You can't (and shouldn't) change it via CSS. Define such properties during the setup.
Here's a brief explanation:
Edge
method/function which sits insideOptions.Edge.js
.The function
Edge
is a property/module of the$jit
object and works like this:overridable
astrue
as you else can't override anything. The parameter that you're searching for istype
. The allowed values areline
,hyperline
,arrow
and I'm pretty sure thatbezier
will work as well - not sure if this is true for every type of graph. You can as well define custom graph Edge types - an example is missing in the documentation.To change the Line/Edge style, there's another function that triggers before rendering. You just have to define it during the graph registration
$jit.Viz( { /* add here */ } );
- code from the example/Spacetree here:}
add.data
can deliver and then either add the style you want or define a new one using a closure.There might be another way to go on this: Example for a
ForceDirected
graph. Take a look at the documentation here.Maybe you could even use something like this:
Disclaimer: I got no working copy of theJit/InfoViz library around, so I can't help more than that unless you add a JSFiddle example with your code.
Edit
As I just read that you only want to change to the default
arrow
type, just enter this type during the configuration of the graph.