OxyPlot 导出图片

在 OxyPlot 官方文档 https://oxyplot.readthedocs.io/en/latest/export/index.html  中查看

a4fe21e470519e6efda73abf49c59b7d.png

这里用到的是导出到 PNG 文件的方法,不过用的 NuGet 包最新版(2.1.0)中,PngExporter 中并没有 Background 属性:

2adc4ef95cfaa43feda23e0e6b0765ae.png

所以如果图表没有设置背景色的话,导出背景为透明的,可以设置上:

PlotModel.Background = OxyColor.Parse("#FFFFFF");

总的来说,这个方法简单快捷,而且对 MVVM 友好。

相关推荐

  1. phpspreadsheet导出数据和图片到excel

    2024-03-19 21:02:02       52 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-19 21:02:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-19 21:02:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-03-19 21:02:02       87 阅读
  4. Python语言-面向对象

    2024-03-19 21:02:02       96 阅读

热门阅读

  1. XR虚拟拍摄助力短剧制作:探索未来影视新纪元

    2024-03-19 21:02:02       50 阅读
  2. Linux Shell中的echo命令详解

    2024-03-19 21:02:02       44 阅读
  3. 在Swift中集成Socket.IO进行实时通信

    2024-03-19 21:02:02       44 阅读
  4. 【NLP11-迁移学习】

    2024-03-19 21:02:02       39 阅读
  5. Jenkins: 搭建Jenkins服务,调通Webhook链路

    2024-03-19 21:02:02       43 阅读
  6. LlamaParse: 高效的PDF文件RAG解析工具

    2024-03-19 21:02:02       43 阅读