From SpinetiX Support Wiki

(Redirected from JSignage:Lines)
Jump to: navigation, search


$.line( attributes );

Returns: jSignage Object


Draws a linear shape / segment that starts at one point and ends at another and must have an outline to be visible. See the line element in the SVG specification for reference.


  • attributes
    Type: Plain Object.
    Contains the shape attributes.


The following attributes can be specified:

  • stroke, strokeWidth etc.
    Stroke attributes (common to all shapes). The line is geometrically one-dimensional, so it has no interior, thus it is never filled.
  • x1, y1
    Type: Number. Default: 0.
    x and y coordinates of start of the line.
  • x2, y2
    Type: Number. Default: 0.
    x and y coordinates of end of the line.


// draw a vertical red separator and add it to the document
$.line({ x1: 640, y1:0, x2: 640, y2: 720, stroke: 'red', strokeWidth: 5 }).addTo('svg');

// draw a blue-dashed horizontal line with rounded line caps and add it to the document
$.line({ x1: 80, y1: 400, x2: 1200, y2: 400, stroke: 'blue', 
         strokeWidth: 20, strokeLineCap: 'round', strokeDashArray: '40, 50' 

Note Note: See also how to add underlying to text using lines.

This page was last modified on 16 January 2019, at 20:27.