{"id":13599487,"url":"https://github.com/PrateekKumarSingh/Graphical","last_synced_at":"2025-04-10T12:33:07.081Z","repository":{"id":24756708,"uuid":"102374198","full_name":"PrateekKumarSingh/Graphical","owner":"PrateekKumarSingh","description":"Open-Source, Platform independent module that consumes data points as input and plots them on a 2D graph 📈📊💹 [Scatter / Bar / Line] on the PowerShell Console/Terminal","archived":false,"fork":false,"pushed_at":"2023-11-30T17:03:47.000Z","size":14167,"stargazers_count":353,"open_issues_count":18,"forks_count":34,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-06T01:09:47.158Z","etag":null,"topics":["ascii-art","core","linux","powershell","terminal","terminal-graphics","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/PrateekKumarSingh.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-09-04T15:10:36.000Z","updated_at":"2025-03-21T06:17:37.000Z","dependencies_parsed_at":"2024-04-13T03:49:15.651Z","dependency_job_id":null,"html_url":"https://github.com/PrateekKumarSingh/Graphical","commit_stats":{"total_commits":73,"total_committers":8,"mean_commits":9.125,"dds":0.6301369863013699,"last_synced_commit":"0f93963baa1b0b69c44e2e3b373a0e522c78a9b0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrateekKumarSingh%2FGraphical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrateekKumarSingh%2FGraphical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrateekKumarSingh%2FGraphical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrateekKumarSingh%2FGraphical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrateekKumarSingh","download_url":"https://codeload.github.com/PrateekKumarSingh/Graphical/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217145,"owners_count":21066633,"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":["ascii-art","core","linux","powershell","terminal","terminal-graphics","windows"],"created_at":"2024-08-01T17:01:05.059Z","updated_at":"2025-04-10T12:33:02.062Z","avatar_url":"https://github.com/PrateekKumarSingh.png","language":"PowerShell","readme":"# Powershell Console/Terminal Graph\nConsumes data points as input and plots them on a **2D graph in the Powershell console**\n\nType of Graphs Available -\n\n1. Scatter\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Scatter.jpg)\n\n2. Bar\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Bar.jpg)\n\n3. Line\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Line.jpg)\n\n# Installation\n\n### [PowerShell v5](https://www.microsoft.com/en-us/download/details.aspx?id=50395) and Later\nYou can install the `Graphical` module directly from the PowerShell Gallery\n\n\n* **[Recommended]** Install to your personal PowerShell Modules folder\n    ```PowerShell\n    Install-Module Graphical -scope CurrentUser\n    ```\n* **[Requires Elevation]** Install for Everyone (computer PowerShell Modules folder)\n    ```PowerShell\n    Install-Module Graphical\n    ```\n\n### PowerShell v4 and Earlier\nTo install to your personal modules folder run:\n```PowerShell\niex (new-object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/PrateekKumarSingh/Graphical/master/Install.ps1')\n```\n\n# Features\n* Color-coded output depending upon the Value of data point\n* Colors codes can be customized by passing a color-map hash table\n* Custom X an Y-Axis labels\n* Graph in console is independent and fully customizable, not like Task Manager (Performance Tab)\n* Could be incorporated in Powershell scripts\n* Can consume data points generated during script run or Pre stored data like in a file or database.\n* Independent of PowerShell version, and Works on PowerShell Core (Windows\\Linux)\n\n# Use Cases\n1. The function `Show-Graph` takes data points as input and plot them on a 2D graph\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Example1.jpg)\n\n    You can also customize the labels on X and Y-Axis and provide a graph title\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Example2.jpg)\n\n    The function `Show-Graph` can consume data points, generated during script execution or from a file or database like in the above example.\n\n    ![](https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/Example3.jpg)\n\n2. Plotting Audio Peak Levels in your PowerShell Console (Don't forget to play some audio! :P)\n\n    ```PowerShell\n    Install-Module AudioDeviceCmdlets, Graphical\n    Import-Module AudioDeviceCmdlets, Graphical -Verbose\n    $Device = Get-AudioDevice -Playback\n    [int[]]$datapoints =@(0)*50\n    do {\n        $PeakValue = $Device.Device.AudioMeterInformation.MasterPeakValue*100\n        $datapoints += [int]$PeakValue\n        $datapoints = $datapoints | Select-Object -last 50\n        Clear-Host\n        Show-Graph -datapoints $datapoints -GraphTitle AudioLevels\n        Show-Graph -datapoints $datapoints -GraphTitle AudioLevels -Type Line\n        Show-Graph -datapoints $datapoints -GraphTitle AudioLevels -Type Scatter\n        Start-Sleep -Milliseconds 1000\n    } while ($true)\n    ```\n\n    \u003cimg src=\"https://github.com/PrateekKumarSingh/PSConsoleGraph/blob/master/img/AudioPeakLevels.gif\" width=\"850\" height=\"500\" /\u003e\n    \n  3. Visualizing Azure Monitor Metrics like CPU %age on a Virtual machine in #PowerShell\n\n\n    ```PowerShell\n    $ResourceID = '/subscriptions/\u003csubscription\u003e/resourceGroups/demo-resource-group/providers/Microsoft.Compute/virtualMachines/SimpleWinVM'\n    $Data = Get-AzMetric -ResourceId $ResourceID  -WarningAction SilentlyContinue | Select-Object unit, data\n    $Datpoints = $data.data.average.foreach({[int]$_})\n\n    Import-Module Graphical\n    Show-Graph -Datapoints $Datpoints -GraphTitle 'CPU (% age)'\n    \n    ```\n \n ![](https://github.com/PrateekKumarSingh/Graphical/blob/master/img/AzureMonitor.png)\n","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPrateekKumarSingh%2FGraphical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPrateekKumarSingh%2FGraphical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPrateekKumarSingh%2FGraphical/lists"}