public class ChartModel extends AbstractConfigurationObject
Constructor and Description |
---|
ChartModel() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getAlignTicks() |
Boolean |
getAnimation() |
Number |
getBorderRadius() |
String |
getClassName() |
Number |
getColorCount() |
String |
getDescription() |
String |
getHeight() |
Boolean |
getIgnoreHiddenSeries() |
Boolean |
getInverted() |
Number[] |
getMargin() |
Number |
getMarginBottom() |
Number |
getMarginLeft() |
Number |
getMarginRight() |
Number |
getMarginTop() |
Options3d |
getOptions3d() |
PanKey |
getPanKey() |
Boolean |
getPanning() |
Dimension |
getPinchType() |
Boolean |
getPolar() |
Boolean |
getReflow() |
ResetZoomButton |
getResetZoomButton() |
Boolean |
getShowAxes() |
Number[] |
getSpacing() |
Number |
getSpacingBottom() |
Number |
getSpacingLeft() |
Number |
getSpacingRight() |
Number |
getSpacingTop() |
ChartType |
getType() |
String |
getTypeDescription() |
Number |
getWidth() |
Dimension |
getZoomType() |
void |
setAlignTicks(Boolean alignTicks)
When using multiple axis, the ticks of two or more opposite axes will
automatically be aligned by adding ticks to the axis or axes with the
least ticks, as if
tickAmount were specified. |
void |
setAnimation(Boolean animation)
Set the overall animation for all chart updating.
|
void |
setBorderRadius(Number borderRadius)
The corner radius of the outer chart border.
|
void |
setClassName(String className)
A CSS class name to apply to the charts container
div ,
allowing unique CSS styling for each chart. |
void |
setColorCount(Number colorCount)
In styled mode, this sets how many colors the class names should rotate
between.
|
void |
setDescription(String description)
A text description of the chart.
|
void |
setHeight(String height)
An explicit height for the chart.
|
void |
setIgnoreHiddenSeries(Boolean ignoreHiddenSeries)
If true, the axes will scale to the remaining visible series once one
series is hidden.
|
void |
setInverted(Boolean inverted)
Whether to invert the axes so that the x axis is vertical and y axis is
horizontal.
|
void |
setMargin(Number margin)
Sets all margins to the same value
|
void |
setMargin(Number vertical,
Number horizontal)
Sets the vertical margin for top and bottom and the horizontal margin for
the right and left margin
|
void |
setMargin(Number top,
Number right,
Number bottom,
Number left)
Set all margins in one call
|
void |
setMarginBottom(Number marginBottom)
The margin between the bottom outer edge of the chart and the plot area.
|
void |
setMarginLeft(Number marginLeft)
The margin between the left outer edge of the chart and the plot area.
|
void |
setMarginRight(Number marginRight)
The margin between the right outer edge of the chart and the plot area.
|
void |
setMarginTop(Number marginTop)
The margin between the top outer edge of the chart and the plot area.
|
void |
setOptions3d(Options3d options3d)
Options to render charts in 3 dimensions.
|
void |
setPanKey(PanKey panKey)
Allows setting a key to switch between zooming and panning.
|
void |
setPanning(Boolean panning)
Allow panning in a chart.
|
void |
setPinchType(Dimension pinchType)
Equivalent to zoomType, but for multitouch
gestures only.
|
void |
setPolar(Boolean polar)
When true, cartesian charts like line, spline, area and column are
transformed into the polar coordinate system.
|
void |
setReflow(Boolean reflow)
Whether to reflow the chart to fit the width of the container div on
resizing the window.
|
void |
setResetZoomButton(ResetZoomButton resetZoomButton)
The button that appears after a selection zoom, allowing the user to
reset zoom.
|
void |
setShowAxes(Boolean showAxes)
Whether to show the axes initially.
|
void |
setSpacing(Number[] spacing)
The distance between the outer edge of the chart and the content, like
title or legend, or axis title or labels if present.
|
void |
setSpacingBottom(Number spacingBottom)
The space between the bottom edge of the chart and the content (plot
area, axis title and labels, title, subtitle or legend in top position).
|
void |
setSpacingLeft(Number spacingLeft)
The space between the left edge of the chart and the content (plot area,
axis title and labels, title, subtitle or legend in top position).
|
void |
setSpacingRight(Number spacingRight)
The space between the right edge of the chart and the content (plot area,
axis title and labels, title, subtitle or legend in top position).
|
void |
setSpacingTop(Number spacingTop)
The space between the top edge of the chart and the content (plot area,
axis title and labels, title, subtitle or legend in top position).
|
void |
setType(ChartType type)
The default series type for the chart.
|
void |
setTypeDescription(String typeDescription)
A text description of the chart type.
|
void |
setWidth(Number width)
An explicit width for the chart.
|
void |
setZoomType(Dimension zoomType)
Decides in what dimensions the user can zoom by dragging the mouse.
|
public Boolean getAlignTicks()
setAlignTicks(Boolean)
public void setAlignTicks(Boolean alignTicks)
When using multiple axis, the ticks of two or more opposite axes will
automatically be aligned by adding ticks to the axis or axes with the
least ticks, as if tickAmount
were specified.
This can be prevented by setting alignTicks
to false. If the
grid lines look messy, it's a good idea to hide them for the secondary
axis by setting gridLineWidth
to 0.
Defaults to: true
public Boolean getAnimation()
setAnimation(Boolean)
public void setAnimation(Boolean animation)
The only animation not affected by this option is the initial series
animation, see setAnimation
method in plot option classes
Defaults to: true
public Number getBorderRadius()
setBorderRadius(Number)
public void setBorderRadius(Number borderRadius)
Defaults to: 0
public String getClassName()
setClassName(String)
public void setClassName(String className)
div
,
allowing unique CSS styling for each chart.public Number getColorCount()
setColorCount(Number)
public void setColorCount(Number colorCount)
highcharts-color-0
, highcharts-color-0
[...]
highcharts-color-9
. The equivalent in non-styled mode is to
set colors using the colors setting.
Defaults to: 10
public String getDescription()
setDescription(String)
public void setDescription(String description)
A text description of the chart.
If the Accessibility module is loaded, this is included by default as a long description of the chart and its contents in the hidden screen reader information region.
Defaults to: undefined
public String getHeight()
setHeight(String)
public void setHeight(String height)
An explicit height for the chart. If a number, the height is
given in pixels. If given a percentage string (for example
'56%'
), the height is given as the percentage of the actual
chart width. This allows for preserving the aspect ratio across
responsive sizes.
By default (when null
) the height is calculated from the
offset height of the containing element, or 400 pixels if the containing
element's height is 0.
Defaults to: null
public Boolean getIgnoreHiddenSeries()
setIgnoreHiddenSeries(Boolean)
public void setIgnoreHiddenSeries(Boolean ignoreHiddenSeries)
Defaults to: true
public Boolean getInverted()
setInverted(Boolean)
public void setInverted(Boolean inverted)
Whether to invert the axes so that the x axis is vertical and y axis is horizontal. When true, the x axis is reversed by default. If a bar series is present in the chart, it will be inverted automatically.
Inverting the chart doesn't have an effect if there are no cartesian series in the chart, or if the chart is polar.
Defaults to: false
public Number[] getMargin()
public Number getMarginBottom()
setMarginBottom(Number)
public void setMarginBottom(Number marginBottom)
spacingBottom
.public Number getMarginLeft()
setMarginLeft(Number)
public void setMarginLeft(Number marginLeft)
spacingLeft
.public Number getMarginRight()
setMarginRight(Number)
public void setMarginRight(Number marginRight)
spacingRight
.public Number getMarginTop()
setMarginTop(Number)
public void setMarginTop(Number marginTop)
spacingTop
.public Options3d getOptions3d()
setOptions3d(Options3d)
public void setOptions3d(Options3d options3d)
highcharts-3d.js
, found in the download package or online at
code.highcharts.com/
highcharts-3d.js.public PanKey getPanKey()
setPanKey(PanKey)
public void setPanKey(PanKey panKey)
alt
, ctrl
, meta
(the command key
on Mac and Windows key on Windows) or shift
. The keys are
mapped directly to the key properties of the click event argument (
event.altKey
, event.ctrlKey
,
event.metaKey
and event.shiftKey
).public Boolean getPanning()
setPanning(Boolean)
public void setPanning(Boolean panning)
Allow panning in a chart. Best used with panKey to combine zooming and panning.
On touch devices, when the
tooltip.followTouchMove option is
true
(default), panning requires two fingers. To allow
panning with one finger, set followTouchMove
to
false
.
Defaults to: false
public Dimension getPinchType()
setPinchType(Dimension)
public void setPinchType(Dimension pinchType)
pinchType
is the same as the
zoomType
setting. However, pinching can be enabled
separately in some cases, for example in stock charts where a mouse drag
pans the chart, while pinching is enabled. When
tooltip.followTouchMove is true,
pinchType only applies to two-finger touches.
Defaults to: null
public Boolean getPolar()
setPolar(Boolean)
public void setPolar(Boolean polar)
highcharts-more.js
.
Defaults to: false
public Boolean getReflow()
setReflow(Boolean)
public void setReflow(Boolean reflow)
Defaults to: true
public ResetZoomButton getResetZoomButton()
setResetZoomButton(ResetZoomButton)
public void setResetZoomButton(ResetZoomButton resetZoomButton)
public Boolean getShowAxes()
setShowAxes(Boolean)
public void setShowAxes(Boolean showAxes)
Defaults to: false
public Number[] getSpacing()
setSpacing(Number[])
public void setSpacing(Number[] spacing)
Defaults to: [10, 10, 15, 10]
public Number getSpacingBottom()
setSpacingBottom(Number)
public void setSpacingBottom(Number spacingBottom)
The space between the bottom edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).
Defaults to: 15
public Number getSpacingLeft()
setSpacingLeft(Number)
public void setSpacingLeft(Number spacingLeft)
The space between the left edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).
Defaults to: 10
public Number getSpacingRight()
setSpacingRight(Number)
public void setSpacingRight(Number spacingRight)
The space between the right edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).
Defaults to: 10
public Number getSpacingTop()
setSpacingTop(Number)
public void setSpacingTop(Number spacingTop)
The space between the top edge of the chart and the content (plot area, axis title and labels, title, subtitle or legend in top position).
Defaults to: 10
public ChartType getType()
setType(ChartType)
public void setType(ChartType type)
Defaults to: line
public String getTypeDescription()
setTypeDescription(String)
public void setTypeDescription(String typeDescription)
A text description of the chart type.
If the Accessibility module is loaded, this will be included in the description of the chart in the screen reader information region.
Highcharts will by default attempt to guess the chart type, but for more complex charts it is recommended to specify this property for clarity.
Defaults to: undefined
public Number getWidth()
setWidth(Number)
public void setWidth(Number width)
null
) the
width is calculated from the offset width of the containing element.
Defaults to: null
public Dimension getZoomType()
setZoomType(Dimension)
public void setZoomType(Dimension zoomType)
x
, y
or xy
.public void setMargin(Number margin)
public void setMargin(Number vertical, Number horizontal)
Copyright © 2025. All rights reserved.