Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Multiple colors in same series

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
johnbutler Posted - 10 Nov 2005 : 07:43:52
Is it possible to have different sections of the same series colored differently?
5   L A T E S T    R E P L I E S    (Newest First)
johnbutler Posted - 11 Nov 2005 : 07:35:56
Good to know. Thanks.
quinncurtis Posted - 10 Nov 2005 : 16:16:08
You may want to know that if you use segment colors for a line plot, it will slow the drawing speed up to x100. Segment colors force the software to set the line style and color attributes, and plot every line segment, individually, instead of being able to plot the line plot as one long polyline with a fixed color and line style.

The same applies to marking invalid data points in the dataset attached to the line plot. Anything that breaks up long polyline runs will drastically slow drawing of the line plots.
quinncurtis Posted - 10 Nov 2005 : 14:48:17
If you are dynamically increasing the size of a dataset, you will also need to dynamically increase the size of the segment attribute buffer.

The ChartPlot.resizeSegmentAttributes method should be called each time you increase the number of datapoints in the dataset.

Dataset1.addDataPoint(101, 75);
thePlot1.resizeSegmentAttributes(Dataset1.getNumberDatapoints());
johnbutler Posted - 10 Nov 2005 : 14:00:07
Can this be done dynamically? Whenever I attempt to update the segment attributes after the plot has been added to the chartView, the change does not show up. What I am confused by, it that if I change the segment attribute of the first (and only) point before adding the plot to the chartView and then extend the line without copying the segmentAttribute, the first segment attribute is applied to the entire line. However, if I attempt to make any changes after the plot has been added, I don't see them.

Here is what I have...

constructor...

_lineplots[i] = new SimpleLinePlot(_pTransform1, _datasets[i],
SIGNAL_BELOW_THRESHOLD_ATTRIBUTE);
_lineplots[i].setSegmentAttributesMode(true);
_lineplots[i].setSegmentAttributes(0, SIGNAL_BELOW_THRESHOLD_ATTRIBUTE);
this.addChartObject(_lineplots[i]);



updateMethod (called every 1 second).... This method extends all the plots using the previous data value and segmentAttributes.

for (int i=0; i<_numDatasets; i++) {
_datasets[i].addDataPoint(_seriesFrequency[i], time)
_lineplots[i].setSegmentAttributes(_datasets[i].getNumberDatapoints()-1,

_lineplots[i].getSegmentAttributes(_datasets[i].getNumberDatapoints()-2));
}

change attribute method...
_lineplots[seriesNum].setSegmentAttributes(_datasets[seriesNum].getNumberDatapoints()-1,
att);
quinncurtis Posted - 10 Nov 2005 : 10:04:05
That is discussed in the QCChart2DJavaManual.pdf documentation for the SimpleLinePlot class, method setSegmentAttrbiutes.

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