ZedGraph 自定义 X轴 Y轴 标注 画虚线

ZedGraph 版本 5.1.51.

注:低版本的不能进行这两个操作

1. 自定义x轴标注

 

 zedGraphControl1.GraphPane.XAxis.ScaleFormatEvent += new Axis.ScaleFormatHandler(XAxis_ScaleFormatEvent); 
string XAxis_ScaleFormatEvent(GraphPane pane, Axis axis, double val, int index)
 {
//根据 val值 返回你需要的 string
 return ((index).ToString());
 }

 

 

 

 

 

 

2 画虚线

 

 zedGraphControl1.GraphPane.AddCurve("fd", list, Color.Red, SymbolType.VDash);
 ((LineItem)(zedGraphControl1.GraphPane.CurveList[0])).Line.StepType = StepType.ForwardSegment; //更改Line.StepType

https://blog.csdn.net/hellboy419/article/details/24244841

posted on 2020-09-25 09:02  xihong  阅读(712)  评论(0编辑  收藏  举报

导航