可以在Rendering事件中绘制,参考
- private void Chart_Rendering(object sender, C1.WPF.Chart.RenderEventArgs e)
- {
- e.Engine.SetStrokeThickness(5);
- e.Engine.SetStroke(new SolidColorBrush(Colors.Red));
- e.Engine.DrawLine(chart.PlotRect.Left + 100, chart.PlotRect.Top, chart.PlotRect.Left + 100, chart.PlotRect.Bottom);
- e.Engine.DrawLine(chart.PlotRect.Right - 100, chart.PlotRect.Top, chart.PlotRect.Right - 100, chart.PlotRect.Bottom);
-
- e.Engine.DrawString("0.4",new C1.Chart._Point(chart.PlotRect.Left + 90, chart.PlotRect.Bottom+10));
- }
复制代码 |