c# - 使用 LiveCharts 在折线图中绘制垂直线
问题描述
我正在开发一个 winform 应用程序来使用 LiveCharts 显示折线图。如何在某个 x 坐标处绘制垂直线?提前致谢。
解决方案
我发现:
cartesianChart.AxisX.Add(new Axis
{
//IsMerged = true,
Sections = new SectionsCollection
{
new AxisSection
{
Value = x_best,
Stroke = System.Windows.Media.Brushes.Red,
StrokeThickness = 3,
StrokeDashArray = new System.Windows.Media.DoubleCollection(new [] {10d})
}
}
});
推荐阅读
- python - 从程序员的角度来看,我如何处理 Ramanujan 的嵌套根问题?
- gitlab - Gitlab CI/CD 缓存
- terraform - 如何在terraform中迭代资源?
- c# - 尽管提供了值,但实体框架仍插入 null
- python - 如何在 Win10 / powerhsell 上获得免费/开放的本地端口以进行 ssh 转发
- html - 在 WordPress 中允许在分类名称中使用 html
- python - 在新的(看不见的)文本上部署文本分类模型
- python - 从 df.to_markdown() 中删除空格
- python - 图顶点排序度问题:找到k-ordering
- android - Toast Android 11 自定义