All Y values for a fixed x value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Eduardo Ramalho

All Y values for a fixed x value

Post by Eduardo Ramalho » Thu Feb 13, 2003 3:06 pm

Hi there!

I'm using JFreeChart for ploting a chart with several time trend lines.

I'm trying to implement a kind of "horizontal axis trace line". This a vertical line that follows the mouse when it moves along de horizontal axis. Each time the mouse moves, it should create and send an event with all trend Y values for some point in time (the point where the line is).

I looked the ChartPanel's sample souce for the method:

public void mouseMoved(MouseEvent e) {

//some code...
ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
ChartMouseEvent event = new ChartMouseEvent(getChart(), e, entity);
//some code...
}

Is it possible to return instead of ChartEntity, some kind of object with the following attributes: the time value and a collection of pairs (dataset_id, y_value) ?

Thanks,

Eduardo

Locked