I ported Zach Holman’s command line charting script, spark, to C#. You can grab the source code from GitHub and the binary package from NuGet. Here’s simply how it works.
::csharp
using SparkNet;
...
string chart = Spark.Render(0, 30, 55, 80, 33, 150); // "▁▂▃▄▂█"
Well, it does not work properly on good-old command line of Windows,
cmd.exe
. Default font of cmd.exe
is bitmap (raster) fonts which has a very limited
support for fancy chars and Windows console host has no support for Unicode.
Meanwhile, it works on Visual Studio and windowed programs. If you manage to show these chars properly in Windows console subsystem, let me know! If you need inspiration on how you make something cool out of this, check this page out.
Leave your thoughts