Page 1 of 1

teeChart post plotting null points issue

Posted: Wed Jul 28, 2010 6:57 pm
by 15355183
I've set my program to plot a null point ( .add() ) on the chart if the value exceeds a certain threshold or if it times out - which it does (stop point). Then onces the value goes back down beneath the threshold or comes back from a timeout it starts plotting the points again (start point), but it also plots a line from the previous stop point to the new start point, which defeats the purpose of adding null points to the plot.

Any idea on how to keep those null points?

Thank you in advance for your time!

Re: teeChart post plotting null points issue

Posted: Thu Jul 29, 2010 2:56 pm
by 15355183
Anyone?

I'm using Fastline.

Re: teeChart post plotting null points issue

Posted: Fri Jul 30, 2010 2:26 pm
by yeray
Hi Turc,

Is it possible that you have your series TreatNulls property set as SKIP?

Code: Select all

        tChart1.getAspect().setView3D(false);

        com.steema.teechart.styles.Line line1 = new com.steema.teechart.styles.Line(tChart1.getChart());
        line1.fillSampleValues(10);
        line1.getPointer().setVisible(true);

        line1.setNull(5);

        line1.setTreatNulls(TreatNullsStyle.SKIP);
Try changing it to DONOTPAINT:

Code: Select all

line1.setTreatNulls(TreatNullsStyle.DONOTPAINT);

Re: teeChart post plotting null points issue

Posted: Fri Jul 30, 2010 3:09 pm
by 15355183
Thank you for replying back, I tried changing all the settings and still nothing. It doesn't plot null points, but once it starts plotting valid points, it reconnects the points.

here is a sample of my code:

Code: Select all

FastLine TemperatureSeries = new FastLine(temperatureStripChart.getChart().chart);
TemperatureSeries.setTreatNulls(TreatNullsStyle.DONOTPAINT);
TemperatureSeries.setVisible(true);        //won't let me access .getPointer() when using FastLine
...

//in a different class
if(temperature > 33)
{
     myChart.getSeries(0).add();
}
else
{
     myChart.getSeries(0).add(sampleTime, temperature);
     myChart.setMinMax();
}
I've tried setting/changing every possible setting that it lets me change/set and still nothing. Line does the same thing. I'm currently using Points, but thats not fast enough and when the temperature suddenly jumps or drops, you can see the gaps.

Re: teeChart post plotting null points issue

Posted: Fri Jul 30, 2010 3:22 pm
by 15355183
I don't need it to plot NULL points for when it exceeds a certain temperature - that was more for debugging purposes. What i need it for is when i hit the button "Stop", it stops. Wait a certain amount of time, then select "Start", and it starts from the current time, but it reconnects the previous plotted point which i DO NOT want it to do, and shouldn't do.

I've honestly tried everything and starting to firmly believe that its a bug. The only graph type that doesn't reconnect the points is the Point types.

Re: teeChart post plotting null points issue

Posted: Mon Aug 02, 2010 5:54 pm
by yeray
Hi Turc,

In the following example I have a Chart and a button. When the button is clicked, the @action is executed ans a null value and 10 more values are added to the line series. I can see the gap, don't you?.

Code: Select all

    private com.steema.teechart.styles.Line line1;
    private void initChart() {
        tChart1.getAspect().setView3D(false);

        line1 = new com.steema.teechart.styles.Line(tChart1.getChart());
        line1.fillSampleValues(10);
        line1.getPointer().setVisible(true);

        line1.setTreatNulls(TreatNullsStyle.DONOTPAINT);
    }

    @Action
    public void clicked() {
        line1.add();

        double tmp;
        java.util.Random rnd = new java.util.Random();
        for (int i=0; i<10;i++)
        {
            tmp = line1.getYValues().getRange() / 2;
            line1.add(line1.getYValues().getValue(line1.getCount()-1) + rnd.nextDouble()*tmp - tmp/2);
        }
    }
If you still have troubles with it, please try to arrange a simple example project we an run as-is to reproduce the problem here.

Re: teeChart post plotting null points issue

Posted: Wed Aug 04, 2010 6:36 pm
by 15355183
Thank you for the help. added this and it worked:

.setNull(myChart.getSeries(0).getCount(), true);

Re: teeChart post plotting null points issue

Posted: Thu Aug 05, 2010 10:43 am
by yeray
Hi Turc,

I'm glad to see it!