zoukankan      html  css  js  c++  java
  • 车辆信息统计报表管理系统ZedGraph控件属性例子

    myPane.IsFontsScaled = false;//图比例变化时候图表上的文字是否跟着自动缩放

                myPane.Margin.Right = 20; //挪动位置

                myPane.Title.Text = " ";//标题为空

                myPane.TitleGap = 0.8f;//标题高度

     

                //X轴设置

                myPane.XAxis.Title.IsVisible = false;

                myPane.XAxis.Scale.FontSpec.Size = MyCode.FondDefined.FondSize1;

                myPane.XAxis.MajorTic.IsBetweenLabels = true;

                myPane.XAxis.Type = AxisType.Linear;//指定轴类型

                myPane.XAxis.MajorGrid.IsVisible = true;

     

                myPane.XAxis.MajorTic.IsOpposite = false;//X轴对面的刻度线不显示

                myPane.XAxis.MajorTic.IsOutside = false;//XChart外侧刻度线不显示

                myPane.XAxis.MinorTic.IsOpposite = false;

                myPane.XAxis.MinorTic.IsInside = false;

                myPane.XAxis.MinorTic.IsOutside = false;

                //Y轴设置

                myPane.YAxis.Title.Text = "   ";// "Rpm";

                myPane.YAxis.Title.IsVisible = true;

                myPane.YAxis.Title.FontSpec.Size = MyCode.FondDefined.FondSize1;

                myPane.YAxis.Scale.FontSpec.Size = MyCode.FondDefined.FondSize1;

                //myPane.YAxis.MajorGrid.IsVisible = true;

     

                myPane.YAxis.MajorTic.IsOpposite = false;//Y轴对面的刻度线不显示

                myPane.YAxis.MajorTic.IsOutside = false;//YChart外侧刻度线不显示

                myPane.YAxis.MinorTic.IsInside = false;

                myPane.YAxis.MinorTic.IsOutside = false;

                myPane.YAxis.MinorTic.IsOpposite = false;

     

                //颜色设置

                myPane.Border.Color = MyCode.ColorDefine.Color15;//边框Color1

                myPane.Fill = new Fill(MyCode.ColorDefine.Color1, MyCode.ColorDefine.Color1, 45.0f);

    //边框背景颜色,第一个Color是起始颜色,第二个Color是终止颜色 颜色过渐变的

                myPane.Chart.Fill = new Fill(MyCode.ColorDefine.Color1, MyCode.ColorDefine.Color1, 45.0f);

    //图形里面颜色

             

                //副标题字体和位置设置

                myPane.Legend.IsVisible = false;

     

                //发动机转速分解图--标题

                TextObj textTital = new TextObj(tEngineRotateSpeed, 0.09F, 0.09F, CoordType.PaneFraction);

                textTital.Location.AlignH = AlignH.Center;

                textTital.Location.AlignV = AlignV.Bottom;

                textTital.FontSpec.Border.IsVisible = false;

                textTital.FontSpec.IsBold = true;

                myPane.IsFontsScaled = false;

                textTital.FontSpec.Size = MyCode.FondDefined.FondSizeTital;

                textTital.FontSpec.Fill = new Fill(MyCode.ColorDefine.Color1, MyCode.ColorDefine.Color1, 45F);

                textTital.FontSpec.StringAlignment = StringAlignment.Center;

                myPane.GraphObjList.Add(textTital);

     

                //Y轴单位--Rpm

                TextObj textYunit = new TextObj("Rpm", 0.04F, 0.155F, CoordType.PaneFraction);

                textYunit.Location.AlignH = AlignH.Left;

                textYunit.Location.AlignV = AlignV.Bottom;

                textYunit.FontSpec.Border.IsVisible = false;

                textYunit.FontSpec.Size = MyCode.FondDefined.FondSizeUnit;

                textYunit.FontSpec.Fill = new Fill(MyCode.ColorDefine.Color1, MyCode.ColorDefine.Color1, 45F);

                textYunit.FontSpec.StringAlignment = StringAlignment.Center;

     

               myPane.GraphObjList.Add(textYunit);

    myPane.XAxis.Scale.MinorStep = 1;

      myPane.XAxis.Scale.MajorStep = 1;

      myPane.YAxis.Scale.MinorStep = 0.5;

      myPane.XAxis.Scale.Min = 0;

               myPane.XAxis.Scale.Max = 23.99;

            

  • 相关阅读:
    WP2Sinablog使用后的后遗症
    .NET Framework 4 与 .NET Framework 4 Client Profile
    360浏览器也有了开发人员工具了
    让你的手机号“变”qq号
    首次体验 Live Writter
    判断素数
    SqlServer文件挂起
    vni—2015:验证错误
    成功者善于模仿(转)
    dbms_output缓冲区溢出
  • 原文地址:https://www.cnblogs.com/Gemgin/p/3136356.html
Copyright © 2011-2022 走看看