Page 1 of 1

Plotting Points

Posted: Thu Jun 21, 2012 6:38 pm
by 15355183
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
}


Re: Plotting Points

Posted: Tue Jun 26, 2012 11:08 am
by yeray
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.