class anychart.core.utils.Error Improve this Doc
Extends: anychart.core.Base
Class representing series error.
Methods Overview
Specific settings | |
mode() | Error mode settings. |
valueError() | Value error settings. |
valueErrorWidth() | Value width settings. |
valueLowerError() | Value lower error settings. |
valueUpperError() | Value upper error settings. |
xError() | X-error settings. |
xErrorWidth() | X-error width settings. |
xLowerError() | X lower error settings. |
xUpperError() | X upper error settings. |
Coloring | |
valueErrorStroke() | Value error stroke settings. |
xErrorStroke() | X-error stroke settings. |
Events | |
listen() | Adds an event listener. |
listenOnce() | Adds a single time event listener. |
removeAllListeners() | Removes all listeners. |
unlisten() | Removes the listener. |
unlistenByKey() | Removes the listener by the key. |
Methods Description
listen
Adds an event listener to an implementing object.
Detailed description
The listener can be added to an object once, and if it is added one more time, its key will be returned.
Note Notice that if the existing listener is one-off (added using listenOnce), it will cease to be such after calling the listen() method.
Note Notice that if the existing listener is one-off (added using listenOnce), it will cease to be such after calling the listen() method.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | The event type id. | |
listener | function | Callback method. Function that looks like function(event){
// event.actualTarget - actual event target
// event.currentTarget - current event target
// event.iterator - event iterator
// event.originalEvent - original event
// event.point - event point
// event.pointIndex - event point index
} . | |
useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
listenerScope | Object | Object in whose scope to call the listener. |
Returns:
Object - Unique key for the listener.Try it:
listenOnce
Adds an event listener to an implementing object.
Detailed description
After the event is called, its handler will be deleted.
If the event handler being added already exists, listenOnce will do nothing.
Note In particular, if the handler is already registered using listen(), listenOnce() will not make it one-off. Similarly, if a one-off listener already exists, listenOnce will not change it (it wil remain one-off).
If the event handler being added already exists, listenOnce will do nothing.
Note In particular, if the handler is already registered using listen(), listenOnce() will not make it one-off. Similarly, if a one-off listener already exists, listenOnce will not change it (it wil remain one-off).
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | The event type id. | |
listener | function | Callback method. | |
useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
listenerScope | Object | Object in whose scope to call the listener. |
Returns:
Object - Unique key for the listener.Try it:
mode
Getter for error mode.
Returns:
anychart.enums.ErrorMode | string - Returns current error mode.Try it:
Setter for error mode.
Error mode defines the rule to parse values for series with error.
Error mode defines the rule to parse values for series with error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | anychart.enums.ErrorMode | "both" | Value to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
removeAllListeners
Removes all listeners from an object. You can also optionally remove listeners of some particular type.
Params:
Name | Type | Description |
---|---|---|
type | string | Type of event to remove, default is to remove all types. |
Returns:
number - Number of listeners removed.Try it:
unlisten
Removes a listener added using listen() or listenOnce() methods.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | The event type id. | |
listener | function | Callback method. | |
useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
listenerScope | Object | Object in whose scope to call the listener. |
Returns:
boolean - Whether any listener was removed.Try it:
unlistenByKey
Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().
Params:
Name | Type | Description |
---|---|---|
key | Object | The key returned by listen() or listenOnce(). |
Returns:
boolean - Whether any listener was removed.Try it:
valueError
Setter for value error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | Value error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
valueErrorStroke
Getter for current value error stroke settings.
Returns:
anychart.graphics.vector.Stroke - Current stroke settings.Try it:
Setter for current value error stroke settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
fillFunction | function | 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.Fill or anychart.graphics.vector.Stroke
} . |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
Setter for current value error stroke settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
strokeOrFill | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null | '#1D8BD1' | Fill settings or stroke settings. |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | anychart.graphics.vector.StrokeLineJoin | Line joint style. | |
lineCap | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
valueErrorWidth
Getter for current value error width settings.
Returns:
number - Returns current value error width.Try it:
Setter for value error width settings. Length pins for value axis in pixels.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 10 | Value error width. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
valueLowerError
Getter for value lower error.
Returns:
string | number | undefined - Returns current value lower error.Try it:
Setter for value lower error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | Value lower error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
valueUpperError
Getter for value upper error.
Returns:
string | number | undefined - Returns current value lower error.Try it:
Setter for value upper error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | Value upper error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
xError
Setter for X error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | X Error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
xErrorStroke
Getter for current X error stroke settings.
Returns:
anychart.graphics.vector.Stroke - Current stroke settings.Try it:
Setter for current X error stroke by function.
Params:
Name | Type | Default | Description |
---|---|---|---|
fillFunction | function | 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.Fill or anychart.graphics.vector.Stroke
} . |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
Setter for current X error stroke settings.
Learn more about stroke settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
strokeOrFill | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null | '#1D8BD1' | Fill settings or stroke settings. |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | anychart.graphics.vector.StrokeLineJoin | Line joint style. | |
lineCap | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
xErrorWidth
Getter for current X error width settings.
Returns:
number - Returns current X error width.Try it:
Setter for X error width settings. Length pins for X axis in pixels.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 10 | X error width. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
xLowerError
Getter for X lower error.
Returns:
string | number | undefined - Returns current X lower error.Try it:
Setter for X lower error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | X lower error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it:
xUpperError
Getter for X upper error.
Returns:
string | number | undefined - Returns current X upper error.Try it:
Setter for X upper error.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | null | X upper error to set. |
Returns:
anychart.core.utils.Error - Self instance for method chaining.Try it: