implicit final class ChartExt extends AnyVal
- Alphabetic
- By Inheritance
- ChartExt
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
def
addSeries(options: config.series.Series, redraw: Boolean = true, animation: Animation = Animation.Enabled): 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.
Example: -
def
addXAxis(options: config.axis.XAxis, redraw: Boolean = true, animation: Animation = Animation.Enabled): 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.
Example: -
def
addYAxis(options: config.axis.YAxis, redraw: Boolean = true, animation: Animation = Animation.Enabled): 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.
Example: -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val chart: Chart
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
redraw(animation: Animation = Animation.Enabled): 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
trueby 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
durationandeasing.
-
def
selectedPoints(): Seq[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.Example: -
def
selectedSeries(): Seq[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.showCheckBoxis true.Example: -
def
series: Seq[Series]
An array of all the chart's series.
-
def
setSize(width: UndefOr[Double] = js.undefined, height: UndefOr[Double] = js.undefined, animation: Animation = Animation.Enabled): 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
undefinedfor the width.- width
The new pixel width of the chart. Since v4.2.6, the argument can be
undefinedin order to preserve the current value (when setting height only), ornullto adapt to the width of the containing element.
-
def
toString(): String
- Definition Classes
- Any
-
def
xAxis: Seq[XAxis]
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]. -
def
yAxis: Seq[YAxis]
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].