Skip to content
Discussion options

You must be logged in to vote

Hi @anose001,

Most plottables do not interact with the mouse for performance reasons1. However, users can create custom plottables (that implement IPlottable and, if they also implement IDraggable, they can interact with the mouse.

To take an existing plot type and add mouse interactivity you could do something like this (but populate the not-implemented sections). You can use draggable axis line plottables as a reference (AxisLine.cs)

public class DraggableArrow : ScottPlot.Plottable.ArrowCoordinated, ScottPlot.Plottable.IDraggable
{
    public DraggableArrow(double xBase, double yBase, double xTip, double yTip) : base(xBase, yBase, xTip, yTip) { }
    public bool DragEnabled { get; set; } 

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@swharden
Comment options

@anose001
Comment options

Answer selected by swharden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants