Permalink
..
Failed to load latest commit information.
README.md Fix Linkurious/linkurious.js#7 Sep 9, 2014
settings.js Fix Linkurious/linkurious.js#7 Sep 9, 2014
sigma.canvas.edges.labels.curve.js Fix Linkurious/linkurious.js#7 Sep 9, 2014
sigma.canvas.edges.labels.curvedArrow.js
sigma.canvas.edges.labels.def.js

README.md

sigma.renderers.edgeLabels

Plugin developed by Sébastien Heymann for Linkurious.

Contact: seb@linkurio.us


General

This plugin displays edge labels.

See the following example for full usage.

To use it, include all .js files under this folder.

Settings

This plugin extends Sigma.js settings in a transparent way to render edge labels, see settings.js:

  • defaultEdgeLabelColor

    • type: string
    • default value: #000
  • defaultEdgeLabelActiveColor

    • type: string
    • default value: rgb(236, 81, 72)
  • defaultEdgeLabelSize

    • type: number
    • default value: 10
  • edgeLabelSize

    • Indicates how to choose the edge labels size.
    • type: string
    • default value: fixed
    • available values: fixed, proportional
  • edgeLabelSizePowRatio

    • The opposite power ratio between the font size of the label and the edge size.
    • type: number
    • default value: 0.8
// Formula:
Math.pow(size, - 1 / edgeLabelSizePowRatio) * size * defaultEdgeLabelSize
  • edgeLabelThreshold
    • The minimum size an edge must have to see its label displayed.
    • type: number
    • default value: 1

The plugin also forces drawEdgeLabels to true.

The default values provided by the plugin may be overridden when instantiating Sigma, e.g.:

var sigInst = new sigma({
  container: 'graph-container',
  settings: {
    edgeLabelSize: 'proportional'
  }
});

Renderers

This plugin provides the following edge label renderers:

  • line (default)
  • arrow (use default)
  • curve
  • curvedArrow

Compatibility

This plugin is compatible with sigma.plugins.activeState.