graph covered when tooltip is shown

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vision
Posts: 16
Joined: Tue Mar 31, 2015 10:00 am
antibot: No, of course not.

graph covered when tooltip is shown

Post by vision » Tue Mar 31, 2015 10:47 am

hi to everybody, i'm using this library about 2 month and it is the best that i ever seen, my congratulation for that big big work.

I write to you for a problem that kill me, i have a bubble chart with around 40 series saved in a xyzDefaultDataset, and i override the XYbubblerenderer to obtain the same colour, (after that i must generate the tooltip with standard tooltip to re get tooltips);

but the real problem( i dont find nothing on the forum about this) is that now when i put my mouse on one bubble it shows her tooltip but at the same time there is a grey rectangle area that cover the right part of the grap and this behaviour it always the same for all bubble on the graph.

it is a consequence about the override of the renderer or i forget something to call, or it is a bug ?

Many Thanks at all, and best regards.

Naxter
Posts: 45
Joined: Thu Jun 26, 2014 8:24 am
antibot: No, of course not.
Location: Germany, Aachen

Re: graph covered when tooltip is shown

Post by Naxter » Tue Mar 31, 2015 11:01 am

Can you make a screenshot of your issue? And maybe post your code of the tooltip?
It is hard to support you with no code and screenshots :)

vision
Posts: 16
Joined: Tue Mar 31, 2015 10:00 am
antibot: No, of course not.

Re: graph covered when tooltip is shown

Post by vision » Tue Mar 31, 2015 11:11 am

Naxter wrote:Can you make a screenshot of your issue? And maybe post your code of the tooltip?
It is hard to support you with no code and screenshots :)

:) thanks for your flash response in first;

this is the screenshots of my chart Image




xyplot.setRenderer(new XYBubbleRenderer(1){


@Override
public Paint getItemPaint(int row, int column) {
this.setBaseToolTipGenerator(new StandardXYZToolTipGenerator("valore: ({1}, {2})", NumberFormat.getNumberInstance(),
NumberFormat.getNumberInstance(), NumberFormat.getNumberInstance()));

return Color.yellow;
}

});
Last edited by vision on Tue Mar 31, 2015 11:22 am, edited 1 time in total.

Naxter
Posts: 45
Joined: Thu Jun 26, 2014 8:24 am
antibot: No, of course not.
Location: Germany, Aachen

Re: graph covered when tooltip is shown

Post by Naxter » Tue Mar 31, 2015 11:20 am

Code from the Bubblerenderer for example.

Does this rectangle disappear when you move the mouse away from the bubbles ?

vision
Posts: 16
Joined: Tue Mar 31, 2015 10:00 am
antibot: No, of course not.

Re: graph covered when tooltip is shown

Post by vision » Tue Mar 31, 2015 11:34 am

yep,
disappear when the mouse it is out of the bubble area, moreover i have the same behaviour if i resize the windows
Image

but there is a special case for example when the bubble is near the right corner and this problem don't appear

Naxter
Posts: 45
Joined: Thu Jun 26, 2014 8:24 am
antibot: No, of course not.
Location: Germany, Aachen

Re: graph covered when tooltip is shown

Post by Naxter » Tue Mar 31, 2015 11:52 am

That is a very strange behaviour, never had that before. Still it is very hard to find the problem with no code, but i actually dont know which part would be important to see.

What happens when you dont set the tooltip generator ? Is there still the same problem?

vision
Posts: 16
Joined: Tue Mar 31, 2015 10:00 am
antibot: No, of course not.

Re: graph covered when tooltip is shown

Post by vision » Tue Mar 31, 2015 12:00 pm

Yes,

if i delete the override i have the same behaviour;
it can be some trouble with jframe/ChartPanel?

Code: Select all

public ChartPanel Grafico(Application ff){
          JFreeChart bchart = ChartFactory.createBubbleChart(
	            "Grafico                
	            vary,                    
	            varx,                    
	            dataset,                    
	            PlotOrientation.VERTICAL,                    
	            true, true, false);
	          
	         XYPlot xyplot = ( XYPlot )bchart.getPlot( );                 
	         xyplot.setForegroundAlpha( 0.65F );  

	         
           XYItemRenderer xyitemrenderer = xyplot.getRenderer( );
           xyplot.setRenderer(new XYBubbleRenderer(1){	
        	   
        	 
        	   @Override
        	   public Paint getItemPaint(int row, int column) {
        		   this.setBaseToolTipGenerator(new StandardXYZToolTipGenerator("valore: ({1}, {2})", NumberFormat.getNumberInstance(),
        		            NumberFormat.getNumberInstance(), NumberFormat.getNumberInstance()));
  
        		   return Color.yellow;
        	   }
	 
                 });
                ChartPanel chartPanel = new ChartPanel(bchart);	 
	        chartPanel.getChart().removeLegend();
	        chartPanel.setDisplayToolTips(true);
	        chartPanel.setMouseWheelEnabled(true);
	    return chartPanel;
		
	}
 	  


Naxter
Posts: 45
Joined: Thu Jun 26, 2014 8:24 am
antibot: No, of course not.
Location: Germany, Aachen

Re: graph covered when tooltip is shown

Post by Naxter » Tue Mar 31, 2015 12:07 pm

Okay that is even stranger then.
Well so the ToolTipGenerator does not cause this problem...it might be a problem with the chartpanel yes.
I don´t see the problem in your code, my charts use the same methods and there is no problem with tooltips though.
I am sorry

vision
Posts: 16
Joined: Tue Mar 31, 2015 10:00 am
antibot: No, of course not.

Re: graph covered when tooltip is shown

Post by vision » Tue Mar 31, 2015 12:20 pm

Naxter wrote:Okay that is even stranger then.
Well so the ToolTipGenerator does not cause this problem...it might be a problem with the chartpanel yes.
I don´t see the problem in your code, my charts use the same methods and there is no problem with tooltips though.
I am sorry

really many thanks !!

Locked