【实验室笔记】zedgraph控件属性总结

时间:2024-10-08 17:07:20
             //图表的X轴刻度线是否显示
this.zedGraphControl1.GraphPane.XAxis.MajorGrid.IsVisible = true;
//图表的X轴刻度线的颜色
this.zedGraphControl1.GraphPane.XAxis.MajorGrid.Color = Color.Gray;
//图表的Y轴刻度线是否显示
this.zedGraphControl1.GraphPane.YAxis.MajorGrid.IsVisible = true;
//图表的Y轴刻度线的颜色
this.zedGraphControl1.GraphPane.YAxis.MajorGrid.Color = Color.Gray;
//图表的总标题
this.zedGraphControl1.GraphPane.Title.Text = "温度";
//图表总标题的颜色
this.zedGraphControl1.GraphPane.Title.FontSpec.FontColor = Color.Red;
//图表的Y轴标题
this.zedGraphControl1.GraphPane.YAxis.Title.Text = "数量";
//图标的Y轴颜色
this.zedGraphControl1.GraphPane.YAxis.Title.FontSpec.FontColor = Color.Red;
//图表的X轴标题
this.zedGraphControl1.GraphPane.XAxis.Title.Text = "时间";
//图标的X轴颜色
this.zedGraphControl1.GraphPane.XAxis.Title.FontSpec.FontColor = Color.Red;
//图表X的数据类型
this.zedGraphControl1.GraphPane.XAxis.Type = ZedGraph.AxisType.DateAsOrdinal;
//图表内边框的颜色
this.zedGraphControl1.GraphPane.Chart.Border.Color = Color.Blue;
//图表外边框的颜色
this.zedGraphControl1.GraphPane.Border = new Border(Color.Blue, );
//图表X轴刻度字体的颜色
this.zedGraphControl1.GraphPane.XAxis.Scale.FontSpec.FontColor = Color.Red;
//图表X轴刻度大刻度的颜色
this.zedGraphControl1.GraphPane.XAxis.MajorTic.Color = Color.Red;
//图表X轴刻度小刻度的颜色
this.zedGraphControl1.GraphPane.XAxis.MinorTic.Color = Color.Red;
//曲线标签的位置
this.zedGraphControl1.GraphPane.Legend.Position = LegendPos.Top;