Plotting Points

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Turc
Newbie
Newbie
Posts: 34
Joined: Wed Feb 03, 2010 12:00 am

Plotting Points

Post by Turc » Thu Jun 21, 2012 6:38 pm

The first few points do not plot on the graph when I plot points in real time.

If you look at the attachement, the black and red dots only show up if there is a point plotted. They show up, but the points are not plotted. This happens every time it starts plotting points.

Code: Select all

public void plotPoints(int pt1, int pt2)
{       
            DateTime dtTime = DateTime.getNow();
            
            if((pt1 == 0) && (pt2 == 0))
            {       
                int nLastVisible = m_csPt1Series.getLastVisible();
                double dblValue = m_csPt1Series.getPoint(nLastVisible).getY();
                m_csPt1Series.add(dtTime, dblValue, Color.transparent);
                m_csPt1Series.setNull(m_csPt1Series.getCount(), true);
                
                nLastVisible = m_csPt2Series.getLastVisible();
                dblValue = m_csPt2Series.getPoint(nLastVisible).getY();
                m_csPt2Series.add(dtTime, dblValue, Color.transparent);
                m_csPt2Series.setNull(m_csPwrSeries.getCount(), true);
            }
            else  //plot
            {   
                 m_csPt1Series.add(dtTime, pt1);
                 m_csPt2Series.add(dtTime, pt2);
            }
            
            if(m_csPt1Series.getCount() >= CHART_SIZE)
                m_csPt1Series.delete(0);

            if(m_csPt2Series.getCount() >= CHART_SIZE)
                m_csPt2Series.delete(0); 
            
            setMinMax();      //Moves/updates the chart's x-axis
}

Attachments
Screen Shot 2012-06-21 at 10.23.12 AM.png
Screen Shot 2012-06-21 at 10.23.12 AM.png (8.82 KiB) Viewed 2886 times

Yeray
Site Admin
Site Admin
Posts: 8912
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Plotting Points

Post by Yeray » Tue Jun 26, 2012 11:08 am

Hi Turc,

Excuse us for the delayed reply.
Could you please arrange a simple example project we can run as to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply