Namespace: Highcharts

Highcharts

The Highcharts object is the placeholder for all other members, and various utility functions. The most important member of the namespace would be the chart constructor.

示例

let chart = Highcharts.chart('container', { ... });

AccessibilityComponent
Annotation
AnnotationControlPoint
AST
Axis
Chart
Color
ColorAxis
Data
Earcon
Fullscreen
GanttChart
Instrument
KeyboardNavigationHandler
Legend
MapChart
PlotLineOrBand
Point
Pointer
Series
StockChart
SVGElement
SVGRenderer
Tick
Time
Tooltip

成员

<static> charts :Array.<(Highcharts.Chart|undefined)>

An array containing the current chart objects in the page. A chart's position in the array is preserved throughout the page's lifetime. When a chart is destroyed, the array item becomes undefined.

Type:

<static> dateFormats :Record.<string, Highcharts.TimeFormatCallbackFunction>

A hook for defining additional date format specifiers. New specifiers are defined as key-value pairs by using the specifier as key, and a function which takes the timestamp as value. This function returns the formatted portion of the date.

Type:
在线示例

<static> defaultOptions :Highcharts.Options

Global default settings.

Type:
  • Highcharts.Options

<static> maps :Record.<string, *>

Contains all loaded map data for Highmaps.

Type:
  • Record.<string, *>

<static> sonification :Highcharts.SonificationObject

Global classes and objects related to sonification.

Type:

<static> theme :Highcharts.Options

Theme options that should get applied to the chart. In module mode it might not be possible to change this property because of read-only restrictions, instead use Highcharts.setOptions.

Type:
  • Highcharts.Options
Deprecated:
  • Yes

<static> time :Highcharts.Time

Global Time object with default options. Since v6.0.5, time settings can be applied individually for each chart. If no individual settings apply, this Time object is shared by all instances.

Type:

方法

<static> addEvent(el, type, fn [, options])

Add an event listener.

参数:
名字 类型 特质 详情
el Highcharts.Class.<T> | T

The element or object to add a listener to. It can be a HTMLDOMElement, an Highcharts.SVGElement or any other object.

type string

The event type.

fn Highcharts.EventCallbackFunction.<T> | function

The function callback to execute when the event is fired.

options Highcharts.EventOptionsObject <可选>

Options for adding the event.

返回值:
function .

A callback function to remove the added event.

<static> ajax(attr)

Perform an Ajax call.

参数:
名字 类型 详情
attr Partial.<Highcharts.AjaxSettingsObject>

The Ajax settings to use.

返回值:
false | undefined .

Returns false, if error occured.

<static> animate(el, params [, opt])

The global animate method, which uses Fx to create individual animators.

参数:
名字 类型 特质 详情
el Highcharts.HTMLDOMElement | Highcharts.SVGElement

The element to animate.

params Highcharts.CSSObject | Highcharts.SVGAttributes

An object containing key-value pairs of the properties to animate. Supports numeric as pixel-based CSS properties for HTML objects and attributes for SVGElements.

opt Partial.<Highcharts.AnimationOptionsObject> <可选>

Animation options.

返回值:

<static> animObject( [animation])

Get the animation in object form, where a disabled animation is always returned as { duration: 0 }.

参数:
名字 类型 特质 默认值 详情
animation boolean | Highcharts.AnimationOptionsObject <可选>
0

An animation setting. Can be an object with duration, complete and easing properties, or a boolean to enable or disable.

返回值:
Highcharts.AnimationOptionsObject .

An object with at least a duration property.

<static> arrayMax(data)

Non-recursive method to find the lowest member of an array. Math.max raises a maximum call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This method is slightly slower, but safe.

参数:
名字 类型 详情
data Array.<*>

An array of numbers.

返回值:
number .

The highest number.

<static> arrayMin(data)

Non-recursive method to find the lowest member of an array. Math.min raises a maximum call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This method is slightly slower, but safe.

参数:
名字 类型 详情
data Array.<*>

An array of numbers.

返回值:
number .

The lowest number.

<static> attr(elem [, prop] [, value])

Set or get an attribute or an object of attributes.

To use as a setter, pass a key and a value, or let the second argument be a collection of keys and values. When using a collection, passing a value of null or undefined will remove the attribute.

To use as a getter, pass only a string as the second argument.

参数:
名字 类型 特质 详情
elem Highcharts.HTMLDOMElement | Highcharts.SVGDOMElement

The DOM element to receive the attribute(s).

prop string | Highcharts.HTMLAttributes | Highcharts.SVGAttributes <可选>

The property or an object of key-value pairs.

value number | string <可选>

The value if a single property is set.

返回值:
string | null | undefined .

When used as a getter, return the value.

<static> chart( [renderTo], options [, callback])

Factory function for basic charts.

参数:
名字 类型 特质 详情
renderTo string | Highcharts.HTMLDOMElement <可选>

The DOM element to render to, or its id.

options Highcharts.Options

The chart options structure.

callback Highcharts.ChartCallbackFunction <可选>

Function to run when the chart has loaded and and all external images are loaded. Defining a chart.events.load handler is equivalent.

返回值:
Highcharts.Chart .

Returns the Chart object.

Example
// Render a chart in to div#container
let chart = Highcharts.chart('container', {
    title: {
        text: 'My chart'
    },
    series: [{
        data: [1, 3, 2, 4]
    }]
});

<static> clearTimeout(id)

Internal clear timeout. The function checks that the id was not removed (e.g. by chart.destroy()). For the details see issue #7901.

参数:
名字 类型 详情
id number

Id of a timeout.

返回值:

<static> color(input)

Creates a color instance out of a color string.

参数:
名字 类型 详情
input Highcharts.ColorType

The input color in either rbga or hex format

返回值:
Highcharts.Color .

Color instance

<static> correctFloat(num [, prec])

Fix JS round off float errors.

参数:
名字 类型 特质 默认值 详情
num number

A float number to fix.

prec number <可选>
14

The precision.

返回值:
number .

The corrected float number.

<static> createElement(tag [, attribs] [, styles] [, parent] [, nopad])

Utility function to create an HTML element with attributes and styles.

参数:
名字 类型 特质 默认值 详情
tag string

The HTML tag.

attribs Highcharts.HTMLAttributes <可选>

Attributes as an object of key-value pairs.

styles Highcharts.CSSObject <可选>

Styles as an object of key-value pairs.

parent Highcharts.HTMLDOMElement <可选>

The parent HTML object.

nopad boolean <可选>
false

If true, remove all padding, border and margin.

返回值:
Highcharts.HTMLDOMElement .

The created DOM element.

<static> css(el, styles)

Set CSS on a given element.

参数:
名字 类型 详情
el Highcharts.HTMLDOMElement | Highcharts.SVGDOMElement

An HTML DOM element.

styles Highcharts.CSSObject

Style object with camel case property names.

返回值:

<static> data(dataOptions [, chartOptions] [, chart])

Creates a data object to parse data for a chart.

参数:
名字 类型 特质 详情
dataOptions Highcharts.DataOptions
chartOptions Highcharts.Options <可选>
chart Highcharts.Chart <可选>
返回值:

<static> defined(obj)

Check if an object is null or undefined.

参数:
名字 类型 详情
obj *

The object to check.

返回值:
boolean .

False if the object is null or undefined, otherwise true.

<static> destroyObjectProperties(obj [, except])

Utility method that destroys any SVGElement instances that are properties on the given object. It loops all properties and invokes destroy if there is a destroy method. The property is then delete.

参数:
名字 类型 特质 详情
obj *

The object to destroy properties on.

except * <可选>

Exception, do not destroy this property, only delete it.

<static> discardElement(element)

Discard a HTML element by moving it to the bin and delete.

参数:
名字 类型 详情
element Highcharts.HTMLDOMElement

The HTML node to discard.

<static> downloadSVGLocal(svg, options, failCallback [, successCallback])

Get data URL to an image of an SVG and call download on it options object:

  • filename: Name of resulting downloaded file without extension. Default is chart.

  • type: File type of resulting download. Default is image/png.

  • scale: Scaling factor of downloaded image compared to source. Default is 1.

  • libURL: URL pointing to location of dependency scripts to download on demand. Default is the exporting.libURL option of the global Highcharts options pointing to our server.

参数:
名字 类型 特质 详情
svg string

The generated SVG

options Highcharts.ExportingOptions

The exporting options

failCallback function

The callback function in case of errors

successCallback function <可选>

The callback function in case of success

返回值:

<static> each(arr, fn [, ctx])

Iterate over an array.

参数:
名字 类型 特质 详情
arr Array.<*>

The array to iterate over.

fn function

The iterator callback. It passes three arguments: - item: The array item. - index: The item's index in the array. - arr: The array that each is being applied to.

ctx * <可选>

The context.

Deprecated:
  • Yes
返回值:

<static> erase(arr, item)

Remove the last occurence of an item from an array.

参数:
名字 类型 详情
arr Array.<*>

The array.

item *

The item to remove.

返回值:

<static> error(code [, stop] [, chart] [, params])

Provide error messages for debugging, with links to online explanation. This function can be overridden to provide custom error handling.

参数:
名字 类型 特质 默认值 详情
code number | string

The error code. See errors.xml for available codes. If it is a string, the error message is printed directly in the console.

stop boolean <可选>
false

Whether to throw an error or just log a warning in the console.

chart Highcharts.Chart <可选>

Reference to the chart that causes the error. Used in 'debugger' module to display errors directly on the chart. Important note: This argument is undefined for errors that lack access to the Chart instance. In such case, the error will be displayed on the last created chart.

params Highcharts.Dictionary.<string> <可选>

Additional parameters for the generated message.

返回值:
在线示例

<static> extend(a, b)

Utility function to extend an object with the members of another.

参数:
名字 类型 详情
a T | undefined

The object to be extended.

b Partial.<T>

The object to add to the first one.

返回值:
T .

Object a, the original object.

<static> extendClass(parent, members)

Extend a prototyped class by new members.

参数:
名字 类型 详情
parent Highcharts.Class.<T>

The parent prototype to inherit.

members Highcharts.Dictionary.<*>

A collection of prototype members to add or override compared to the parent prototype.

返回值:
Highcharts.Class.<T> .

A new prototype.

<static> find(arr, callback)

Return the value of the first element in the array that satisfies the provided testing function.

参数:
名字 类型 详情
arr Array.<T>

The array to test.

callback function

The callback function. The function receives the item as the first argument. Return true if this item satisfies the condition.

返回值:
T | undefined .

The value of the element.

<static> fireEvent(el, type [, eventArguments] [, defaultFunction])

Fire an event that was registered with Highcharts#addEvent.

参数:
名字 类型 特质 详情
el T

The object to fire the event on. It can be a HTMLDOMElement, an Highcharts.SVGElement or any other object.

type string

The type of event.

eventArguments Highcharts.Dictionary.<*> | Event <可选>

Custom event arguments that are passed on as an argument to the event handler.

defaultFunction Highcharts.EventCallbackFunction.<T> | function <可选>

The default function to execute if the other listeners haven't returned false.

返回值:

<static> ganttChart(renderTo, options [, callback])

The factory function for creating new gantt charts. Creates a new GanttChart object with different default options than the basic Chart.

参数:
名字 类型 特质 详情
renderTo string | Highcharts.HTMLDOMElement

The DOM element to render to, or its id.

options Highcharts.Options

The chart options structure.

callback Highcharts.ChartCallbackFunction <可选>

Function to run when the chart has loaded and and all external images are loaded. Defining a chart.events.load handler is equivalent.

返回值:
Highcharts.GanttChart .

Returns the Chart object.

Example
// Render a chart in to div#container
let chart = Highcharts.ganttChart('container', {
    title: {
        text: 'My chart'
    },
    series: [{
        data: ...
    }]
});

<static> geojson(geojson [, hType])

Highmaps only. Restructure a GeoJSON object in preparation to be read directly by the series.mapData option. The GeoJSON will be broken down to fit a specific Highcharts type, either map, mapline or mappoint. Meta data in GeoJSON's properties object will be copied directly over to Highcharts.Point.properties in Highmaps.

参数:
名字 类型 特质 默认值 详情
geojson Highcharts.GeoJSON

The GeoJSON structure to parse, represented as a JavaScript object rather than a JSON string.

hType string <可选>
map

The Highmaps series type to prepare for. Setting "map" will return GeoJSON polygons and multipolygons. Setting "mapline" will return GeoJSON linestrings and multilinestrings. Setting "mappoint" will return GeoJSON points and multipoints.

依赖:
  • module:modules/map
返回值:
Array.<*> .

An object ready for the mapData option.

在线示例

<static> getDeferredAnimation(chart, animation [, series])

Get the defer as a number value from series animation options.

参数:
名字 类型 特质 详情
chart Highcharts.Chart

The chart instance.

animation boolean | Highcharts.AnimationOptionsObject

An animation setting. Can be an object with duration, complete and easing properties, or a boolean to enable or disable.

series Highcharts.Series <可选>

Series to defer animation.

返回值:
number .

The numeric value.

<static> getJSON(url, success)

Get a JSON resource over XHR, also supporting CORS without preflight.

参数:
名字 类型 详情
url string

The URL to load.

success function

The success callback. For error handling, use the Highcharts.ajax function instead.

<static> getMagnitude(num)

Get the magnitude of a number.

参数:
名字 类型 详情
num number

The number.

返回值:
number .

The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.

<static> getOptions()

Get the updated default options. Until 3.0.7, merely exposing defaultOptions for outside modules wasn't enough because the setOptions method created a new object.

返回值:

<static> getStyle(el, prop [, toInt])

Get the computed CSS value for given element and property, only for numerical properties. For width and height, the dimension of the inner box (excluding padding) is returned. Used for fitting the chart within the container.

参数:
名字 类型 特质 默认值 详情
el Highcharts.HTMLDOMElement

An HTML element.

prop string

The property name.

toInt boolean <可选>
true

Parse to integer.

返回值:
number | string | undefined .

The style value.

<static> grep(arr, callback)

Filter an array by a callback.

参数:
名字 类型 详情
arr Array.<*>

The array to filter.

callback function

The callback function. The function receives the item as the first argument. Return true if the item is to be preserved.

Deprecated:
  • Yes
返回值:
Array.<*> .

A new, filtered array.

<static> i18nFormat(formatString, context, chart)

i18n formatting function. Extends Highcharts.format() functionality by also handling arrays and plural conditionals. Arrays can be indexed as follows:

  • Format: 'This is the first index: {myArray[0]}. The last: {myArray[-1]}.'

  • Context: { myArray: [0, 1, 2, 3, 4, 5] }

  • Result: 'This is the first index: 0. The last: 5.'

They can also be iterated using the #each() function. This will repeat the contents of the bracket expression for each element. Example:

  • Format: 'List contains: {#each(myArray)cm }'

  • Context: { myArray: [0, 1, 2] }

  • Result: 'List contains: 0cm 1cm 2cm '

The #each() function optionally takes a length parameter. If positive, this parameter specifies the max number of elements to iterate through. If negative, the function will subtract the number from the length of the array. Use this to stop iterating before the array ends. Example:

  • Format: 'List contains: {#each(myArray, -1), }and {myArray[-1]}.'

  • Context: { myArray: [0, 1, 2, 3] }

  • Result: 'List contains: 0, 1, 2, and 3.'

Use the #plural() function to pick a string depending on whether or not a context object is 1. Arguments are #plural(obj, plural, singular). Example:

  • Format: 'Has {numPoints} {#plural(numPoints, points, point}.'

  • Context: { numPoints: 5 }

  • Result: 'Has 5 points.'

Optionally there are additional parameters for dual and none: #plural(obj, plural, singular, dual, none). Example:

  • Format: 'Has {#plural(numPoints, many points, one point, two points, none}.'

  • Context: { numPoints: 2 }

  • Result: 'Has two points.'

The dual or none parameters will take precedence if they are supplied.

参数:
名字 类型 详情
formatString string

The string to format.

context Highcharts.Dictionary.<*>

Context to apply to the format string.

chart Highcharts.Chart

A Chart instance with a time object and numberFormatter, passed on to format().

依赖:
  • module:modules/accessibility
返回值:
string .

The formatted string.

<static> inArray(item, arr [, fromIndex])

Search for an item in an array.

参数:
名字 类型 特质 默认值 详情
item *

The item to search for.

arr Array.<*>

The array or node collection to search in.

fromIndex number <可选>
0

The index to start searching from.

Deprecated:
  • Yes
返回值:
number .

The index within the array, or -1 if not found.

<static> isArray(obj)

Utility function to check if an item is an array.

参数:
名字 类型 详情
obj *

The item to check.

返回值:
boolean .

True if the argument is an array.

<static> isClass(obj)

Utility function to check if an Object is a class.

参数:
名字 类型 详情
obj object | undefined

The item to check.

返回值:
boolean .

True if the argument is a class.

<static> isDOMElement(obj)

Utility function to check if an Object is a HTML Element.

参数:
名字 类型 详情
obj *

The item to check.

返回值:
boolean .

True if the argument is a HTML Element.

<static> isNumber(n)

Utility function to check if an item is a number and it is finite (not NaN, Infinity or -Infinity).

参数:
名字 类型 详情
n *

The item to check.

返回值:
boolean .

True if the item is a finite number

<static> isObject(obj [, strict])

Utility function to check if an item is of type object.

参数:
名字 类型 特质 默认值 详情
obj *

The item to check.

strict boolean <可选>
false

Also checks that the object is not an array.

返回值:
boolean .

True if the argument is an object.

<static> isString(s)

Utility function to check for string type.

参数:
名字 类型 详情
s *

The item to check.

返回值:
boolean .

True if the argument is a string.

<static> keys(obj)

Returns an array of a given object's own properties.

参数:
名字 类型 详情
obj *

The object of which the properties are to be returned.

Deprecated:
  • Yes
返回值:
Array.<string> .

An array of strings that represents all the properties.

<static> map(arr, fn)

Map an array by a callback.

参数:
名字 类型 详情
arr Array.<*>

The array to map.

fn function

The callback function. Return the new value for the new array.

Deprecated:
  • Yes
返回值:
Array.<*> .

A new array item with modified items.

<static> mapChart( [renderTo], options [, callback])

The factory function for creating new map charts. Creates a new MapChart object with different default options than the basic Chart.

参数:
名字 类型 特质 详情
renderTo string | Highcharts.HTMLDOMElement <可选>

The DOM element to render to, or its id.

options Highcharts.Options

The chart options structure as described in the options reference.

callback Highcharts.ChartCallbackFunction <可选>

A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initialized before the document is ready, and in these cases the chart object will not be finished synchronously. As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.events.load handler is equivalent.

依赖:
  • module:modules/map
返回值:
Highcharts.MapChart .

The chart object.

<static> merge(extend, a [, n])

Utility function to deep merge two or more objects and return a third object. If the first argument is true, the contents of the second object is copied into the first object. The merge function can also be used with a single object argument to create a deep copy of an object.

参数:
名字 类型 特质 详情
extend boolean

Whether to extend the left-side object (a) or return a whole new object.

a T | undefined

The first object to extend. When only this is given, the function returns a deep copy.

n Array.<(object|undefined)> <可选>
<可重复>

An object to merge into the previous one.

返回值:
T .

The merged object. If the first argument is true, the return is the same as the second argument.

<static> merge(a [, n])

Utility function to deep merge two or more objects and return a third object. The merge function can also be used with a single object argument to create a deep copy of an object.

参数:
名字 类型 特质 详情
a T | undefined

The first object to extend. When only this is given, the function returns a deep copy.

n Array.<(object|undefined)> <可选>
<可重复>

An object to merge into the previous one.

返回值:
T .

The merged object. If the first argument is true, the return is the same as the second argument.

<static> normalizeTickInterval(interval [, multiples] [, magnitude] [, allowDecimals] [, hasTickAmount])

Take an interval and normalize it to multiples of round numbers.

参数:
名字 类型 特质 详情
interval number

The raw, un-rounded interval.

multiples Array.<*> <可选>

Allowed multiples.

magnitude number <可选>

The magnitude of the number.

allowDecimals boolean <可选>

Whether to allow decimals.

hasTickAmount boolean <可选>

If it has tickAmount, avoid landing on tick intervals lower than original.

Deprecated:
  • Yes
To Do:
  • Move this function to the Axis prototype. It is here only for historical reasons.
返回值:
number .

The normalized interval.

<static> objectEach(obj, fn [, ctx])

Iterate over object key pairs in an object.

参数:
名字 类型 特质 详情
obj *

The object to iterate over.

fn Highcharts.ObjectEachCallbackFunction.<T>

The iterator callback. It passes three arguments: * value - The property value. * key - The property key. * obj - The object that objectEach is being applied to.

ctx T <可选>

The context.

返回值:

<static> offset(el)

Get the element's offset position, corrected for overflow: auto.

参数:
名字 类型 详情
el global.Element

The DOM element.

返回值:
Highcharts.OffsetObject .

An object containing left and top properties for the position in the page.

<static> pad(number [, length] [, padder])

Left-pad a string to a given length by adding a character repetetively.

参数:
名字 类型 特质 默认值 详情
number number

The input string or number.

length number <可选>

The desired string length.

padder string <可选>
0

The character to pad with.

返回值:
string .

The padded string.

<static> pick(items)

Return the first value that is not null or undefined.

参数:
名字 类型 特质 详情
items Array.<(T|null|undefined)> <可重复>

Variable number of arguments to inspect.

返回值:
T .

The value of the first argument that is not null or undefined.

<static> reduce(arr, fn, initialValue)

Reduce an array to a single value.

参数:
名字 类型 详情
arr Array.<*>

The array to reduce.

fn function

The callback function. Return the reduced value. Receives 4 arguments: Accumulated/reduced value, current value, current array index, and the array.

initialValue *

The initial value of the accumulator.

Deprecated:
  • Yes
返回值:
* .

The reduced value.

<static> relativeLength(value, base [, offset])

Return a length based on either the integer value, or a percentage of a base.

参数:
名字 类型 特质 默认值 详情
value Highcharts.RelativeSize

A percentage string or a number.

base number

The full length that represents 100%.

offset number <可选>
0

A pixel offset to apply for percentage values. Used internally in axis positioning.

返回值:
number .

The computed length.

<static> removeEvent(el [, type] [, fn])

Remove an event that was added with Highcharts#addEvent.

参数:
名字 类型 特质 详情
el Highcharts.Class.<T> | T

The element to remove events on.

type string <可选>

The type of events to remove. If undefined, all events are removed from the element.

fn Highcharts.EventCallbackFunction.<T> <可选>

The specific callback to remove. If undefined, all events that match the element and optionally the type are removed.

返回值:

<static> setAnimation(animation, chart)

Set the global animation to either a given value, or fall back to the given chart's animation option.

参数:
名字 类型 详情
animation boolean | Partial.<Highcharts.AnimationOptionsObject> | undefined

The animation object.

chart Highcharts.Chart

The chart instance.

To Do:
  • This function always relates to a chart, and sets a property on the renderer, so it should be moved to the SVGRenderer.

<static> setOptions(options)

Merge the default options with custom options and return the new options structure. Commonly used for defining reusable templates.

参数:
名字 类型 详情
options Highcharts.Options

The new custom chart options.

返回值:
Highcharts.Options .

Updated options.

在线示例

<static> some(arr, fn, ctx)

Test whether at least one element in the array passes the test implemented by the provided function.

参数:
名字 类型 详情
arr Array.<*>

The array to test

fn function

The function to run on each item. Return truty to pass the test. Receives arguments currentValue, index and array.

ctx *

The context.

Deprecated:
  • Yes
返回值:

<static> splat(obj)

Check if an element is an array, and if not, make it into an array.

参数:
名字 类型 详情
obj *

The object to splat.

返回值:
Array .

The produced or original array.

<static> splitPath(path)

Utility for reading SVG paths directly.

参数:
名字 类型 详情
path string | Array.<(string|number)>
依赖:
  • module:modules/map
返回值:

<static> stableSort(arr, sortFunction)

Sort an object array and keep the order of equal items. The ECMAScript standard does not specify the behaviour when items are equal.

参数:
名字 类型 详情
arr Array.<*>

The array to sort.

sortFunction function

The function to sort it with, like with regular Array.prototype.sort.

返回值:

<static> stockChart( [renderTo], options [, callback])

Factory function for creating new stock charts. Creates a new StockChart object with different default options than the basic Chart.

参数:
名字 类型 特质 详情
renderTo string | Highcharts.HTMLDOMElement <可选>

The DOM element to render to, or its id.

options Highcharts.Options

The chart options structure as described in the options reference.

callback Highcharts.ChartCallbackFunction <可选>

A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initialized before the document is ready, and in these cases the chart object will not be finished synchronously. As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.events.load handler is equivalent.

返回值:
Highcharts.StockChart .

The chart object.

Example
let chart = Highcharts.stockChart('container', {
    series: [{
        data: [1, 2, 3, 4, 5, 6, 7, 8, 9],
        pointInterval: 24 * 60 * 60 * 1000
    }]
});

<static> stop(el [, prop])

Stop running animation.

参数:
名字 类型 特质 详情
el Highcharts.SVGElement

The SVGElement to stop animation on.

prop string <可选>

The property to stop animating. If given, the stop method will stop a single property from animating, while others continue.

To Do:
  • A possible extension to this would be to stop a single property, when we want to continue animating others. Then assign the prop to the timer in the Fx.run method, and check for the prop here. This would be an improvement in all cases where we stop the animation from .attr. Instead of stopping everything, we can just stop the actual attributes we're setting.
返回值:

<static> syncTimeout(fn, delay [, context])

Set a timeout if the delay is given, otherwise perform the function synchronously.

参数:
名字 类型 特质 详情
fn function

The function callback.

delay number

Delay in milliseconds.

context * <可选>

An optional context to send to the function callback.

返回值:
number .

An identifier for the timeout that can later be cleared with Highcharts.clearTimeout. Returns -1 if there is no timeout.

<static> uniqueKey()

Get a unique key for using in internal element id's and pointers. The key is composed of a random hash specific to this Highcharts instance, and a counter.

返回值:
string .

A unique key.

Example
let id = uniqueKey(); // => 'highcharts-x45f6hp-0'

<static> useSerialIds( [mode])

Activates a serial mode for element IDs provided by Highcharts.uniqueKey. This mode can be used in automated tests, where a simple comparison of two rendered SVG graphics is needed.

Note: This is only for testing purposes and will break functionality in webpages with multiple charts.

参数:
名字 类型 特质 详情
mode boolean <可选>

Changes the state of serial mode.

返回值:
boolean | undefined .

State of the serial mode.

Example
if (
  process &&
  process.env.NODE_ENV === 'development'
) {
  Highcharts.useSerialIds(true);
}

<static> wrap(obj, method, func)

Wrap a method with extended functionality, preserving the original function.

参数:
名字 类型 详情
obj *

The context object that the method belongs to. In real cases, this is often a prototype.

method string

The name of the method to extend.

func Highcharts.WrapProceedFunction

A wrapper function callback. This function is called with the same arguments as the original function, except that the original function is unshifted and passed as the first argument.

类型定义

AlignValue

The horizontal alignment of an element.

Type:
  • "center" | "left" | "right"

AnimationStepCallbackFunction(this)

Creates a frame for the animated SVG element.

参数:
名字 类型 详情
this Highcharts.SVGElement

The SVG element to animate.

返回值:

AnnotationControlPointPositionerFunction(this, target)

Callback to modify annotation's possitioner controls.

参数:
名字 类型 详情
this Highcharts.AnnotationControlPoint
target Highcharts.AnnotationControllable
返回值:

AnnotationDraggableValue

Possible directions for draggable annotations. An empty string ('') makes the annotation undraggable.

Type:
  • '' | 'x' | 'xy' | 'y'

AnnotationMockPointFunction(annotation)

Callback function that returns the annotation shape point.

参数:
名字 类型 详情
annotation Highcharts.Annotation

An annotation instance.

返回值:
Highcharts.AnnotationMockPointOptionsObject .

Annotations shape point.

AnnotationShapePointOptions

Shape point as string, object or function.

Type:

AxisCrosshairOptions

Options for crosshairs on axes.

Type:
  • Highcharts.XAxisCrosshairOptions | Highcharts.YAxisCrosshairOptions

AxisEventCallbackFunction(this)

参数:
名字 类型 详情
this Highcharts.Axis

AxisExtremesTriggerValue

Type:
  • "navigator" | "pan" | "rangeSelectorButton" | "rangeSelectorInput" | "scrollbar" | "traverseUpButton" | "zoom"

AxisLabelsFormatterCallbackFunction(this, ctx)

参数:
名字 类型 详情
this Highcharts.AxisLabelsFormatterContextObject
ctx Highcharts.AxisLabelsFormatterContextObject
返回值:

AxisOptions

Options for axes.

Type:
  • Highcharts.XAxisOptions | Highcharts.YAxisOptions | Highcharts.ZAxisOptions

AxisPlotBandsLabelOptions

Options for plot band labels on axes.

Type:
  • Highcharts.XAxisPlotBandsLabelOptions | Highcharts.YAxisPlotBandsLabelOptions | Highcharts.ZAxisPlotBandsLabelOptions

AxisPlotBandsOptions

Options for plot bands on axes.

Type:
  • Highcharts.XAxisPlotBandsOptions | Highcharts.YAxisPlotBandsOptions | Highcharts.ZAxisPlotBandsOptions

AxisPlotLinesLabelOptions

Options for plot line labels on axes.

Type:
  • Highcharts.XAxisPlotLinesLabelOptions | Highcharts.YAxisPlotLinesLabelOptions | Highcharts.ZAxisPlotLinesLabelOptions

AxisPlotLinesOptions

Options for plot lines on axes.

Type:
  • Highcharts.XAxisPlotLinesOptions | Highcharts.YAxisPlotLinesOptions | Highcharts.ZAxisPlotLinesOptions

AxisPointBreakEventCallbackFunction(this, evt)

参数:
名字 类型 详情
this Highcharts.Axis
evt Highcharts.AxisPointBreakEventObject

AxisSetExtremesEventCallbackFunction(this, evt)

参数:
名字 类型 详情
this Highcharts.Axis
evt Highcharts.AxisSetExtremesEventObject

AxisTickPositionerCallbackFunction(this)

参数:
名字 类型 详情
this Highcharts.Axis
返回值:

AxisTitleAlignValue

Type:
  • "high" | "low" | "middle"

AxisTitleOptions

Type:
  • Highcharts.XAxisTitleOptions | Highcharts.YAxisTitleOptions | Highcharts.ZAxisTitleOptions

AxisTypeValue

Type:
  • "linear" | "logarithmic" | "datetime" | "category" | "treegrid"

ButtonRelativeToValue

Type:
  • "plotBox" | "spacingBox"

ChartAddSeriesCallbackFunction(this, event)

Gets fired when a series is added to the chart after load time, using the addSeries method. Returning false prevents the series from being added.

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event Highcharts.ChartAddSeriesEventObject

The event that occured.

ChartCallbackFunction(chart)

Callback for chart constructors.

参数:
名字 类型 详情
chart Highcharts.Chart

Created chart.

ChartClickCallbackFunction(this, event)

Gets fired when clicking on the plot background.

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event Highcharts.PointerEventObject

The event that occured.

ChartLoadCallbackFunction(this, event)

Gets fired when the chart is finished loading.

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event global.Event

The event that occured.

ChartRedrawCallbackFunction(this, event)

Fires when the chart is redrawn, either after a call to chart.redraw() or after an axis, series or point is modified with the redraw option set to true.

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event global.Event

The event that occured.

ChartRenderCallbackFunction(this, event)

Gets fired after initial load of the chart (directly after the load event), and after each redraw (directly after the redraw event).

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event global.Event

The event that occured.

ChartSelectionCallbackFunction(this, event)

Gets fired when an area of the chart has been selected. The default action for the selection event is to zoom the chart to the selected area. It can be prevented by calling event.preventDefault() or return false.

参数:
名字 类型 详情
this Highcharts.Chart

The chart on which the event occured.

event global.ChartSelectionContextObject

Event informations

返回值:
boolean | undefined .

Return false to prevent the default action, usually zoom.

ClipRectElement

A clipping rectangle that can be applied to one or more Highcharts.SVGElement instances. It is instanciated with the Highcharts.SVGRenderer#clipRect function and applied with the Highcharts.SVGElement#clip function.

Type:
示例
let circle = renderer.circle(100, 100, 100)
    .attr({ fill: 'red' })
    .add();
let clipRect = renderer.clipRect(100, 100, 100, 100);

// Leave only the lower right quarter visible
circle.clip(clipRect);

ColorAxisTypeValue

Color axis types

Type:
  • "linear" | "logarithmic"

ColorString

A valid color to be parsed and handled by Highcharts. Highcharts internally supports hex colors like #ffffff, rgb colors like rgb(255,255,255) and rgba colors like rgba(255,255,255,1). Other colors may be supported by the browsers and displayed correctly, but Highcharts is not able to process them and apply concepts like opacity and brightening.

Type:
  • string

ColorType

A valid color type than can be parsed and handled by Highcharts. It can be a color string, a gradient object, or a pattern object.

Type:

CursorValue

All possible cursor styles.

Type:
  • 'alias' | 'all-scroll' | 'auto' | 'cell' | 'col-resize' | 'context-menu' | 'copy' | 'crosshair' | 'default' | 'e-resize' | 'ew-resize' | 'grab' | 'grabbing' | 'help' | 'move' | 'n-resize' | 'ne-resize' | 'nesw-resize' | 'no-drop' | 'none' | 'not-allowed' | 'ns-resize' | 'nw-resize' | 'nwse-resize' | 'pointer' | 'progress' | 'row-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'text' | 'vertical-text' | 'w-resize' | 'wait' | 'zoom-in' | 'zoom-out'

DashStyleValue

All possible dash styles.

Type:
  • 'Dash' | 'DashDot' | 'Dot' | 'LongDash' | 'LongDashDot' | 'LongDashDotDot' | 'ShortDash' | 'ShortDashDot' | 'ShortDashDotDot' | 'ShortDot' | 'Solid'

DataBeforeParseCallbackFunction(csv)

Callback function to modify the CSV before parsing it by the data module.

参数:
名字 类型 详情
csv string

The CSV to modify.

返回值:
string .

The CSV to parse.

DataCompleteCallbackFunction(chartOptions)

Callback function that gets called after parsing data.

参数:
名字 类型 详情
chartOptions Highcharts.Options

The chart options that were used.

DataDateFormatCallbackFunction(match)

Callback function that returns the correspondig Date object to a match.

参数:
名字 类型 详情
match Array.<number>
返回值:

DataGroupingAnchor

The position of the point inside the group.

Type:
  • "start" | "middle" | "end"

DataGroupingAnchorExtremes

The position of the first or last point in the series inside the group.

Type:
  • "start" | "middle" | "end" | "firstPoint" | "lastPoint"

DataGroupingApproximationValue

Type:
  • "average" | "averages" | "open" | "high" | "low" | "close" | "sum"

DataLabelsFormatterCallbackFunction(this, options)

Callback JavaScript function to format the data label as a string. Note that if a format is defined, the format takes precedence and the formatter is ignored.

参数:
名字 类型 详情
this Highcharts.PointLabelObject

Data label context to format

options Highcharts.DataLabelsOptions

API options of the data label

返回值:
number | string | null | undefined .

Formatted data label text

DataLabelsOverflowValue

Values for handling data labels that flow outside the plot area.

Type:
  • "allow" | "justify"

DataParseDateCallbackFunction(dateValue)

Callback function to parse string representations of dates into JavaScript timestamps (milliseconds since 1.1.1970).

参数:
名字 类型 详情
dateValue string
返回值:
number .

Timestamp (milliseconds since 1.1.1970) as integer for Date class.

DataParsedCallbackFunction(columns)

Callback function to access the parsed columns, the two-dimentional input data array directly, before they are interpreted into series data and categories.

参数:
名字 类型 详情
columns Array.<Array.<*>>

The parsed columns by the data module.

返回值:
boolean | undefined .

Return false to stop completion, or call this.complete() to continue async.

DataValueType

Possible types for a data item in a column or row.

Type:
  • number | string | null

DrilldownCallbackFunction(this, e)

Gets fired when a drilldown point is clicked, before the new series is added. Note that when clicking a category label to trigger multiple series drilldown, one drilldown event is triggered per point in the category.

参数:
名字 类型 详情
this Highcharts.Chart

The chart where the event occurs.

e Highcharts.DrilldownEventObject

The drilldown event.

DrillupAllCallbackFunction(this, e)

This gets fired after all the series have been drilled up. This is especially usefull in a chart with multiple drilldown series.

参数:
名字 类型 详情
this Highcharts.Chart

The chart where the event occurs.

e Highcharts.DrillupAllEventObject

The final drillup event.

DrillupCallbackFunction(this, e)

Gets fired when drilling up from a drilldown series.

参数:
名字 类型 详情
this Highcharts.Chart

The chart where the event occurs.

e Highcharts.DrillupEventObject

The drillup event.

EventCallbackFunction(this [, eventArguments])

The function callback to execute when the event is fired. The this context contains the instance, that fired the event.

参数:
名字 类型 特质 详情
this T
eventArguments Highcharts.Dictionary.<*> | Event <可选>

Event arguments.

返回值:

ExportDataCallbackFunction(this, event)

Function callback to execute while data rows are processed for exporting. This allows the modification of data rows before processed into the final format.

参数:
名字 类型 详情
this Highcharts.Chart

Chart context where the event occured.

event Highcharts.ExportDataEventObject

Event object with data rows that can be modified.

ExportingAfterPrintCallbackFunction(chart, event)

Gets fired after a chart is printed through the context menu item or the Chart.print method.

参数:
名字 类型 详情
chart Highcharts.Chart

The chart on which the event occured.

event global.Event

The event that occured.

ExportingBeforePrintCallbackFunction(chart, event)

Gets fired before a chart is printed through the context menu item or the Chart.print method.

参数:
名字 类型 详情
chart Highcharts.Chart

The chart on which the event occured.

event global.Event

The event that occured.

ExportingErrorCallbackFunction(options, err)

Function to call if the offline-exporting module fails to export a chart on the client side.

参数:
名字 类型 详情
options Highcharts.ExportingOptions

The exporting options.

err global.Error

The error from the module.

ExportingMimeTypeValue

Possible MIME types for exporting.

Type:
  • "image/png" | "image/jpeg" | "application/pdf" | "image/svg+xml"

FormatterCallbackFunction(this)

Formats data as a string. Usually the data is accessible throught the this keyword.

参数:
名字 类型 详情
this T

Context to format

返回值:
string .

Formatted text

HTMLAttributes

An object of key-value pairs for HTML attributes.

Type:
  • Highcharts.Dictionary.<(boolean|number|string|function())>

HTMLDOMElement

An HTML DOM element. The type is a reference to the regular HTMLElement in the global scope.

Type:
  • global.HTMLElement
See also:

MarkerClusterDrillCallbackFunction(this, event)

Function callback when a cluster is clicked.

参数:
名字 类型 详情
this Highcharts.Point

The point where the event occured.

event Highcharts.PointClickEventObject

Event arguments.

NumberFormatterCallbackFunction(number, decimals [, decimalPoint] [, thousandsSep])

Format a number and return a string based on input settings.

参数:
名字 类型 特质 详情
number number

The input number to format.

decimals number

The amount of decimals. A value of -1 preserves the amount in the input number.

decimalPoint string <可选>

The decimal point, defaults to the one given in the lang options, or a dot.

thousandsSep string <可选>

The thousands separator, defaults to the one given in the lang options, or a space character.

返回值:
string .

The formatted number.

ObjectEachCallbackFunction(this, value, key, obj)

The iterator callback.

参数:
名字 类型 详情
this T

The context.

value *

The property value.

key string

The property key.

obj *

The object that objectEach is being applied to.

PointClickCallbackFunction(this, event)

Function callback when a series point is clicked. Return false to cancel the action.

参数:
名字 类型 详情
this Highcharts.Point

The point where the event occured.

event Highcharts.PointClickEventObject

Event arguments.

PointDragCallbackFunction(this, event)

Function callback to execute while series points are dragged. Return false to stop the default drag action.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointDragEventObject

Event arguments.

PointDragStartCallbackFunction(this, event)

Function callback to execute when a series point is dragged.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointDragStartEventObject

Event arguments.

PointDropCallbackFunction(this, event)

Function callback to execute when series points are dropped.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointDropEventObject

Event arguments.

PointLegendItemClickCallbackFunction(this, event)

Gets fired when the legend item belonging to a point is clicked. The default action is to toggle the visibility of the point. This can be prevented by returning false or calling event.preventDefault().

参数:
名字 类型 详情
this Highcharts.Point

The point on which the event occured.

event Highcharts.PointLegendItemClickEventObject

The event that occured.

PointMouseOutCallbackFunction(this, event)

Gets fired when the mouse leaves the area close to the point.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event global.PointerEvent

Event that occured.

PointMouseOverCallbackFunction(this, event)

Gets fired when the mouse enters the area close to the point.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event global.Event

Event that occured.

PointOptionsType

Possible option types for a data point. Use null to indicate a gap.

Type:

PointRemoveCallbackFunction(this, event)

Gets fired when the point is removed using the .remove() method.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event global.Event

Event that occured.

PointSelectCallbackFunction(this, event)

Gets fired when the point is selected either programmatically or following a click on the point.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointInteractionEventObject

Event that occured.

PointStateValue

Possible key values for the point state options.

Type:
  • "hover" | "inactive" | "normal" | "select"

PointUnselectCallbackFunction(this, event)

Fires when the point is unselected either programmatically or following a click on the point.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointInteractionEventObject

Event that occured.

PointUpdateCallbackFunction(this, event)

Gets fired when the point is updated programmatically through the .update() method.

参数:
名字 类型 详情
this Highcharts.Point

Point where the event occured.

event Highcharts.PointUpdateEventObject

Event that occured.

RelativeSize

If a number is given, it defines the pixel length. If a percentage string is given, like for example '50%', the setting defines a length relative to a base size, for example the size of a container.

Type:
  • number | string

SeriesAfterAnimateCallbackFunction(this, event)

Function callback when a series has been animated.

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event Highcharts.SeriesAfterAnimateEventObject

Event arguments.

SeriesCheckboxClickCallbackFunction(this, event)

Function callback when the checkbox next to the series' name in the legend is clicked.

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event Highcharts.SeriesCheckboxClickEventObject

Event arguments.

SeriesClickCallbackFunction(this, event)

Function callback when a series is clicked. Return false to cancel toogle actions.

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event Highcharts.SeriesClickEventObject

Event arguments.

SeriesHideCallbackFunction(this, event)

Gets fired when the series is hidden after chart generation time, either by clicking the legend item or by calling .hide().

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event global.Event

The event that occured.

SeriesLegendItemClickCallbackFunction(this, event)

Gets fired when the legend item belonging to a series is clicked. The default action is to toggle the visibility of the series. This can be prevented by returning false or calling event.preventDefault().

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event Highcharts.SeriesLegendItemClickEventObject

The event that occured.

SeriesLegendItemClickCallbackFunction(this, event)

Gets fired when the legend item belonging to the series is clicked. The default action is to toggle the visibility of the series. This can be prevented by returning false or calling event.preventDefault().

参数:
名字 类型 详情
this Highcharts.Series

The series where the event occured.

event Highcharts.SeriesLegendItemClickEventObject

The event that occured.

SeriesLinecapValue

The SVG value used for the stroke-linecap and stroke-linejoin of a line graph.

Type:
  • "butt" | "round" | "square" | string

SeriesMouseOutCallbackFunction(this, event)

Gets fired when the mouse leaves the graph.

参数:
名字 类型 详情
this Highcharts.Series

Series where the event occured.

event global.PointerEvent

Event that occured.

SeriesMouseOverCallbackFunction(this, event)

Gets fired when the mouse enters the graph.

参数:
名字 类型 详情
this Highcharts.Series

Series where the event occured.

event global.PointerEvent

Event that occured.

SeriesNetworkgraphDataLabelsFormatterCallbackFunction(this)

Formatter callback function.

参数:
名字 类型 详情
this Highcharts.SeriesNetworkgraphDataLabelsFormatterContextObject | Highcharts.PointLabelObject

Data label context to format

返回值:
string .

Formatted data label text

SeriesOptionsType

This is a placeholder type of the possible series options for Highcharts, Highcharts Stock, Highmaps, and Gantt.

In TypeScript is this dynamically generated to reference all possible types of series options.

Type:
  • Highcharts.SeriesOptions | Highcharts.Dictionary.<*>

SeriesOrganizationNodesLayoutValue

Layout value for the child nodes in an organization chart. If hanging, this node's children will hang below their parent, allowing a tighter packing of nodes in the diagram.

Type:
  • "normal" | "hanging"

SeriesPackedBubbleDataLabelsFormatterCallbackFunction(this)

Formatter callback function.

参数:
名字 类型 详情
this Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject

Data label context to format

返回值:
string .

Formatted data label text

SeriesSankeyDataLabelsFormatterCallbackFunction(this)

Formatter callback function.

参数:
名字 类型 详情
this Highcharts.SeriesSankeyDataLabelsFormatterContextObject | Highcharts.PointLabelObject

Data label context to format

返回值:
string | undefined .

Formatted data label text

SeriesShowCallbackFunction(this, event)

Gets fired when the series is shown after chart generation time, either by clicking the legend item or by calling .show().

参数:
名字 类型 详情
this Highcharts.Series

Series where the event occured.

event global.Event

Event that occured.

SeriesStateValue

Possible key values for the series state options.

Type:
  • "hover" | "inactive" | "normal" | "select"

SVGDOMElement

An SVG DOM element. The type is a reference to the regular SVGElement in the global scope.

Type:
  • globals.GlobalSVGElement
See also:

SVGPathArray

Array of path commands, that will go into the d attribute of an SVG element.

Type:

SVGPathCommand

Possible path commands in an SVG path array. Valid values are A, C, H, L, M, Q, S, T, V, Z.

Type:
  • string

SymbolKeyValue

Can be one of arc, callout, circle, diamond, square, triangle, and triangle-down. Symbols are used internally for point markers, button and label borders and backgrounds, or custom shapes. Extendable by adding to Highcharts.SVGRenderer#symbols.

Type:
  • "arc" | "callout" | "circle" | "diamond" | "square" | "triangle" | "triangle-down"

TimeFormatCallbackFunction(timestamp)

Function of an additional date format specifier.

参数:
名字 类型 详情
timestamp number

The time to format.

返回值:
string .

The formatted portion of the date.

TimelineDataLabelsFormatterCallbackFunction(this)

Callback JavaScript function to format the data label as a string. Note that if a format is defined, the format takes precedence and the formatter is ignored.

参数:
名字 类型 详情
this Highcharts.PointLabelObject | Highcharts.TimelineDataLabelsFormatterContextObject

Data label context to format

返回值:
number | string | null | undefined .

Formatted data label text

TimeUnitValue

Time units used in Time.get and Time.set

Type:
  • "Date" | "Day" | "FullYear" | "Hours" | "Milliseconds" | "Minutes" | "Month" | "Seconds"

TimezoneOffsetCallbackFunction(timestamp)

A callback to return the time zone offset for a given datetime. It takes the timestamp in terms of milliseconds since January 1 1970, and returns the timezone offset in minutes. This provides a hook for drawing time based charts in specific time zones using their local DST crossover dates, with the help of external libraries.

参数:
名字 类型 详情
timestamp number

Timestamp in terms of milliseconds since January 1 1970.

返回值:
number .

Timezone offset in minutes.

TooltipFormatterCallbackFunction(this, tooltip)

Callback function to format the text of the tooltip from scratch.

In case of single or shared tooltips, a string should be be returned. In case of splitted tooltips, it should return an array where the first item is the header, and subsequent items are mapped to the points. Return false to disable tooltip for a specific point on series.

参数:
名字 类型 详情
this Highcharts.TooltipFormatterContextObject

Context to format

tooltip Highcharts.Tooltip

The tooltip instance

返回值:
false | string | Array.<(string|null|undefined)> | null | undefined .

Formatted text or false

TooltipPositionerCallbackFunction(this, labelWidth, labelHeight, point)

A callback function to place the tooltip in a specific position.

参数:
名字 类型 详情
this Highcharts.Tooltip

Tooltip context of the callback.

labelWidth number

Width of the tooltip.

labelHeight number

Height of the tooltip.

point Highcharts.TooltipPositionerPointObject

Point information for positioning a tooltip.

返回值:
Highcharts.PositionObject .

New position for the tooltip.

TooltipShapeValue

Type:
  • "callout" | "circle" | "square"

VerticalAlignValue

The vertical alignment of an element.

Type:
  • "bottom" | "middle" | "top"

WrapProceedFunction( [arg1] [, arg2] [, arg3])

Proceed function to call original (wrapped) function.

参数:
名字 类型 特质 详情
arg1 * <可选>

Optional argument. Without any arguments defaults to first argument of the wrapping function.

arg2 * <可选>

Optional argument. Without any arguments defaults to second argument of the wrapping function.

arg3 * <可选>

Optional argument. Without any arguments defaults to third argument of the wrapping function.

返回值:
* .

Return value of the original function.

XAxisCrosshairLabelFormatterCallbackFunction(this, value)

Formatter function for the text of a crosshair label.

参数:
名字 类型 详情
this Highcharts.Axis

Axis context

value number

Y value of the data point

返回值: