• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

cewolf x-axis zooming and displaying peaks

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm successfully using the cewolf (version 1.1 by ulf dittmer) tag library to display charts. Unfortunately, there are some problems with the zooming on the x-axis.
As in the example app I want to set the x-axis domain and I'm using the lowerDomainValN and upperDomainValN properties in the zoombothaxis class but I get an exception:

Exception Details: javax.servlet.jsp.JspException
java.lang.IllegalArgumentException raised by post processor 'de.laures.cewolf.cpp.ZoomBothAxis@1b5a5dd'. Post processing of this post processor has been ignored.

Possible Source of Error:
Class Name: de.laures.cewolf.taglib.tags.ChartMapTag
File Name: ChartMapTag.java
Method Name: doStartTag
Line Number: 146

Perhaps, it's because I have high values between 1400 and 1900 on this axis?

Another issue is , that I want to display peaks in the chart. It would be nice the user could mark peaks himself, I did a little bit of googling but I found nothing to manage this.

Thanks for any help
Jette
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch. I'm glad you're getting some use out of cewolf.

Perhaps, it's because I have high values between 1400 and 1900 on this axis?


No, the magnitude of the numbers shouldn't play a role.

Please post the chart tag you're using in the JSP page. Seeing the actual values being used for the attributes (assuming they're JSP attributes, not literal values) would also help.
 
Henriette Rothacker
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your help

<jsp:useBean id="visualEnhancer" class="de.laures.cewolf.cpp.VisualEnhancer"/>
<jsp:useBean id="labelRotation" class="de.laures.cewolf.cpp.RotatedAxisLabels"/>
<jsp:useBean id="showLine" class="de.laures.cewolf.cpp.LineRendererProcessor"/>
<jsp:useBean id="zoom" class="de.laures.cewolf.cpp.ZoomBothAxis"/>
<jsp:useBean id="pageViews" class="PageViewCountData"/>
<jsp:useBean id="pparams" class="plotParams"/>
<jsp:setProperty name="zoom" property="*"/>
<cewolf:chart id="line" title="Spectral data" type="xy" xaxislabel="wavenumber" legendanchor="south" showlegend="true" yaxislabel="Absorbance" background="#FF0000">
<cewolf:data>
<cewolf:producer id="pageViews"/>
</cewolf:data>
<cewolf:chartpostprocessor id="visualEnhancer">
<cewolf:param name="border" value='false'/>
<cewolf:param name="rangeIncludesZero" value='false'/>
</cewolf:chartpostprocessor>
<cewolf:chartpostprocessor id="zoom">
<cewolf:param name="lowerRangeVal" value='${zoom.lowerRangeVal}'/>
<cewolf:param name="upperRangeVal" value='${zoom.upperRangeVal}'/>
<cewolf:param name="lowerDomainValN" value='${zoom.lowerDomainValN}'/>
<cewolf:param name="upperDomainValN" value='${zoom.upperDomainValN}'/>
<cewolf:param name="zoomFactor" value='${zoom.zoomFactor}'/>
<cewolf:param name="anchorValueD" value='${zoom.anchorValueD}'/>
<cewolf:param name="anchorValueR" value='${zoom.anchorValueR}'/>
</cewolf:chartpostprocessor>
</cewolf:chart>
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks as if you've copied and pasted pieces of different cewolf example pages together; I can't reproduce it, though, because the data returned by the PageViewCountData class in the distribution can't be used for an X/Y plot.

Here's a minimal example from which you should be able to start; it needs the ProduceMathDataExample class that's part of the sample web app.


Another issue is , that I want to display peaks in the chart. It would be nice the user could mark peaks himself, I did a little bit of googling but I found nothing to manage this.


Do you mean putting a label on a particular (X,Y) position, or maybe a label that has an arrow that points to a particular (X,Y) position? If so, then cewolf doesn't currently have that; the underlying JFreeChart library does, though, and cewolf could make use of it in a postprocessor.
 
Henriette Rothacker
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the PageViewCountData is data produced separately. The produceDataset method returns a XYSeriesCollection();
The chart is displayed the right way with this data.
I copied the buttons from the example ( zoom by number) . I can zoom on the y-axis, and the zoom factor is working, but I cannot zoom on the x-axis.

Do you mean putting a label on a particular (X,Y) position


yes, that's what I want to do.
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've released a new version of cewolf that includes a postprocessor (de.laures.cewolf.cpp.AnnotationProcessor) for adding labels -with and w/o arrows- to X/Y and category charts. The annotations.jsp page of the example web app shows how to use it. Let me know if you have any questions.
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!