Historic Custom Events

We've allowed plugins to devise their own mutually acceptable signaling strategy that range from plundering the dom to streaming over websockets.

# Data

The Data plugin held mostly tabular data which could be constructed by a Factory on drop of a csv file. The plugin both emitted and listened for thumb events that would scroll through the available data. See About Data Plugin

$(div).trigger('thumb', thumb)

$(".main").on 'thumb', (evt, thumb) ->

Items of type 'data' kept their tabular data in a corresponding field that could be indexed by the thumb.

field = item.data[thumb]

# Scatter

The Scatter plugin could render multi-dimensional data graphically choosing 'total' for y and one other dimension for x selected by thumb events. The plugin would scan the dom for a plugin known to support the Data style interaction and pull the json derived item.data out of it. See About Scatter Plugin

who = $('.chart,.data,.calculator').last() data = who.data('item').data

who.bind 'thumb', (e, thumb) ->

# Chart

The Chart plugin holds time-series data as tuples. It both emits and listens for thumb events to select a specific point in time. See About Chart Plugin

for data in item.data return data if data[0] is thumb

# Line

The Line plugin renders time-series data as a graph where data points are circles and one, the thumb, is larger than others. Line queries the dom for a .sequence-source and failing that queries the wiki global. See About Line Plugin

candidates = $(".item:lt(#{$('.item').index(div)})") who = candidates.filter ".sequence-source"

The older Scatter data location logic was added to the wiki global with the thought that it might know the names of sources before this false start was abandoned. github

series = wiki.getData()