Package org.pepstock.charba.client
Class ChartNode
- java.lang.Object
-
- org.pepstock.charba.client.ChartNode
-
public final class ChartNode extends Object
This is a wrapper of CHART.JS CHART instance in order to provide all properties of chart java script instance, set at runtime.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAspectRatio()
Returns the aspect ratio.ChartAreaNode
getChartArea()
Returns the chart area item.double
getCurrentDevicePixelRatio()
Returns the current device pixel ratio.int
getHeight()
Returns the height in pixel.int
getId()
Returns the CHART JS chart ID.LegendNode
getLegend()
Returns the legend item.OptionsNode
getOptions()
Returns the options item.ScalesNode
getScales()
Returns the scales item.SubtitleNode
getSubtitle()
Returns the subtitle item.TitleNode
getTitle()
Returns the title item.TooltipNode
getTooltip()
Returns the tooltip item.int
getWidth()
Returns the width in pixel.boolean
isInitialized()
Returns if CHART.JS chart instance has been initialized.String
toJSON()
Returns the string JSON representation of the object.
-
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
Returns if CHART.JS chart instance has been initialized.- Returns:
true
if initialized, otherwisefalse
-
getOptions
public OptionsNode getOptions()
Returns the options item.- Returns:
- the options item.
-
getLegend
public LegendNode getLegend()
Returns the legend item.- Returns:
- the legend item.
-
getScales
public ScalesNode getScales()
Returns the scales item.- Returns:
- the scales item.
-
getChartArea
public ChartAreaNode getChartArea()
Returns the chart area item.- Returns:
- the chart area item.
-
getSubtitle
public SubtitleNode getSubtitle()
Returns the subtitle item.- Returns:
- the subtitle item.
-
getTitle
public TitleNode getTitle()
Returns the title item.- Returns:
- the title item.
-
getTooltip
public TooltipNode getTooltip()
Returns the tooltip item.- Returns:
- the tooltip item.
-
getId
public int getId()
Returns the CHART JS chart ID.- Returns:
- the CHART JS chart ID.
-
getWidth
public int getWidth()
Returns the width in pixel.- Returns:
- the width in pixel.
-
getHeight
public int getHeight()
Returns the height in pixel.- Returns:
- the height in pixel.
-
getAspectRatio
public double getAspectRatio()
Returns the aspect ratio.- Returns:
- the aspect ratio.
-
getCurrentDevicePixelRatio
public double getCurrentDevicePixelRatio()
Returns the current device pixel ratio.- Returns:
- the current device pixel ratio.
-
toJSON
public String toJSON()
Returns the string JSON representation of the object.- Returns:
- the string JSON representation of the object.
-
-