AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.utils.Connector Improve this Doc

Extends: anychart.core.Base

Connector settings class.

Methods Overview

Coloring
stroke()Stroke settings.
Size and Position
length()Connector length.

Methods Description

length

Getter for the connector length.

Returns:

string - Connector length.
See listing
var connector = normal.connector();
var length = connector.length();
Setter for the connector length.

Params:

NameTypeDescription
lengthnumber | stringConnector length to set. Length in pixels or percentages.

Returns:

anychart.core.utils.Connector - Self instance for method chaining.

stroke

Getter for stroke settings.

Returns:

anychart.graphics.vector.Stroke - Stroke settings.
See listing
var connector = normal.connector();
var stroke = connector.stroke();
Setter for series stroke by function.

Params:

NameTypeDefaultDescription
strokeFunctionfunction():anychart.graphics.vector.Stroke|anychart.graphics.vector.ColoredFill
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like:
function(){
   // this.chart - chart object.
   // this.group - group object.
   // this.index - series index.
   // this.iterator - series point iterator.
   // this.plot - plot object.
   // this.sourceColor - color returned by stroke() getter.

   return strokeValue; // type anychart.graphics.vector.Stroke
}

Returns:

anychart.core.map.series.Base - Self instance for method chaining.
Setter for series stroke settings. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null
Stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapstring | anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.utils.Connector - Self instance for method chaining.
Setter for stroke using an object.

Params:

NameTypeDescription
settingsObjectStroke settings from anychart.graphics.vector.Stroke.

Returns:

anychart.core.utils.Connector - Self instance for method chaining.