Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6349057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:32:28+00:00 2026-05-24T21:32:28+00:00

Im developing one GUI in C#.Net under WPF.Actually its an application for serial communication

  • 0

Im developing one GUI in C#.Net under WPF.Actually its an application for serial communication with the embedded device,I want to show a line chart with the frequently recieved data.And also I should provide an option to save those charts and to give an option to print it.How can I draw this dynamically with the support of free libraries or softwares?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:32:31+00:00Added an answer on May 24, 2026 at 9:32 pm

    I use Dynamic Data Display for all my WPF charting needs. It supports saving the charts, is very quick, provides seamless zooming and panning.
    Namespace: xmlns:d3=”http://research.microsoft.com/DynamicDataDisplay/1.0″

    XAML:

     <d3:ChartPlotter Name="plotter" Background="White">
        <d3:ChartPlotter.Resources>
            <conv:Date2AxisConverter x:Key="Date2AxisConverter"/>
        </d3:ChartPlotter.Resources>
        <d3:ChartPlotter.HorizontalAxis>
            <d3:HorizontalDateTimeAxis Name="dateAxis"/>
        </d3:ChartPlotter.HorizontalAxis>
        <d3:Header Content="{Binding PlotHeader}"/>
        <d3:VerticalAxisTitle Content="Value"/>
        <d3:HorizontalAxisTitle Content="Date"/>
    </d3:ChartPlotter>
    

    C# Code: Converter used

    public class Date2AxisConverter : IValueConverter
    {
        #region IValueConverter Members
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is DateTime && targetType == typeof(double))
            {
                return ((DateTime)value).Ticks / 10000000000.0;
                // See constructor of class Microsoft.Research.DynamicDataDisplay.Charts.DateTimeAxis
                // File: DynamicDataDisplay.Charts.Axes.DateTime.DateTimeAxis.cs
    
                // alternatively, see the internal class Microsoft.Research.DynamicDataDisplay.Charts.DateTimeToDoubleConversion
    
            }
            return null;
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            // try Microsoft.Research.DynamicDataDisplay.Charts.DateTimeAxis.DoubleToDate
            throw new NotSupportedException();
        }
    
        #endregion
    }
    

    C# Code: Clearing Graph and Creating line graph, Here my StockasticProcessPoint is a structure with a field “DateTime t” and a field “Double value”.

    using Microsoft.Research.DynamicDataDisplay;
    using System.Collections.ObjectModel;
    using Microsoft.Research.DynamicDataDisplay.DataSources;
    
    public void ClearLines()
    {
        var lgc = new Collection<IPlotterElement>();
        foreach (var x in plotter.Children)
        {
            if (x is LineGraph || x is ElementMarkerPointsGraph)
                lgc.Add(x);
        }
    
        foreach (var x in lgc)
        {
            plotter.Children.Remove(x);
        }
    }
    
    internal void SendToGraph() {
    
        IPointDataSource _eds = null;
        LineGraph line;
    
        ClearLines();
    
        EnumerableDataSource<StochasticProcessPoint> _edsSPP;
        _edsSPP = new EnumerableDataSource<StochasticProcessPoint>(myListOfStochasticProcessPoints);
        _edsSPP.SetXMapping(p => dateAxis.ConvertToDouble(p.t));
        _edsSPP.SetYMapping(p => p.value);
        _eds = _edsSPP;
    
        line = new LineGraph(_eds);
        line.LinePen = new Pen(Brushes.Black, 2);
        line.Description = new PenDescription(Description);
        plotter.Children.Add(line);
        plotter.FitToView();
    }
    

    With this, you should be able to plot a chart in WPF. Adding data live when it comes back from the serial port should be no problem. You can also look at the binding examples from DynamicDataDisplay.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a Java Desktop Application. In the GUI, I want that user
I'm developing a Python application; it has all its code in one package and
i am developing one application with map view i need display the weather depends
Hai every one I am developing an windows application in which i have to
I'm developing an application via which one can send sms by directing it to
I am developing iPhone application and In that application I've one TableViewController , and
I am developing a Java Desktop Application with GUI implemented in SWING. I hava
I'm making a sample GUI for a new application we are developing at work.
I'm developing an application that features multiple Swing GUIs. The main GUI has a
I'm developing a WinForms application in C#. I have limited experience in GUI programming,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.