Class ChartJsProvider
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.webconsole.base.PageResourceProvider
org.jgrapes.webconsole.provider.chartjs.ChartJsProvider
- All Implemented Interfaces:
Iterable<org.jgrapes.core.ComponentType>,org.jgrapes.core.Channel,org.jgrapes.core.ComponentType,org.jgrapes.core.Eligible,org.jgrapes.core.Manager
Provider for the Chart.js library.
The package cannot be used as distributed in node_modules because of imports that aren’t browser compliant. It is made available for import as page resource “chart.js/auto.js”.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
org.jgrapes.core.Channel.Default -
Field Summary
Fields inherited from class org.jgrapes.core.Component
loggerFields inherited from interface org.jgrapes.core.Channel
BROADCAST, SELF -
Constructor Summary
ConstructorsConstructorDescriptionChartJsProvider(org.jgrapes.core.Channel componentChannel) Creates a new component with its channel set to the given channel.ChartJsProvider(org.jgrapes.core.Channel componentChannel, Map<?, ?> properties) Creates a new component with its channel set to the given channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidonConsoleReady(ConsoleReady event, ConsoleConnection connection) OnConsoleReady, fire the appropriateAddPageResources.Methods inherited from class org.jgrapes.webconsole.base.PageResourceProvider
onResourceRequest, resourceBundleMethods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setNameMethods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGeneratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.jgrapes.core.Manager
stream
-
Constructor Details
-
ChartJsProvider
Creates a new component with its channel set to the given channel.- Parameters:
componentChannel- the channel that the component’s handlers listen on by default and thatManager.fire(Event, Channel...)sends the event to
-
ChartJsProvider
Creates a new component with its channel set to the given channel.- Parameters:
componentChannel- the channel that the component’s handlers listen on by default and thatManager.fire(Event, Channel...)sends the event toproperties- the properties used to configure the component
-
-
Method Details
-
onConsoleReady
@Handler(priority=100) public void onConsoleReady(ConsoleReady event, ConsoleConnection connection) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException OnConsoleReady, fire the appropriateAddPageResources.- Parameters:
event- the eventconnection- the web console connection- Throws:
freemarker.template.TemplateNotFoundException- the template not found exceptionfreemarker.template.MalformedTemplateNameException- the malformed template name exceptionfreemarker.core.ParseException- the parse exceptionIOException- Signals that an I/O exception has occurred.
-