AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.

class anychart.core.pert.Milestones Improve this Doc

Pert milestones settings collector.

Methods Overview

Specific settings
hoverLabels()Labels settings in hover mode.
labels()Labels settings.
selectLabels()Labels settings in selected mode.
shape()Milestones shape.
Coloring
color()Color settings.
fill()Fill settings.
hoverFill()Fill settings in hover mode.
hoverStroke()Stroke settings in hover mode.
selectFill()Fill settings for selected point.
selectStroke()Stroke settings in selected state.
stroke()Stroke settings.
Interactivity
tooltip()Tooltip settings.
Size and Position
size()Milestones size settings

Methods Description

color

Getter for milestones color.

Returns:

string - The milestones color.
Getter for milestones color.

Params:

NameTypeDescription
valuestringColor as a string.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

fill

Getter for milestones fill color.

Returns:

anychart.graphics.vector.Fill | function - Current fill color.
Setter for milestones fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDescription
valueanychart.graphics.vector.FillColor as an array or a string.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for the fill using function. Learn more about coloring.

Params:

NameTypeDefaultDescription
fillFunctionfunction
// return the fill from the default palette.
function() {
  return this.sourceColor;
};
Fill-function, which should look like this:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Fill - fill of the current point // } return myFill; //anychart.graphics.vector.Fill };.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Milestones fill color with opacity. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Linear gradient milestones fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Radial gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Image series fill. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

hoverFill

Getter for milestones fill color in hover mode.

Returns:

anychart.graphics.vector.Fill | function - Current fill color.
Setter for milestones fill settings in hover mode using an array or a string. Learn more about coloring.

Params:

NameTypeDescription
valueanychart.graphics.vector.FillColor as an array or a string.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for the hover fill using function. Learn more about coloring.

Params:

NameTypeDefaultDescription
fillFunctionfunction
// return the fill from the default palette.
function() {
  return this.sourceColor;
};
Fill-function, which should look like this:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Fill - fill of the current point // } return myFill; //anychart.graphics.vector.Fill };.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Milestones fill color with opacity in hover mode. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Linear gradient milestones fill in hover mode. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Radial gradient milestones fill in hover mode. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Image milestones fill in hover mode. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

hoverLabels

Getter for milestones hover data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for milestones hover data labels.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
false
Series data labels settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

hoverStroke

Getter for milestones stroke in the hover state.

Returns:

anychart.graphics.vector.Stroke - The milestones stroke in the hover state.
Setter for tasks hover stroke by function.

Params:

NameTypeDefaultDescription
strokeFunctionfunction
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for milestones stroke in the hover state. Learn more about stroke settings.

Params:

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

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

labels

Getter for milestones data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for milestones data labels.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
false
Milestones data labels settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

selectFill

Getter for the fill color for selected milestone.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Setter for the fill settings for selected milestone using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
{color: '#64b5f6'}
Color as an array or a string.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for the select fill using function. Learn more about coloring.

Params:

NameTypeDefaultDescription
fillFunctionfunction
// return the fill from the default palette.
function() {
  return this.sourceColor;
};
Fill-function, which should look like this:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Fill - fill of the current point // } return myFill; //anychart.graphics.vector.Fill };.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Fill color with opacity for selected milestone. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Linear gradient fill for selected milestone. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Radial gradient fill for selected milestone. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Image fill for selected milestone. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

selectLabels

Getter for milestones select data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.
Setter for milestones select data labels.

Params:

NameTypeDescription
valueObject | boolean | nullMilestones data labels settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

selectStroke

Getter for milestones stroke in selected state.

Returns:

anychart.graphics.vector.Stroke - The milestones stroke in selected state.
Setter for tasks select stroke by function.

Params:

NameTypeDefaultDescription
strokeFunctionfunction
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for milestones stroke in selected state.

Params:

NameTypeDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | nullStroke settings.
thicknessnumberLine thickness.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoinLine join style.
lineCapanychart.graphics.vector.StrokeLineCapLine cap style.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

shape

Getter for milestones shape.

Returns:

anychart.enums.MilestoneShape | string - The milestones shape.
Setter for milestones shape.

Params:

NameTypeDefaultDescription
valueanychart.enums.MilestoneShape | string
"circle"
Value to set.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

size

Getter for milestones size.

Returns:

number | string - The milestones size.
Setter for milestones size.

Params:

NameTypeDefaultDescription
valuenumber | string
"5%"
Value to set.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

stroke

Getter for milestones stroke.

Returns:

anychart.graphics.vector.Stroke - The milestones stroke.
Setter for tasks stroke by function.

Params:

NameTypeDefaultDescription
strokeFunctionfunction
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.
Setter for milestones stroke. 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.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.

tooltip

Getter for milestones data tooltip.

Returns:

anychart.core.ui.Tooltip - Tooltip instance.
Setter for milestones data tooltip.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Tooltip settings.

Returns:

anychart.core.pert.Milestones - Self instance for method chaining.