Detect click on Axis Tick

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
v_decadence
Posts: 3
Joined: Wed Oct 29, 2014 10:48 am
antibot: No, of course not.

Detect click on Axis Tick

Post by v_decadence » Wed Nov 05, 2014 11:37 am

Hello.
How can I detect click on Axis Tick Label and get its Text / Value?
For example I need set range maximum on value that i clicked on Domain / Range Axis.

I tried this way, but ce is never instance of TickLabelEntity.

Code: Select all

chartPanel.addChartMouseListener(new ChartMouseListener() {
		public void chartMouseClicked(ChartMouseEvent cme) {
		ChartEntity ce = cme.getEntity();
				
		if(ce instanceof TickLabelEntity)
		{
			System.out.println("!!!!!!");
		}
	}

//...
});

Locked