Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCRTGraph for Java
 Trying to make a Real-Time LineGapPlot

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
tcormode Posted - 23 Jan 2006 : 15:48:58
I'm trying out QC before I buy it. I am trying to make a scrolling real-time graph that has two lineplots and one linegapplot. However, I am getting a Null Pointer Exception. If I eliminate the linegapplot, things run fine. I'm a little stumped. If someone can help out, it would be appreciated. A snippet of the code that creates the plots is as follows:

scrollFrame = new RTScrollFrame(this, rtSeries[0], pTransform1, ChartConstants.RT_FIXEDEXTENT_MOVINGSTART_AUTOSCROLL);

scrollFrame.setScrollScaleModeY(ChartConstants.RT_NO_AUTOSCALE_Y);
scrollFrame.addProcessVar(rtSeries[1]);

scrollFrame.setScrollRescaleMargin(0.25);
scrollFrame.setMinSamplesForAutoScale(50);

simpleplot[0] = (SimplePlot) new SimpleLinePlot(pTransform1, null, attrib1);
simpleplot[1] = (SimplePlot) new SimpleLinePlot(pTransform1, null, attrib2);

scrollFrame.addProcessVar(rtLineGap[0]);
scrollFrame.addProcessVar(rtLineGap[1]);
LineGapPlot alTargetPlot = new LineGapPlot(pTransform1, null, attribLG);
alTargetPlot.setFastClipMode(ChartConstants.FASTCLIP_X);
mpvLineGap = new RTMultiProcessVar("Al Target Range", rtLineGap);
lgPlot = new RTGroupMultiValuePlot(pTransform1, alTargetPlot, rtLineGap);

chartVu.addChartObject(scrollFrame);
chartVu.addChartObject(lgPlot);

for (int i = 0; i< 2; i++) {
simpleplot[i].setFastClipMode( ChartConstants.FASTCLIP_X);
rtlineplot[i] = new RTSimpleSingleValuePlot(pTransform1,simpleplot[i],rtSeries[i]);
chartVu.addChartObject(rtlineplot[i]);
}
2   L A T E S T    R E P L I E S    (Newest First)
tcormode Posted - 24 Jan 2006 : 11:31:38
It turns out that I did not call the statement:
rtLineGap[0].setDatasetEnableUpdate(true); before I set the current value. This caused things to crash...

Thanks for the help.
quinncurtis Posted - 23 Jan 2006 : 18:59:48
We cannot tell by inspection what is wrong with your program. It may be in the parts of the code you do not show. To rule out a simple problem with the LineGapPlot routine used in a real-time graph, we modified the example program ScrollGraphDemo.GroupScrollGraph1 to plot a LineGapPlot.


// The following line was changed to create the LineGapPlot
// MultiLinePlot groupplot = (MultiLinePlot) new MultiLinePlot(pTransform1, null, attribArray);
LineGapPlot groupplot = (LineGapPlot) new LineGapPlot(pTransform1, null, attribArray[0]);
groupplot.setFastClipMode(ChartConstants.FASTCLIP_X);
rtlineplot = new RTGroupMultiValuePlot(pTransform1,groupplot, bigProcessVarArray);
chartVu.addChartObject(rtlineplot);


It worked as expected.

If you cannot solve the problem, first see if you can reproduce the problem using the ScrollGraphDemo.GroupScrollGraph1 example program. If not, then zip your complete project that reproduces the problem and send it with an explanation to support@quinn-curtis.com.

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