{"id":13415276,"url":"https://github.com/royben/RealTimeGraphX","last_synced_at":"2025-03-14T22:33:13.825Z","repository":{"id":46008061,"uuid":"166650044","full_name":"royben/RealTimeGraphX","owner":"royben","description":"High performance real-time graph for WPF \u0026 UWP","archived":false,"fork":false,"pushed_at":"2022-10-04T18:56:06.000Z","size":455,"stargazers_count":215,"open_issues_count":6,"forks_count":47,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-04T17:09:02.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/royben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-20T10:44:35.000Z","updated_at":"2024-09-18T10:44:45.000Z","dependencies_parsed_at":"2022-07-20T18:32:21.915Z","dependency_job_id":null,"html_url":"https://github.com/royben/RealTimeGraphX","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royben%2FRealTimeGraphX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royben%2FRealTimeGraphX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royben%2FRealTimeGraphX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royben%2FRealTimeGraphX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royben","download_url":"https://codeload.github.com/royben/RealTimeGraphX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658057,"owners_count":20326459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T21:00:46.398Z","updated_at":"2025-03-14T22:33:13.818Z","avatar_url":"https://github.com/royben.png","language":"C#","readme":"# RealTimeGraphX\n\n[![Build Status](https://sirilix.visualstudio.com/RealTimeGraphX/_apis/build/status/RealTimeGraphX?branchName=master)](https://sirilix.visualstudio.com/RealTimeGraphX/_build/latest?definitionId=5\u0026branchName=master) ![GitHub](https://img.shields.io/github/license/royben/RealTimeGraphX) [![Nuget](https://img.shields.io/nuget/v/RealTimeGraphX?label=RealTimeGraphX%20Nuget)](https://www.nuget.org/packages/RealTimeGraphX/) [![Nuget](https://img.shields.io/nuget/v/RealTimeGraphX.WPF?label=RealTimeGraphX.WPF%20Nuget)](https://www.nuget.org/packages/RealTimeGraphX.WPF/)\n\nRealTimeGraphX is a data type agnostic, high performance plotting library for WPF and UWP.\n\nThe library core components are built using .Net Standard which makes it portable to a range of platforms.\n\nTypical use case is, scientific measurements applications which requires real-time display with large data volumes.\n\nRealTimeGraphX has a number of built-in data point types (axis) like Double, Float, Int32 ,TimeSpan and DateTime, but you can easily implement any kind of custom data type by inheriting and implementing the mathematical logic for that type.\n\n### Features:\n- **High performance**\n- **Thread safe**\n- **MVVM support**\n- **Any type of data point**\n- **Zooming and panning**\n\n\u003cbr/\u003e\n\u003chr/\u003e\n\u003cbr/\u003e\n\nThe solution contains demo projects for WPF and UWP.\n\n**Single Series**\n\n![alt tag](https://github.com/royben/RealTimeGraphX/blob/master/Preview/single.png)\n\n**Multi Series**\n \n![alt tag](https://github.com/royben/RealTimeGraphX/blob/master/Preview/multi.PNG)\n  \n**Gradient Fill**\n \n![alt tag](https://github.com/royben/RealTimeGraphX/blob/master/Preview/gradient.png)\n\n\u003cbr/\u003e\n\u003chr/\u003e\n\u003cbr/\u003e\n \nThe follwing diagrams demonstrates the connections between graph components and how they are implemented on each platform.\n\n**Model**\n\n![alt tag](https://github.com/royben/RealTimeGraphX/blob/master/Preview/schema.png)\n\nThe graph controller binds to a renderer and a surface. Data points are pushed to the controller, the controller uses the renderer in orderer to prepare and arrange the points for visual display. Finally, the controller directs the renderer to draw the points on the specific surface.\n\n\n**WPF Stack Implementation**\n\n![alt tag](https://github.com/royben/RealTimeGraphX/blob/master/Preview/stack.png)\n\nEach platform (WPF/UWP etc.) should implement it's own *IGraphDataSeries* and *IGraphSurface*.\n\n\u003cbr/\u003e\n\u003chr/\u003e\n\u003cbr/\u003e\n\n\u003ch3\u003eExample\u003ch3\u003e\n \n ##### Model.cs\n \n ```csharp\n \n    public class ViewModel\n    {\n        //Graph controller with timespan as X axis and double as Y.\n        public WpfGraphController\u003cTimeSpanDataPoint, DoubleDataPoint\u003e Controller { get; set; }\n\n        public ViewModel()\n        {\n            Controller = new WpfGraphController\u003cTimeSpanDataPoint, DoubleDataPoint\u003e();\n            Controller.Renderer = new ScrollingLineRenderer\u003cWpfGraphDataSeries\u003e();\n            Controller.DataSeriesCollection.Add(new WpfGraphDataSeries()\n            {\n                Name = \"Series Name\",\n                Stroke = Colors.Red,\n            });\n\n            //We will attach the surface using WPF binding...\n            //Controller.Surface = null;\n        }\n\n        private void Start()\n        {\n            Stopwatch watch = new Stopwatch();\n            watch.Start();\n\n            Thread thread = new Thread(() =\u003e \n            {\n                while (true)\n                {\n                    //Get the current elapsed time and mouse position.\n                    var y = System.Windows.Forms.Cursor.Position.Y;\n                    var x = watch.Elapsed;\n\n                    //Push the x,y to the controller.\n                    Controller.PushData(x, y);\n\n                    Thread.Sleep(30);\n                }\n            });\n            thread.Start();\n        }\n    }\n \n ```\n\n ##### View.xaml\n \n  ```xaml\n  \n    \u003cGrid\u003e\n        \u003cGrid.RowDefinitions\u003e\n            \u003cRowDefinition Height=\"1*\"/\u003e\n            \u003cRowDefinition Height=\"35\"/\u003e\n        \u003c/Grid.RowDefinitions\u003e\n        \u003cGrid.ColumnDefinitions\u003e\n            \u003cColumnDefinition Width=\"70\"/\u003e\n            \u003cColumnDefinition Width=\"1*\"/\u003e\n        \u003c/Grid.ColumnDefinitions\u003e\n\n        \u003cGrid Grid.Column=\"1\"\u003e\n            \u003crealTimeGraphX:WpfGraphGridLines Controller=\"{Binding Controller}\" /\u003e\n            \u003crealTimeGraphX:WpfGraphSurface Controller=\"{Binding Controller}\" /\u003e\n        \u003c/Grid\u003e\n\n        \u003crealTimeGraphX:WpfGraphAxisControl Orientation=\"Vertical\" Controller=\"{Binding Controller}\" StringFormat=\"0.0\" /\u003e\n        \u003crealTimeGraphX:WpfGraphAxisControl Orientation=\"Horizontal\" Controller=\"{Binding Controller}\" Grid.Column=\"1\" Grid.Row=\"1\" StringFormat=\"hh\\:mm\\:ss\"/\u003e\n    \u003c/Grid\u003e\n  \n  ```\n","funding_links":[],"categories":["Graphics","图形"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyben%2FRealTimeGraphX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyben%2FRealTimeGraphX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyben%2FRealTimeGraphX/lists"}