I'm a relatively new JSP programmer and am working on project that needs to display dynamic graphs in a web page. I stumbled across cewolf a couple days ago and it seemed to be exactly what I was looking for. I've managed to get the basic functionality that I need working (reading in data from a changing text file, outputting many different datasets on one plot in a web browser, etc) and cewolf has been perfect.
However, I've run into my first problem with cewolf that I can't seem to find a simple answer to and I was wondering if anyone here can help me out.
I'm tracking small fluctuations in temperature data and the changes I need to see are on the order of 0.1 degree increments with a total range change of 1-2 degrees. I've found that cewolf sets the y-axis range such that the minimum value can never be greater than 0. This means that my small temperature changes at 60 degrees are barely visible (graph looks basically like a straight line) because the y-axis is stuck with a minimum value of 0 (range 0-~65)...not very helpful for analyzing the data real time...
Is there any way to set the bounds for the axes on a cewolf graph?
This would also be really helpful later on when I want to implement "zooming" capabilities on my graphs...
If you're using the cewolf distribution put out by me (and you should, it'll become the official distribution in the not-too-distant future, see the link in my signature) then you can use the de.laures.cewolf.cpp.VisualEnhancer postprocessor to achieve this. In your JSP, you'd have something like this:
Both "border" and "rangeIncludesZero" can have values of "true" or "false". The "rangeIncludesZero" attribute is new, though, so if you downloaded the distribution before you'll need to do it again now.
Thank you so much for the quick reply! I tried it out this morning in my code and it worked like a dream - I can now actually see the small fluctuations in my data - I'm so excited!
I had downloaded your cewolf distribution (after reading a number of topic threads about cewolf on JavaRanch) but didn't know just how much added functionality it had. Thank you for maintaining the cewolf distribution, it really is a very user friendly kit for implementing graphical displays in web pages.
One additional question on this same topic - in the future I hope to implement a functionality that allows the user to dynamically (through an html form) change the way the data is displayed on the graph. I hope to put in an option that would enable the user to define the x-axis and y-axis range to essentially "zoom in" on a point or section in the graph. Is there any way to define the axis range at this point in your distribution? (On a quick scan of the cpp classes I didn't see anything, but it might have been an oversight on my part)
I went about trying your suggestion to make a quick PostProcessor. I based it heavily off of your VisualEnhancer PostProcessor I was already using and managed to make a "zoom" PostProcessor that does exactly what I was looking for. I'm still working out a few of the bugs in the project (primarily with passing/setting parameters between the html form and the class using beans), but those are mainly caused by my elementary knowledge with the java/html relationship...there's always something to work on. I'm just excited that what seemed like a lost cause two days ago (my last resort was posting on this forum before giving up on cewolf entirely and trying a different way of displaying the data) is now an operational part of my developing website.
Anyway, thanks again so much for your help! If (more likely when) I get completely stuck again, I'll be back.
I can pass you the PostProcessor, and I think I can pass you the example code that runs the PostPrcoessor (although I'll have to check with my manager on that). If I can't pass the specific code I'm using it in I can definitely write up a really quick example code and pass that along with it.
I'm still working out some minor bugs in the example code (which in turn is altering the PostProcessor code to make it more functional) and if you're going to add it to the cewolf package I'll probably add some of the additional capabilities from the ValueAxis class (I only used setRange and resizeRange in my code). Is it alright if I pass it to you sometime later this week?
Also, what is the best way to send the code to you?