Real-Time Sweep Chart

Real-Time Chart Example in C++ (MFC, Qt), C# (.NET Windows Forms, WPF) and Java

Real-Time Sweep Chart in C++ (MFC, Qt) and C# (.NET) Most real-time chart examples in the ChartDirector distribution append new data to the right side of the chart. When the data lines reach the right border, the chart will scroll to the left to leave space for more data.

In contrast, in this Real-Time Sweep Chart example, when the data lines reach the right border, they will wrap back and restart from the left side.

This example uses a layout that puts the y-axis labels inside the plot area. This maximize the plot area width as it is no longer necessary to reserve space outside of the plot area for the labels. In this example, it allows the chart to cover the entire window horizontally.

The data source in this example is a psuedo random wave generator running in a separate thread, like that in the Multithreading Real-Time Chart sample code.

Download

*** Note *** : If you are new to ChartDirector, it is recommended you download ChartDirector from the download page to try it. It includes complete ChartDirector documentation as well as plenty of sample code designed as tutorials. The following assumes you already have some basic understanding of ChartDirector.
The sample code in this page is included as part of the "Real-Time Chart Extra Sample Code Pack".
Real-Time Chart Extra Sample Code Pack for C++ (MFC, Qt)
Real-Time Chart Extra Sample Code Pack for .NET (C# Windows Forms, WPF)
Real-Time Chart Extra Sample Code Pack for Java (Swing)