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:

Name Type Description
value number | string Value to set. Length in pixels or percentages.

Returns:

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

Try it:

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:

Name Type Default Description
strokeFunction function
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.

Try it:

Setter for series stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
color anychart.graphics.vector.Stroke | string | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin string | anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap string | anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it: