Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart2D for Java
 Add Vertical line to plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johnbutler

23 Posts

Posted - 10 Nov 2005 :  08:21:47  Show Profile  Reply with Quote
How would I add a vertical line to the plot. It should stretch from the top to bottom of the plot. I tried the following to see if I could see the line, but it does not show up.


tuningLine = new ChartShape (pTransform1,
new Line2D.Double(1, 5, 500, 505),
ChartShape.NORM_PLOT_POS, 2, 2, ChartShape.NORM_PLOT_POS, 0);
ChartAttribute tuneLineAtt = new ChartAttribute(Color.green,
5,ChartConstants.LS_SOLID, Color.green);
tuneLineAtt.setFillFlag(true);
tuningLine.setChartObjAttributes(tuneLineAtt);
gWG.addChartObject(tuningLine);

quinncurtis

1164 Posts

Posted - 10 Nov 2005 :  10:44:13  Show Profile  Reply with Quote
From the our example program scatterplots.LabeledDatapoints

Line2D titleLine = new Line2D.Double(0.1,0.1, 0.9,0.1);

ChartShape titleLineShape = new ChartShape(pTransform1, titleLine,
ChartConstants.NORM_GRAPH_POS, 0.0, 0.0, ChartConstants.NORM_GRAPH_POS,0);
titleLineShape.setLineWidth(3);
gWG.addChartObject(titleLineShape);


I would guess that you seem to be using device (java user coordinates) instead of normalized (0.0 - 1.0) plot coordinates, which is what you specifying with ChartConstants.NORM_GRAPH_POS.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07