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 doublegetAspectRatio()Returns the aspect ratio.ChartAreaNodegetChartArea()Returns the chart area item.doublegetCurrentDevicePixelRatio()Returns the current device pixel ratio.intgetHeight()Returns the height in pixel.intgetId()Returns the CHART JS chart ID.LegendNodegetLegend()Returns the legend item.OptionsNodegetOptions()Returns the options item.ScalesNodegetScales()Returns the scales item.SubtitleNodegetSubtitle()Returns the subtitle item.TitleNodegetTitle()Returns the title item.TooltipNodegetTooltip()Returns the tooltip item.intgetWidth()Returns the width in pixel.booleanisInitialized()Returns if CHART.JS chart instance has been initialized.StringtoJSON()Returns the string JSON representation of the object.
-
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
Returns if CHART.JS chart instance has been initialized.- Returns:
trueif 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.
-
-