trait Chart extends Object
- Annotations
- @RawJSType() @native()
- Note
JavaScript name:
Chart
- Alphabetic
- By Inheritance
- Chart
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addAxis(options: Object = ???, isX: Boolean = ???, redraw: Boolean = ???, animation: Any = ???): Unit
Add an axis to the chart after render time.
Add an axis to the chart after render time. Note that this method should never be used when adding data synchronously at chart render time, as it adds expense to the calculations and rendering. When adding data at the same time as the chart is initiated, add the axis as a configuration option instead.
- Since
3.0
Example: -
def
addCredits(options: Object = ???): Unit
Set a new credits label for the chart.
Set a new credits label for the chart.
- options
A configuration object for the credits as defined at credits.
- Since
5.0.0
Example: -
def
addSeries(options: Object = ???, redraw: Boolean = ???, animation: Any = ???): CleanJsObject[Series]
Add a series to the chart after render time.
Add a series to the chart after render time. Note that this method should never be used when adding data synchronously at chart render time, as it adds expense to the calculations and rendering. When adding data at the same time as the chart is initiated, add the series as a configuration option instead. With multiple axes, the offset is dynamically adjusted.
- options
The series options, as documented under plotOptions.series and under the plotOptions for each series type.
- Since
1.2.0
Example: -
def
addSeriesAsDrilldown(point: Object = ???, seriesOptions: Object = ???): Unit
Add a series to the chart as drilldown from a specific point in the parent series.
Add a series to the chart as drilldown from a specific point in the parent series. This method is used for async drilldown, when clicking a point in a series should result in loading and displaying a more high-resolution series. When not async, the setup is simpler using the drilldown.series options structure.
- point
The existing Point object from which the drilldown will start.
- Since
3.0.8
Example: -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
container: Object
A reference to the containing HTML element, dynamically inserted into the element given in
chart.renderTo
.A reference to the containing HTML element, dynamically inserted into the element given in
chart.renderTo
.- Since
1.2.5
-
val
credits: Any
The chart's credits label.
The chart's credits label. The label has an
update
method that allows setting new options as per the credits option set.- Since
5.0.0
Example: -
def
destroy(): Unit
Removes the chart and purges memory.
Removes the chart and purges memory. This method should be called before writing a new chart into the same container. It is called internally on window unload to prevent leaks.
- Since
1.2.2
Example: -
def
drillUp(): Unit
When the chart is drilled down to a child series, calling
chart.drillUp()
will drill up to the parent series.When the chart is drilled down to a child series, calling
chart.drillUp()
will drill up to the parent series.- Since
3.0.8
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exportChart(options: Object = ???, chartOptions: Object = ???): Unit
Exporting module required.
Exporting module required. Submit an SVG version of the chart to a server along with some parameters for conversion.
- options
Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options.
filename
: the filename for the export without extension,url
: the URL for the server module to do the conversion,width
: the width of the PNG or JPEG image generated on the server,type
: the MIME type of the converted image,sourceWidth
: the width of the source (in-page) chart,sourceHeight
: the height of the source chart.
- Since
2.0
-
def
exportChartLocal(options: Object = ???, chartOptions: Object = ???): Unit
Export the chart to a PNG or SVG without sending it to a server.
Export the chart to a PNG or SVG without sending it to a server. Requires
modules/exporting.js
andmodules/offline-exporting.js
. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(id: String = ???): |[|[CleanJsObject[Axis], CleanJsObject[Series]], CleanJsObject[Point]]
Get an axis, series or point by its
id
as given in the configuration options.Get an axis, series or point by its
id
as given in the configuration options.- id
The id of the axis, series or point to get.
- Since
1.2.0
Example: -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getSVG(additionalOptions: Object = ???): String
Exporting module required.
Exporting module required. Get an SVG string representing the chart.
- additionalOptions
Chart options to add to the exported chart in addition to the options given for the original chart. For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here.
- Since
2.0
Example: -
def
getSelectedPoints(): Array[CleanJsObject[Point]]
Returns an array of all currently selected points in the chart.
Returns an array of all currently selected points in the chart. Points can be selected either programmatically by the
point.select()
method or by clicking.- Since
1.2.0
Example: -
def
getSelectedSeries(): Array[CleanJsObject[Series]]
Returns an array of all currently selected series in the chart.
Returns an array of all currently selected series in the chart. Series can be selected either programmatically by the
series.select()
method or by checking the checkbox next to the legend item ifseries.showCheckBox
is true.- Since
1.2.0
Example: -
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
hideLoading(): Unit
Hide the loading screen.
Hide the loading screen. Options for the loading screen are defined at options.loading.
- Since
1.2.0
Example: -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
options: Object
The options structure for the chart.
The options structure for the chart.
- Since
1.2.0
-
def
print(): Unit
Exporting module required.
Exporting module required. Clears away other elements in the page and prints the chart as it is displayed. By default, when the exporting module is enabled, a button at the upper left calls this method.
- Since
2.0
Example: -
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
redraw(animation: Any = ???): Unit
Redraw the chart after changes have been done to the data or axis extremes.
Redraw the chart after changes have been done to the data or axis extremes. All methods for updating axes, series or points have a parameter for redrawing the chart. This is
true
by default. But in many cases you want to do more than one operation on the chart before redrawing, for example add a number of points. In those cases it is a waste of resources to redraw the chart for each new point added. So you add the points and callchart.redraw()
after.- animation
Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties
duration
andeasing
.
- Since
1.2.0
-
def
reflow(): Unit
Reflows the chart to its container.
Reflows the chart to its container. By default, the chart reflows automatically to its container following a
window.resize
event, as per the chart.reflow option. However, there are no reliable events for div resize, so if the container is resized without a window resize event, this must be called explicitly.Example: -
val
series: Array[CleanJsObject[Series]]
An array of all the chart's series.
An array of all the chart's series.
- Since
1.2.0
-
def
setSize(width: Double = ???, height: Double = ???, animation: Any = ???): Unit
Resize the chart to a given width and height.
Resize the chart to a given width and height. In order to set the width only, the height argument can be skipped. To set the height only, pass
undefined
for the width.- width
The new pixel width of the chart. Since v4.2.6, the argument can be
undefined
in order to preserve the current value (when setting height only), ornull
to adapt to the width of the containing element.
-
def
setTitle(title: Object = ???, subtitle: Any = ???, redraw: Boolean = ???): Unit
Set a new title or subtitle for the chart.
Set a new title or subtitle for the chart.
- title
A configuration object for the new title as defined at #title.
- Since
2.1.0
Example: -
def
showLoading(str: String = ???): Unit
Dim the chart's plot area and show a loading label text.
Dim the chart's plot area and show a loading label text. Options for the loading screen are defined at options.loading. A custom text can be given as a parameter for loading.
- Since
2.0.5
- val subtitle: Any
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
title: Any
The chart title.
The chart title. The title has an
update
method that points back to Chart.setTitle.- Since
5.0.0
Example: -
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
update(options: Object = ???, redraw: Boolean = ???): Unit
A generic function to update any element of the chart.
A generic function to update any element of the chart. Elements can be enabled and disabled, moved, re-styled, re-formatted etc.
A special case is configuration objects that take arrays, for example xAxis, yAxis or series. For these collections, an
id
option is used to map the new option set to an existing object. If an existing object of the sameid
is not found, the first item is updated. So for example, runningchart.update
with a series item without an id, will cause the existing chart's first series to be updated.See also the responsive option set. Switching between responsive.rules basically runs
chart.update
under the hood.- options
A configuration object for the new chart options as defined in the options section of the API.
- Since
5.0.0
Example: -
def
updatePosition(): Unit
This method is deprecated as of 2.0.1.
This method is deprecated as of 2.0.1. Updating the chart position after a move operation is no longer necessary.
- Since
1.2.5
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
xAxis: Array[CleanJsObject[Axis]]
An array of the chart's x axes.
An array of the chart's x axes. If only one x axis, it is referenced by
chart.xAxis[0]
.- Since
1.2.0
-
val
yAxis: Array[CleanJsObject[Axis]]
An array of the chart's y axes.
An array of the chart's y axes. If only one y axis, it is referenced by
chart.yAxis[0]
.- Since
1.2.0