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!
teeChart post plotting null points issue
Re: teeChart post plotting null points issue
Anyone?
I'm using Fastline.
I'm using Fastline.
Re: teeChart post plotting null points issue
Hi Turc,
Is it possible that you have your series TreatNulls property set as SKIP?
Try changing it to DONOTPAINT:
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);
Code: Select all
line1.setTreatNulls(TreatNullsStyle.DONOTPAINT);
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: teeChart post plotting null points issue
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:
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.
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();
}
Re: teeChart post plotting null points issue
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.
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
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?.
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.
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);
}
}
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: teeChart post plotting null points issue
Thank you for the help. added this and it worked:
.setNull(myChart.getSeries(0).getCount(), true);
.setNull(myChart.getSeries(0).getCount(), true);
Re: teeChart post plotting null points issue
Hi Turc,
I'm glad to see it!
I'm glad to see it!
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |