Skip to content

epsi1on/wpf-fast-live-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is intended to render line charts for WPF with high performance. Other features like zoom, pan, graphics, mouse hit etc. may not be quite good, but performance is pretty high regard to some other controls because this code uses WriteableBitmap object. Mainly use for live chart with high input rate.

Perofmance is more than 30FPS for data with hundreds points

Screen Shot

Simple Usage

simply set two properties:

var objects = new ObservableCollection<double[]>();

chart1.Source = objects;
chart1.Mapper = new ArrayMapper;


public class ArrayMapper:IChartPointMapper
{
  public void Map(object obj, out double x, out double y)
  {
    var arr = obj as double[];

    x = arr[0];
    y = arr[1];
  }
}

From now wherever any object added to objects, control will be notified and redraws the chart. no need for manual update.

Features

Modes

have 3 modes, set with LineChart2.DrawMode:

DrawMode.AllOfData: Whole data is drawn on canvas

DrawMode.TailOfData: Only certain amount of tail of data is drawn DrawMode.TailOfDataEkg: Only certain amount of tail of data is drawn, in electro kardio graphic mode (heart bit monitor)

About

fast live chart in wpf uses writeable bitmap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published