Ccharts 3.0.0

dotnet add package Ccharts --version 3.0.0
                    
NuGet\Install-Package Ccharts -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ccharts" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ccharts" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Ccharts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ccharts --version 3.0.0
                    
#r "nuget: Ccharts, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ccharts@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ccharts&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Ccharts&version=3.0.0
                    
Install as a Cake Tool

Ccharts

Turns financial OHLC data into a string — line and candlestick charts drawn with Unicode block characters. Nothing is printed for you, so the chart goes wherever text goes: a terminal, a log line, a chat message, an HTML <pre>, a file.

.NET bindings for the C library ccharts, using source-generated P/Invoke ([LibraryImport]) over its flat C ABI.

dotnet add package Ccharts
using Ccharts;

using var chart = Chart.FromArrays(open, high, low, close, epochSeconds);

Console.Write(chart.Line(new ChartOptions
{
    Width = 60,
    Height = 8,
    RiseColor = Color.Blue,
    ShowPrices = true,
    ShowTimes = true,
}));
Console.Write(chart.Candle(new ChartOptions { Width = 60, Height = 8 }));
  • Data can also come from Chart.FromJson (fixed-schema JSON) or Chart.FromCsv.
  • Color exposes the sixteen ANSI colors; any escape string works, so 256-color and truecolor do too.
  • new ChartOptions { Plain = true } renders with no ANSI escapes at all, for output that is not going to a console.
  • A Chart is immutable once built and safe to render from several threads.
  • Dispose releases the native memory; a finalizer covers a forgotten call.

Errors are CchartsException with a Status (InvalidArgument, Parse, OutOfMemory, NonFinite, Dimensions).

The native library

The published package carries runtimes/{rid}/native/, so nothing has to be installed. When working inside the repository the library comes from the CMake build instead:

cmake -S . -B build && cmake --build build
dotnet test bindings/dotnet/tests/Ccharts.Tests

NativeLibraryResolver probes, in order: the default runtime resolution (the NuGet layout), CCHARTS_NATIVE_DIR, and then build/ directories above the assembly.

License

MIT — see the repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 94 8/25/2026
0.2.2 98 8/25/2026
0.2.1 90 8/24/2026
0.2.0 94 8/24/2026