Giter VIP home page Giter VIP logo

realtimegraphx's People

Contributors

royben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

realtimegraphx's Issues

Graph Pattern

HI,

Can only plot the graph only point pattern ? instead of the line graph

Thanks.
Regards,
Ooi

How to display y-Axis values with more decimal digit ?

Hi,
Thanks for your fantastic and performant library.

I would like to know how to extend the display of the number of decimal digit on the Y-Axis.
I'm working with some values which need more precision in the display (ideally 3 digits after the dot)
By default, only one decimal digit is displayed.
Any Clue ?

Thanks

How to implement the zoom and pan functions

This library is great and has a good future..

It is said in the docs that zooming in/out as well as the panning both are enabled, but I could not find the method or property to achieve this. Can anyone help with this regard?

Is there any way to set a minimum X range?

I am setting the maximum X range to - for example - 10s.

      Controller = new WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>();
      Controller.Range.MaximumX = TimeSpan.FromSeconds(10);
      Controller.Range.AutoY = true;

The X range starts at zero and expands up to 10s as data arrives.

Is there any way to set the X range to 10s from the beginning?

I would prefer the graph to fill from the left until the first 10s is full, and then start scrolling left.
It would also be OK if the data started at the right and scrolled from the beginning.

Howto Map data?

Hi! Is there a implemented Data mapper?

I have a ObservableCollection _actValue
and the ValueModel contains:
public DateTime _dateTime;
public double _value;

I add every 1ms one datapoint. is it possible to map the data?

thanks ### Philipp

How to perform zooming and panning actions?

Thank you for writing this high performance plotting library.
I find the zooming and panning feature description on README, but do not know how to use it. Could you please give an example to show how to use this feature?

Draw lines

May I ask if the warning lines of upper and lower limits can be drawn? I need boundary values of different colors to reflect whether he is currently beyond the limit.

Fixed width proposal

In wanted to preserve the width of the X scale at the beginning of an acquisition.
In fact, I find confusing seeing the data being compressed until the X size reaches the Range.MaximumX value.

I successfully made a change in the code with the following goals:

  • Start plotting at the left of the control
  • As soon as the data reaches the right side of the control, the default scrolling behavior take place

The change was straightforward in the GraphController.cs file (line 313):

if (_to_render.Count > 0 && _to_render.First().Value.XX.Count > 0)
{
    min_x = _to_render.First().Value.XX.First();
    var runtimeMax = _to_render.First().Value.XX.Last();
    if (runtimeMax > max_x)
        max_x = runtimeMax;
}

This could be a small change to control with a (dependency) property.

HTH

Is this project dead?

Hello? i started using this library quite while ago and i found few issue, but looking on issues from other people indicate that the development of this library is not active anymore...

So ... is this repo dead? I can make some PR with some improvements or i can fork your repo and just do it my way.

Zooming not working

Hi!

I tried to leftCTRL + mouse to zoom in my graph, but it does nothing, not even an error is shown.
I am using a WpfGraphController<FloatDataPoint, FloatDataPoint>

different decimal places for some charts.

I use multi charts in my program, which has datagrid.
When I click some row, i want to show some chart with RealtimeGraphX.

In my case, the chart's y axis's string format are different because of decimal places respectively.
For row1, I need "F4". ex) 0.3333
For row2, I need "F0". (integer) ex) 3000
For row3, I need "F1" . ex) 3.5

My program skill is not good..
I set string format in View.xaml as following.
<realTimeGraphX:WpfGraphAxisControl Orientation="Vertical" Controller="{Binding Controller}" StringFormat="####.####" />
Then it's only for "F4" decimal places.
Please help me for my issue.

X axis range problems

Hi!

I have issues with the Controller.Range.MaximumX property. The controller is a WpfGraphController<FloatDataPoint, FloatDataPoint> and i set this property to 25 based on the demo provided by you. As a little test i have pushed a 100 data, one by one, throught Controller.PushData(X,Y) and at the end the number of displayed points is a 100 instead of the top 25 which should be the case, as the MaximumX property is still 25.

Any Guess why i see all my data instead of the last few entries?

Clear graph when paused not clearing surface

Found one issue with clearing, easy reproducible on your example project.

When we stop pushing any data to the controller and call ClearCommand your code clears datapoints collection, but not re-render graph.

To reproduce replace while (true) Line 76 MainWindowVM with while (!Controller.IsPaused).

This issue has very simple workaround, tho. After calling ClearCommand I just added one data point with default values, like Controller.ClearCommand.Execute(null); Controller.PushData(new Int32DataPoint(0), new Int32DataPoint(0));

But still, it will be great to fix this issue.

PS: Great library! If it be easy to implement tooltips for points on a graph, or 'marker line', like was mentioned on #10, it will be 100% match to my use case. If you have an idea how to do it, at least direction, will be appreciated!

Have you considered adding a caption to the Axes?

In my application I am showing a voltage signal in the unit V.

In my opinion it is critical to show what the signal is, and most important, what the unit it. For example, I will probably add the caption "Sensor Voltage [V]".

It's less important on the horizontal axis, because this is pretty obviously Time, but if there was a Caption property, it should obviously be supported on both axes.

Obviously, I could add a label to the left of the Graph.
I could probably also implement it with an "Attached Property" and a modified control template.

However. I think it would be better to make it property of the Axis and display it with the axis using the same font and color.
(I will probably try to implement this on my fork of the repository.)

Are there any beginner friendly tutorials available?

As a beginner, I managed to get the demo project running, but what do I have to do to use these graphs in my own (WPF) project? Do I have to add a reference somewhere? Or copy some files into my project folders?
Those graphs look nice for sure, and I would love to use them, but is there a beginner friendly tutorial somewhere? Help is much appreciated :-)

Marker and Multi YAxis avaible

Hi!

I "played" a little bit with this cool graph, but this two features I didn't found...
Is a marker avaible or is it possible to implement it?
Same question for Multi Y-Axis...

greetings Phil

Why it WpfGraphControl not defined in RealTimeGraphX.WPF ?

The control WpfGraphControl is defined in the project RealTimeGraphX.WPF.Demo, along with the associated control template in Generic.xaml.

Why is this control not defined in the project RealTimeGraphX.WPF instead of the demo project.
In my opinion this is core part of the control.

WPF Control not visible

Hi,
I create a project WPF with .NET 5.0 using your Nuget package. But graphic is not displayed.
I added your source code to my project, but also not graphic.
I have see in your response for the closed issue "control not displayed" , you recommend to use WpfgraphicSurface and not WpfGraphiccontrol as in your project. But I cannot see any GraphicSurface in you WPF demo project.
Can you explain again or update your project.
Thank you very much for your package.
Best regards

Migrating WPF to .NET (core)

I migrated the library and the process was straightforward:

  • Created a new .NET WPF project
  • Added a reference to the System.Drawing.Common
  • Copied all the file from the WPF project to this new one

The significant part of the csproj is:

    <PropertyGroup>
        <TargetFramework>net5.0-windows</TargetFramework>
        <UseWPF>true</UseWPF>
        <RootNamespace>RealTimeGraphX.WPF</RootNamespace>
    </PropertyGroup>

    <ItemGroup>
      <PackageReference Include="System.Drawing.Common" Version="5.0.2" />
    </ItemGroup>

The source files can be instead be put in a "Shared Project" so that you can create separate binary files (.NET Framework and .NET) from the same sources.

Questions:

  • are you willing to do it in order to get the nuget packages instead of building the libs manually?
  • Is this repo still under maintenance?

Thanks!

License

What is the license for this project?

Cannot transfer WPF demo into my own app...

This is a really slick and nice graphing tool! I am having some trouble, however, understanding how to transfer the demo into my own application.

These are the steps I took:

  1. add references to RealTimeGraphX and RealTimeGrpahX.WPF in my project
  2. copy the class WpfGraphControl.cs that defines the "Controller" DependencyProperty into my project
  3. instantiate a controller in my XAML file as it is in the demo: <myClass:WpfGraphControl Controller="{Binding Controller}"
  4. define a public WpfGraphController<Type, Type> Controller property in my view model code

The result is an empty control where the graph should be. I am sure that the calls to Controller.PushData are being hit, because when I step in with the debugger, the data is going in.

Here is a pic:
rtx_fail

I am able to draw the graph if instead of using <myClass:WpfGraphControl Controller... I instead use <rtx:WpfGraphSurface... (where rtx points to the namespace defined as xmlns:rtx="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF") in my XAML file, but then it only shows the line plot. There are no axes, labels, or any of the other good stuff:
rtx_sorta

I Also tried to use rtx:WpfGraphController but this was met with an error. What am I missing here?

Control no visible

Hello,

I don't know if I'm doing something wrong!!! but the controller is not visible in my Window.xaml

I used the sample code in RealTimeGraphX.WPF.Demo and use the exact same code...

no_show

this is my MainWindow.xaml
`

<Window.Resources>
    <collections:ArrayList x:Key="colors">
        <Color>DodgerBlue</Color>
        <Color>Red</Color>
        <Color>Green</Color>
    </collections:ArrayList>

    <collections:ArrayList x:Key="brushes">
        <SolidColorBrush Color="Transparent"></SolidColorBrush>
        <SolidColorBrush Color="#861E90FF"></SolidColorBrush>
        <LinearGradientBrush>
            <GradientStop Offset="0" Color="#86FF0000" />
            <GradientStop Offset="1" Color="#80FFFF00" />
        </LinearGradientBrush>
    </collections:ArrayList>

</Window.Resources>

<Grid x:Name="mainGrid">

    <Grid.RowDefinitions>
        <RowDefinition Height="100"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>



    <Border Grid.Row="1" Grid.Column="0" CornerRadius="5" BorderBrush="Black" Padding="5" BorderThickness="1" Margin="5">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>

            <ctrl:GraphController Grid.Row="0" Grid.Column="0" Controller="{Binding GraphController, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0 0 5 0"/>

            <Border Grid.Row="0" Grid.Column="1" BorderBrush="Black" BorderThickness="1" CornerRadius="5" Padding="5">
                <StackPanel Orientation="Vertical">
                    <TextBlock >Duration</TextBlock>
                    <TextBox Margin="0 5 0 0" Text="{Binding GraphController.Range.MaximumX,Mode=TwoWay}"></TextBox>

                    <TextBlock  Margin="0 10 0 0">Refresh Rate</TextBlock>
                    <TextBox Margin="0 5 0 0" Text="{Binding GraphController.RefreshRate,Mode=TwoWay}"></TextBox>

                    <TextBlock  Margin="0 10 0 0">Minimum Y</TextBlock>
                    <TextBox Margin="0 5 0 0" Text="{Binding GraphController.Range.MinimumY,Mode=TwoWay}"></TextBox>

                    <TextBlock  Margin="0 10 0 0">Maximum Y</TextBlock>
                    <TextBox Margin="0 5 0 0" Text="{Binding GraphController.Range.MaximumY,Mode=TwoWay}"></TextBox>

                    <CheckBox Margin="0 5 0 0" IsChecked="{Binding GraphController.Range.AutoY,Mode=TwoWay}">Auto Range (Y)</CheckBox>

                    <TextBlock  Margin="0 20 0 0">Stroke</TextBlock>
                    <ComboBox Margin="0 5 0 0" ItemsSource="{StaticResource colors}" SelectedItem="{Binding Controller.DataSeriesCollection[0].Stroke}"/>

                    <TextBlock  Margin="0 10 0 0">Thickness</TextBlock>
                    <Slider Margin="0 5 0 0" Minimum="1" Maximum="5" Value="{Binding GraphController.DataSeriesCollection[0].StrokeThickness}" IsSnapToTickEnabled="True" TickFrequency="1" />

                    <TextBlock  Margin="0 10 0 0">Fill</TextBlock>
                    <ComboBox Margin="0 5 0 0" ItemsSource="{StaticResource brushes}" SelectedItem="{Binding Controller.DataSeriesCollection[0].Fill}"/>

                    <CheckBox Margin="0 10 0 0" IsChecked="{Binding GraphController.IsPaused,Mode=TwoWay}">Paused</CheckBox>

                    <Button Margin="0 10 0 0" Padding="5" Command="{Binding GraphController.ClearCommand}">Clear</Button>

                    <TextBlock  Margin="0 10 0 0">DataSeries Count</TextBlock>
                    <TextBox Text="{Binding GraphController.DataSeriesCollection.Count, Mode=OneWay}"/>
                </StackPanel>
            </Border>

        </Grid>
    </Border>


</Grid>

`

my ViewModel

`public class MainWindow : Helpers.PropertyChangedNotification
{

    #region Constructors

    public MainWindow()
    {
        GraphController = new WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>();
        GraphController.Range.MinimumY = 0;
        GraphController.Range.MaximumY = 3000;
        GraphController.Range.MaximumX = TimeSpan.FromSeconds(10);
        GraphController.Range.AutoY = false;

        GraphController.DataSeriesCollection.Add(new WpfGraphDataSeries()
        {
            Name = "SM-G9600_POWER_ON",
            Stroke = Colors.DodgerBlue,
            Fill = Brushes.Transparent,
            IsVisible = true,
        });

        dumyData();
    }

    #endregion Constructors



    #region Fields

    Random rd = new Random();

    #endregion Fields



    #region Properties

    public WpfGraphController<TimeSpanDataPoint, DoubleDataPoint> GraphController { get { return GetValue(() => GraphController); } set { SetValue(() => GraphController, value); } }
    

    #endregion Properties



    #region Private Methods

    void dumyData()
    {
        Stopwatch watch = new Stopwatch();
        watch.Start();

        Task.Factory.StartNew(() =>
        {
            while (true)
            {
                var y = rd.NextDouble() * 3000;
                var x = watch.Elapsed;

                GraphController.PushData(x, y);

                Thread.Sleep(30);
            }
        });
    }

    #endregion Private Methods



    #region Public Methods



    #endregion Public Methods


}`

Here are all files and solution I'm using...
https://mega.nz/#!cJwDxAYa!1y06JZmGTp54c9o-tr3yilHV94FnPdIsjsQ3LOwh0kg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.