Options.Label.js

Summary
Options.Label.js
Options.LabelProvides styling for Labels such as font size, family, etc.

Options.Label

Provides styling for Labels such as font size, family, etc.  Also sets Node labels as HTML, SVG or Native canvas elements.

Syntax

Options.Label = {
  overridable: false,
  type: 'HTML', //'SVG', 'Native'
  style: ' ',
  size: 10,
  family: 'sans-serif',
  textAlign: 'center',
  textBaseline: 'alphabetic',
  color: '#fff'
};

Example

var viz = new $jit.Viz({
  Label: {
    type: 'Native',
    size: 11,
    color: '#ccc'
  }
});

Parameters

overridable(boolean) Default’s false.  Determine whether or not general label properties can be overridden by a particular Graph.Node.
type(string) Default’s HTML.  The type for the labels.  Can be ‘HTML’, ‘SVG’ or ‘Native’ canvas labels.
style(string) Default’s empty string.  Can be ‘italic’ or ‘bold’.  This parameter is only taken into account when using ‘Native’ canvas labels.  For DOM based labels the className node is added to the DOM element for styling via CSS.  You can also use Options.Controller methods to style individual labels.
size(number) Default’s 10.  The font’s size.  This parameter is only taken into account when using ‘Native’ canvas labels.  For DOM based labels the className node is added to the DOM element for styling via CSS.  You can also use Options.Controller methods to style individual labels.
family(string) Default’s sans-serif.  The font’s family.  This parameter is only taken into account when using ‘Native’ canvas labels.  For DOM based labels the className node is added to the DOM element for styling via CSS.  You can also use Options.Controller methods to style individual labels.
color(string) Default’s #fff.  The font’s color.  This parameter is only taken into account when using ‘Native’ canvas labels.  For DOM based labels the className node is added to the DOM element for styling via CSS.  You can also use Options.Controller methods to style individual labels.
A Graph node.
Provides controller methods.
Close