Add events and interact with chart "items".
Add an mouse move event handler.
Add an mouse leave event handler.
Add an mouse up event handler.
Add an mouse down event handler.
Add an click event handler.
C.chart
[ CE.onClick Clicked C.getCoords ]
[ .. ]Add any event handler.
C.chart
[ CE.on "mousemove" <|
CE.map2 OnMouseMove
(CE.getNearest CE.bar)
(CE.getNearest CE.dot)
]
[ .. ]Decode to get the cartesian coordinates of the event.
Decode to get the nearest item to the event.
Like getNearest, but only takes x coordiante into account
Decode to get the nearest item within certain radius to the event.
Like getWithin, but only takes x coordiante into account
A product is an item produced by a bar or dot series.
CE.Product CE.Any value data -- A product of either a bar or dot series
CE.Product CE.Dot value data -- A product of a dot series
CE.Product CE.Bar value data -- A product of a bar seriesYou may have used C.scatterMaybe or C.barMaybe to represent
missing data on your chart. The second type value represent
whether this product could be a representation of a missing data
point.
CE.Product CE.Any Float data
-- A product of a bar or dot series which is always
-- a real data point.
CE.Product CE.Any (Maybe Float) data
-- A product of a bar or dot series which may or
-- may not be a real data point.A group is a collection of products which have certain characteristics in common. For example, a stacked bar is produced from the same data point and has the same x value.
Group (Stack data) Bar value data -- representation of a stack of bars
Group (Bin data) Bar value data -- representation of a bin of barsThe representation of a method of grouping.
Filter a set of products.
CE.getNearest (CE.keep CE.realValues CE.bar)
-- get nearest bar which is not a representation of missing dataCollect groups from a set of products.
CE.getNearest (CE.collect CE.bins CE.bar)
-- collect all bars into bins and get the nearest one.Apply a grouping method to a list of items.
Given a group, apply a new grouping method to the products of the group.
Get the dependent (y) value.
Get the independent (x) value.
Get the datum which produced this product.
Get the color of the product.
Get the name of the series which produced the product.
Is this product the exact same as this other one?
Get the size of the product (only if a dot).
Get the products of a group.
Get the commonality of a group.
Keep products of certain data types.