C# cross-platform library for data visualization.
Перейти к файлу
firedef f4f9cc6150 Merge remote-tracking branch 'origin/master' 2022-08-09 17:21:04 +03:00
.idea/.idea.SomeChartsUi/.idea added controllers and avalonia integration. Already can render elements 2022-01-31 17:30:39 +03:00
SomeChartsAvaloniaExamples Add line constructor, refactor Mesh 2022-08-09 17:20:22 +03:00
SomeChartsTests Add line constructor, refactor Mesh 2022-08-09 17:20:22 +03:00
SomeChartsUi Add graph chart 2022-08-09 17:20:53 +03:00
SomeChartsUiAvalonia Add line constructor, refactor Mesh 2022-08-09 17:20:22 +03:00
.gitignore added .idea and dotsettings to gitignore 2022-02-10 12:21:33 +03:00
LICENSE Create LICENSE 2022-07-24 23:54:57 +03:00
README.md Update README.md 2022-03-15 22:07:10 +03:00
SomeChartsUi.sln cleanup, added examples project 2022-02-10 12:59:07 +03:00
SomeChartsUi.sln.DotSettings.user cleanup, added examples project 2022-02-10 12:59:07 +03:00

README.md

SomeCharts

SomeCharts is a C# cross-platform library for data visualization.

Features

  • early version by now
  • support only Avalonia by now. Only immediate renderer supported
  • cross-platform (tested only on Linux, but should works on win, mac and (maybe) on mobile devices)
  • OpenGl backend, planned to add Skia
  • glsl shaders, materials, post-processing, 3D mesh with normals and uvs
  • fast custom (WIP) text rendering (millions sumbols at 60 fps)
  • dynamic data update (customizable)
  • levels of detail, occlusion culling
  • physical and rendering layers
  • very fast (MUCH faster then analogs)
  • (0,0) is bottom-left corner. No inverted Y-axis!
  • flexible data. Support arrays, collections, functions and constants as data source
  • very fast OpenGl textures (much faster then in Skia)
  • mesh updates only when necessary
  • debug functions by pressing keys
  • customizable bloom and fxaa
  • themes

Charts that already implemented

  • ruler (grid with customizable size, bounds and labels)
  • line (any length)
  • pie (donut-shape with labels)
  • scatter (points with various positions, sizes, colors and shapes)

Custom text rendering

  • based on FreeType
  • full unicode
  • fallback fonts
  • custom SDF shader with subpixel antialiasing. Good quality at large scale and ok at small scale
  • very fast. Can rebuild mesh of 2.7mb text file in ~5 sec and render at 60 fps

Shortcuts

  • [T] - switch teme (light/dark)
  • [Y] - switch polygon mode (render as wireframe or points)
  • [U] - toggle materials
  • [L] - change text quality
  • [K] - toggle post processing
  • [O], [shift]+[O] - change text thickness
  • [W], [A], [S], [D] - movement
  • [Alt] - faster mouse scroll and pan

Charts that need to port (written in old version)

  • heatmap
  • shapefile map
  • candlesticks
  • bar

Code

full examples can be found there

🔻 deffered renderer (avalonia) is broken! use immediate renderer

// get canvas
AvaloniaGlChartsCanvas canvas = this.FindControl<AvaloniaGlChartsCanvas>("ControlName");

// add grid
canvas.AddRuler(Orientation.horizontal, 1_000_000);
canvas.AddRuler(Orientation.vertical, 1_000_000);

// add line chart
IChartData<float> data = new FuncChartData<float>(j => j * 5, lineLength);
IChartData<indexedColor> colors = new ConstChartData<indexedColor>(theme.accent0_ind);
canvas.AddLineChart(data, colors);