Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 PolarChart and SegmentAttributeMode

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
OLI Posted - 28 Oct 2011 : 06:00:07
The forum works again! =)

When the forum was down we emailed a question about getting PolarChart and SegmentAttributeMode to work. In the reply QC stated that this was a but and that it was fixed in the attached new jar:s. (Thanks for quick reply and new version!)

Now the problem is that I still can't get it to work.

Some extracts from my code:

I define the different Attributes I want to use:


	private ChartAttribute[] colors = new ChartAttribute[]{
			new ChartAttribute (Color.BLACK, 1,ChartConstants.LS_SOLID,Color.BLACK),
			new ChartAttribute (Color.DARK_GRAY, 1,ChartConstants.LS_SOLID, Color.DARK_GRAY),
			new ChartAttribute (Color.LIGHT_GRAY, 1,ChartConstants.LS_SOLID, Color.LIGHT_GRAY),
			new ChartAttribute (Color.BLACK, 1,ChartConstants.LS_SOLID, Color.BLACK)
	};


Plot definition:

	private PolarScatterPlot scatterPlot;
	// .......
	......//
	scatterPlot = new PolarScatterPlot(transform, allVectors,
				   ChartConstants.CIRCLE, colors[0]);


I use the following method to update the graph after I have set new data on update:


	private void reloadColors(){
		scatterPlot.setSegmentAttributesMode(true);
		int i = 0;
		for(ChartAttribute color:colors){
			color.setFillFlag(true);
			color.setLineFlag(true);
			color.setFillColor(color.getColor());
			color.setLineColor(color.getColor());
			scatterPlot.setSegmentAttributes(i, color);
			i++;
		}
		colors[colors.length-1].setFillFlag(false);
		colors[colors.length-1].setLineFlag(true);
	}


The only thing I run after that method when updating data is updateDraw().

So any obvious errors with this method?
If you need any more info don't hesitate to ask.
2   L A T E S T    R E P L I E S    (Newest First)
OLI Posted - 28 Oct 2011 : 15:37:52
Found the problem I had installed the wrong .jar file thanks for the help!
quinncurtis Posted - 28 Oct 2011 : 10:51:12
We tested the software and it works for us. Make this modification to the thePlot2 plot in the PolarPlots.PolarLine example program:

ChartAttribute attrib2 = new ChartAttribute (Color.red, 1,0,Color.red);
attrib2.setFillFlag(true);
PolarScatterPlot thePlot2 = new PolarScatterPlot(pPolarTransform, Dataset1,ChartConstants.CIRCLE,attrib2);
thePlot2.setSegmentAttributesMode(true);
ChartAttribute segmentAttrib = new ChartAttribute (Color.yellow, 1,ChartConstants.LS_SOLID, Color.yellow);
segmentAttrib.setSymbolSize(20);
thePlot2.setSegmentAttributes(8,segmentAttrib);
thePlot2.setSegmentAttributes(9,segmentAttrib);
thePlot2.setSegmentAttributes(10,segmentAttrib);
thePlot2.setSegmentAttributes(11,segmentAttrib);

gWG.addChartObject(thePlot2);

Let us know the results. If it doesn't you need to check the reference to the qcchart2djava.jar file and make sure it is the one we sent you.


Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07