zedGraph参数设置

来源:互联网 发布:sql导出数据库成excel 编辑:程序博客网 时间:2024/04/30 11:24

1、背景透明设置:
this.zedGraphControl1.GraphPane.Chart.Fill = newFill(Color.Transparent, Color.Transparent, 45.0f);
this.zedGraphControl1.MasterPane.Fill = newFill(Color.Transparent, Color.Transparent, 45.0f);
this.zedGraphControl1.GraphPane.Fill.Color = Color.Transparent;
三个背景填充属性都设置为透明时背景透明 或者:
this.zedGraphControl1.GraphPane.Fill.Color = Color.Transparent;
this.zedGraphControl1.MasterPane.Fill.IsVisible = false;
this.zedGraphControl1.GraphPane.Chart.Fill.IsVisible = false; 

2、坐标轴颜色:
this.zedGraphControl1.GraphPane.YAxis.Color = Color.Red;
this.zedGraphControl1.GraphPane.Y2Axis.Color = Color.Red;


3、文字及颜色 图表标题
this.zedGraphControl1.GraphPane.Title.Text = "GraphPane.Title.Text";
坐标轴标题 this.zedGraphControl1.GraphPane.XAxis.Title.Text = "GraphPane.XAxis.Title";
图表边框颜色:
内边框 this.zedGraphControl1.GraphPane.Chart.Border.Color = Color.Red;
外边框 this.zedGraphControl1.GraphPane.Border=newBorder(Color.Red,0);
隐藏外边框: this.zedGraphControl1.BorderStyle = BorderStyle.None;
this.zedGraphControl1.GraphPane.Border.IsVisible = false;
this.zedGraphControl1.MasterPane.Border.IsVisible = false;


4、坐标轴刻度及字体颜色: this.zedGraphControl1.GraphPane.XAxis.Scale.FontSpec.FontColor = Color.White;
this.zedGraphControl1.GraphPane.XAxis.MajorTic.Color = Color.Red; this.zedGraphControl1.GraphPane.XAxis.MinorTic.Color = Color.Red;


5、网格及颜色: this.zedGraphControl1.GraphPane.XAxis.MajorGrid.IsVisible = true;
this.zedGraphControl1.GraphPane.XAxis.MajorGrid.Color = Color.Gray;


6、曲线标签位置 this.zedGraphControl4.GraphPane.Legend.Position = LegendPos.Right;

0 0
原创粉丝点击