#2 User editing of charts with mouse

closed
nobody
None
5
2002-06-02
2002-05-31
Kristian Nilssen
No

I need a line charting component where the user can
dran nodes up and down. Could you point me in the right
direction so I can modify JOpenChart to do this?

thanks,
Kristian.

Discussion

  • S. Müller
    S. Müller
    2002-06-02

    Logged In: YES
    user_id=138061

    Hi Kristian,

    this is not completely trivial (but not that difficult either) I just hope you
    have some time at hand. What you would need to implement at first is a
    basic support for editable ChartDataModels. You will find the most
    important parts, but they are not implemented. This includes the Event
    classes and the setValue methods. A GUI chart component would need
    to register for events (which it already can do, without effect) and do a
    repaint.
    The next thing would be to use the AffineTransform class, which
    performs the pixel space to data space transformation, to transform a
    mouse drag and drop operation to a data model "setValue" operation.
    This is rather easy. Somehow you would also need to identify the nodes
    which were clicked.

    Anyway, the basic support for the first two aspects is there. I will provide
    further assistance in case you start working on it, which I would
    appreciate.

    Thanks,
    Sebastian

     
  • S. Müller
    S. Müller
    2002-06-02

    • status: open --> closed