Interactive 2D Graph Marker


I need a few tools on top of CompGeJS in order to create intuitive, interactive demos for planar curves and other graph features. The most commonly used tool will be an interactive, 2D graph marker, or a simple visual item that identifies or helps select 2D coordinates. The marker is always positioned or queried in graph (user) coordinates, not pixel coordinates. So, it is loosely coupled to CompGeoJS graph axes via a create() method.

This simple demo illustrates the creation and use of a GraphMarker. The marker is initially positioned in the graph area. New coordinates are computed whenever the marker is panned across the graph. These coordinates are passed to a callback function.

Complete, non-minified and documented source code is available for the marker. Next up is an interactive graph slicer that slices a graph horizontally or vertically and allows constant-x or constant-y lines to be interactively identified.

Comments are closed.