Skip to content

gerwald/visualization-widgets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Widgets

EEXCESS widgets are components like visualizations (Barchart, FacetScape, ...), which are typically included via an iframe. Therefore, they should be self-contained, i.e. include all necessary media, libraries, css-files, etc.

Communication with the EEXCESS-environment is enabled via the window.postMessage-API, with the available options described in the following.

Usage

For usage examples see the examples folder and the according readme file.

Interface - using window.postMessage

The data attribute in the transmitted messages adheres to the following pattern:

event:eexcess.<event>,
data:{<event details>}

incoming messages

Available events:

  • queryTriggered
  • new Results
  • rating
  • error

queryTriggerd

This event specifies, that a new query was triggered. The event details contain the profile, that is associated with this query

new Results

This event indicates the arrival of new results. The event details consist of two attributes: profile and results. Profile contains the user profile associated with the results and results contains the results retrieved.

rating

Indicates that an item was rated in another component. The widget can then update the item's rating accordingly. The event details contain the uri of the item and score of the rating.

error

Used to indicate an error. The event details contain an error message as string.

Outgoing Messages

Available events:

  • queryTriggered
  • logging
  • rating
  • currentResults

queryTriggered

Indicates a new query. The event details contain the profile associated with that query.

logging

Indicates that some interaction should be logged. The event details contain an action attribute, which specifies the interaction and a details attribute, providing details on the interaction to be logged. Currently supported actions:

  • resultOpened (details:)

rating

Indicates the rating of an item. The event details contain the item's uri and corresponding score (integer).

currentResults

This event may be used by widgets upon initialization to obtain the current resultset (and associated profile). It triggers the parent window to send a message with a newResults event.

About

Fork of EEXCESS/visualization-widgets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •