Skip to content Skip to sidebar Skip to footer

How To Change Arrows In Vis.js To Chicken Feet Or Cardinality

I am trying to use vis.js to show the structure of an XML or JSON Schema. I would like to show cardinality instead of an arrow. Any suggestions on documentation to view, because I

Solution 1:

Each edge has a function that is responsible for drawing arrows: drawArrows. Accordingly, it is possible to redefine its:

edge.drawArrows = function drawArrows(ctx, arrowData) {
    if (this.options.arrows.from.enabled === true) {
      drawArrowCircle(ctx, this.selected, this.hover, arrowData.from);
    }
    if (this.options.arrows.middle.enabled === true) {
      drawArrowDiamond(ctx, this.selected, this.hover, arrowData.middle);
    }
    if (this.options.arrows.to.enabled === true) {
      this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.to);
    }
  }

https://jsfiddle.net/ct34zwn6/

Post a Comment for "How To Change Arrows In Vis.js To Chicken Feet Or Cardinality"