-
Notifications
You must be signed in to change notification settings - Fork 18
Use
The communication between the widgets is done via configuration objects and a
set of methods that all widgets implement. There are widgets that display data
based on a configuration (like the ImpactChart
widget). Calling the update
method with a configuration will update the widget:
widget.update(config);
Other widgets create new configurations (like the SectorList
widget). With the
onChanged
method it is possible to react on these configuration changes:
widget.onChanged((config) => {
// do something with the updated config
});
With these methods the widgets can be linked in the following way:
sectorList.onChanged((config) => {
impactChart.update(config);
});
There can be different widgets that produce and consume configurations on a page. These widgets can join a transmitter that collects configuration changes and calls the respective update methods of these widgets:
configTransmitter.join(widget);
For example, the HashConfigTransmitter
uses the anchor part of the URL to
de-/serialize the configuration:
const hashTransmitter = new useeio.HashConfigTransmitter();
hashTransmitter.join(sectorList);
hashTransmitter.join(impactChart);
The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity , confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.