推薦一個(gè)簡(jiǎn)單、靈活、好看、強(qiáng)大的 .Net 圖表庫(kù)
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
項(xiàng)目簡(jiǎn)介項(xiàng)目結(jié)構(gòu)使用指南Install-Package LiveChartsCore.SkiaSharpView.WinForms using LiveChartsCore; using LiveChartsCore.SkiaSharpView; namespace WinFormsSample { public partial class Form1 : Form { public Form1() { InitializeComponent();
{ new LineSeries<double> { Values = new double[] { 2, 1, 3, 5, 3, 4, 6 }, Fill = null } }; } } } 在項(xiàng)目啟動(dòng)入口配置主題,設(shè)置代碼如下: using System; using System.Windows.Forms; using LiveChartsCore; using LiveChartsCore.SkiaSharpView;
{ static class Program { [STAThread] static void Main() { _ = Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); LiveCharts.Configure(config => config // registers SkiaSharp as the library backend // REQUIRED unless you build your own .AddSkiaSharp() // adds the default supported types // OPTIONAL but highly recommend .AddDefaultMappers() // select a theme, default is Light // OPTIONAL //.AddDarkTheme() .AddLightTheme() // finally register your own mappers // you can learn more about mappers at: // ToDo add website link... .HasMap<City>((city, point) => { point.PrimaryValue = city.Population; point.SecondaryValue = point.Context.Index; }) // .HasMap<Foo>( .... ) // .HasMap<Bar>( .... ) ); } } } 圖表樣式該文章在 2023/12/13 18:43:41 編輯過(guò) |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |