File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Cewolf help in tooltips Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Cewolf help in tooltips" Watch "Cewolf help in tooltips" New topic
Author

Cewolf help in tooltips

Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
Hi..
i am new at cewolf.. but checking the examples and the war, i was able to make a timeseries chart. it is working excepts for the tooltipgenerator... i tryed tons of stuff and didnt get it working for a timeseries one...
i checked the tutorial one, and it works. and my timeseries cant generate...

i even put

public String generateToolTip(CategoryDataset arg0, int series, int arg2)
{
System.out.println("arg0: "+arg0.toString()+ "series "+series+" arg2"+arg2);
return seriesNames[series];
}

to check how it was generating the tooltip. but couldnt make equal in the timeseries... seems it dont execute this method...

please help
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41600
    
  55
How are you specifying the tooltip generator in the JSP?


Ping & DNS - my free Android networking tools app
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
Ulf Dittmer wrote:How are you specifying the tooltip generator in the JSP?



here is my chart


the chart is working, only the tooltip that isnt... seems it isnt being called.. but i cant find in the examples where "to call" it.

ps: the method productdataset is returning a TimeSeriesCollection... ( that is the only difference from the example tutorial.jsp that return a DefaultCategoryDataset) and i cant figure why the generateToolTip isnt being called
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41600
    
  55
You can check out the HTML that gets generated. It should have a <map> tag with onmouseover and onmouseout event handlers.

Also please check your private messages and act accordingly.
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
Ulf Dittmer wrote:You can check out the HTML that gets generated. It should have a <map> tag with onmouseover and onmouseout event handlers.




I have this as html generated.

dunno what is wrong on my bean...

i have the following structure there..



if possible, has any example of this method generateToolTip working on a timeseries?


ps: how do i assure that the method generateToolTip is being executed?

Thanks in advance.
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
hi.. hello again

i managed to "generate tooltips" by adding the following code to my jsp...but, i really dunno why the method (generatetooltip) is being called on the java...
here is the code


now the problem is :
- the tooltip being generated is "a time + the y value of the chart".. i dont want to get y value.. maybe i want.. dunno yet.. but seriusly i want is the "Name of the Serie". ( dunno how to get this... for this timeseries chart )
- Figure out why it didnt executed the method from the .java

any help/idea?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41600
    
  55
- the tooltip being generated is "a time + the y value of the chart".. i dont want to get y value.. maybe i want.. dunno yet.. but seriusly i want is the "Name of the Serie". ( dunno how to get this... for this timeseries chart )

The tooltip is returned by the generateToolTip method - you're free to make it do anything you want. It's one of the advantages of implementing the DataSet, the ItemLinkGenerator and the ToolTipGenerator in the same class that usually all required data (like the series names) is available there.

- Figure out why it didnt executed the method from the .java

Could have something to do with the fact that the first code implements CategoryToolTipGenerator, while the second code implements XYToolTipGenerator.
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
ok.. solved one problem, the "name" of the series on the tooltip



now, kinda done but appreciate any help in that other problem.. how to execute the generatetooltip in the java, so i can take out that method from my jsp

thanks in advance...
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
- Figure out why it didnt executed the method from the .java

Could have something to do with the fact that the first code implements CategoryToolTipGenerator, while the second code implements XYToolTipGenerator.

i have a "timeline series chart" from a timeseries collection... when i executed the second code (in the jsp) it worked somehow.. then i tryed to reproduce it on the java as a tooltipgenerator using a xydataset. it compiled without problems, but didnt get executed. dunno what i am missing here.
Phillip Sulvan
Greenhorn

Joined: Jun 14, 2010
Posts: 12
kinda solved..
just recreated the producedataset method again.. now working.. dunno what was happening..maybe i miss something.. anyway.. thanks

Phillip
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cewolf help in tooltips