推荐一个简单、灵活、好看、强大的 .Net 图表库
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
项目简介项目结构使用指南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 } }; } } } 在项目启动入口配置主题,设置代码如下: 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 编辑过 |
关键字查询
相关文章
正在查询... |