public final class Defaults extends Object
defaults object that CHART.JS (by CHART object) provides to get defaults values.| Modifier and Type | Field and Description |
|---|---|
static String |
ID
Plugin ID "charbanativecharthandler", for an internal plugin to track native chart instances.
|
| Modifier and Type | Method and Description |
|---|---|
List<LegendLabelItem> |
generateLabels(Chart chart)
Returns an unmodifiable list of legend labels for that chart with the callback provided by CHART.JS out of the box.
|
List<LegendLabelItem> |
generateLabels(IsChart chart)
Returns an unmodifiable list of legend labels for that chart with the callback provided by CHART.JS out of the box.
|
static Defaults |
get()
Singleton method to get static instance.
|
Controllers |
getControllers()
Returns the controllers.
|
GlobalOptions |
getGlobal()
Returns the global options.
|
ChartOptions |
getOptions(Type type)
Returns the default options by a chart type, by defaults of CHART.JS.
If the type is not consistent, throws an exception. |
GlobalPlugins |
getPlugins()
Returns the global plugins manager.
|
GlobalScale |
getScale()
Returns the global scale.
|
Scale |
getScale(AxisType axisType)
Returns the global scale by axis type.
|
void |
invokeChartOnClick(ChartClickEvent event)
Invokes the
onClick chart function provided out of the box by CHART.JS. |
void |
invokeChartOnHover(ChartHoverEvent event)
Invokes the
onHover chart function provided out of the box by CHART.JS. |
void |
invokeLegendOnClick(LegendClickEvent event)
Invokes the
onClick legend function provided out of the box by CHART.JS. |
void |
invokeLegendOnHover(LegendHoverEvent event)
Invokes the
onHover legend function provided out of the box by CHART.JS. |
void |
invokeLegendOnLeave(LegendLeaveEvent event)
Invokes the
onLeave legend function provided out of the box by CHART.JS. |
String |
invokeTooltipsCallbackOnLabel(IsChart chart,
TooltipItem item)
Returns the default text to render for an individual item in the tooltip.
|
TooltipLabelColor |
invokeTooltipsCallbackOnLabelColor(IsChart chart,
TooltipItem item)
Returns the default colors to render for the tooltip item.
|
TooltipLabelPointStyle |
invokeTooltipsCallbackOnLabelPointStyle(IsChart chart,
TooltipItem item)
Returns the default point style to render for the tooltip item.
|
List<String> |
invokeTooltipsCallbackOnTitle(IsChart chart,
List<TooltipItem> items)
Returns the default text to render as the title of the tooltip.
|
public static final String ID
public static Defaults get()
public GlobalOptions getGlobal()
public GlobalScale getScale()
public Scale getScale(AxisType axisType)
axisType - the axis type to use to get defaults.public GlobalPlugins getPlugins()
public Controllers getControllers()
public ChartOptions getOptions(Type type)
type - chart type.public List<LegendLabelItem> generateLabels(Chart chart)
chart - chart instance to use to get legend labelspublic List<LegendLabelItem> generateLabels(IsChart chart)
chart - chart instance to use to get legend labelspublic void invokeChartOnClick(ChartClickEvent event)
onClick chart function provided out of the box by CHART.JS.event - original event generated to invoke a chart click handler.public void invokeChartOnHover(ChartHoverEvent event)
onHover chart function provided out of the box by CHART.JS.event - original event generated to invoke a chart hover handler.public void invokeLegendOnClick(LegendClickEvent event)
onClick legend function provided out of the box by CHART.JS.event - original event generated to invoke a legend click handler.public void invokeLegendOnHover(LegendHoverEvent event)
onHover legend function provided out of the box by CHART.JS.event - original event generated to invoke a legend hover handler.public void invokeLegendOnLeave(LegendLeaveEvent event)
onLeave legend function provided out of the box by CHART.JS.event - original event generated to invoke a legend leave handler.public List<String> invokeTooltipsCallbackOnTitle(IsChart chart, List<TooltipItem> items)
chart - chart instanceitems - list of all tooltip itemspublic String invokeTooltipsCallbackOnLabel(IsChart chart, TooltipItem item)
chart - chart instanceitem - tooltip itempublic TooltipLabelColor invokeTooltipsCallbackOnLabelColor(IsChart chart, TooltipItem item)
chart - chart instanceitem - tooltip itemnull if arguments are not consistentpublic TooltipLabelPointStyle invokeTooltipsCallbackOnLabelPointStyle(IsChart chart, TooltipItem item)
chart - chart instanceitem - tooltip itemnull if arguments are not consistent