ZedGraph 是一个非常优秀的开源的作图控件 1、在 vs 中使用 ZedGraph 2、 基本一些概念 几个注意点:
图片的保存路径设置:RenderedImagePath 属性中设置,程序对该文件夹应该是有写和修改权限的 图片的输出格式:OutputFormat 属性中设置,Png 的推荐,比较清晰。 Chart ChartBorder ChartFill Legend IsHStack Xaxis AxisColor Cross CrossAuto FontSpec Angle Fill
ColorOpacity IsScaled RangeMax RangeMin StringAlignment IsOmitMag
IsPreventLabelOverlap IsShowTitle
IsTicsBetweenLabels IsUseTenPower IsZeroLine IsVisible MajorGrid DashOff DashOn MajorTic IsInside IsOutSide
图表区域的边框设置 图表区域的背景填充
图表的注释标签显示设置项目,一组数据对应一种颜色的注释 当有多个显示项的时候设置 Y 轴数据是叠加的还是分开的 图表区域的 X 轴相关信息设置 坐标轴颜色
坐标的原点,可以设置坐标的偏移程度
原点自动设置:True 的话 Cross 的设置就无效了。 X 轴标题字体相关信息
X 轴标题字体显示时候的角度,0为水平 90为垂直 X 轴标题字体填充信息 透明度
设置 X 轴标题字体显示大小是否根据图的比例放大缩小 填充时候的最大倾斜度(有过渡色,没试过) 填充时候的最小倾斜度(有过渡色,没试过) X 轴标题字体排列(不清楚,没试过)
是否显示指数幂(10次方,没试过,似乎与 IsUseTenPower 有关系)
坐标值显示是否允许重叠,如果False的话,控件会根据坐标值长度自动消除部分坐标值的显示状态 X 轴标题是否显示
两个坐标值之间是否自动显示分隔标志 是否使用10次幂指数
当数据为0时候是否显示(在饼状图显示的时候有用) 是否显示 X 轴
大跨度的 X 轴表格虚线线显示信息 虚线中孔间距 虚线单位长度
大跨度的 X 轴刻度信息 在 Chart 内部是否显示 在 Chart 外部是否显示
IsOpposite MinorGrid MinorTic MinSpace Scale IsReverse MajorStep MajorStepAuto MajorUnit Max MaxAuto Min MinAuto MinGrace MinorStep MinorStepAuto MinorUnit Type Liner Date Log Ordinal Y2Axis Yaxis BarBase BarType IsFontsScaled IsIgnoreInitial IsIgnoreMissing IsPenWidthScaled IsShowTitle PaneFill BaseDimension IsImageMap AxisChaneged CacheDuration OutputFormat RenderedImagePath RenderMode
在对面的轴上是否显示
小跨度的 X 轴表格虚线显示信息 小跨度的 x 轴刻度信息 刻度和轴之间的距离(没试过) 刻度值的一些设定
X 轴的刻度值从高到低还是从低到高 大刻度步长
是否自动设置大刻度步长 大刻度步长单位 刻度最大值
根据输入数据自动设置刻度最大值 刻度最小值
根据输入数据自动设置刻度最小值 不清楚,没试过 小刻度步长
是否自动设置小刻度步长 小刻度单位 数据显示方式 直接现实(自动) 按日期方式显示 按指数幂方式显示 顺序显示
第二个 Y 轴坐标信息显示(具体设置看 X 轴) 第一个 Y 轴坐标信息显示(具体设置看 X 轴) 在生成柱状图的时候设置柱状是基于 X 轴还是其他轴 柱状的类型叠加或其他。
图比例变化时候图表上的文字是否跟着自动缩放 是否忽略初始值 是否忽略缺省值
图比例变化时候图表上的画笔的粗细是否跟着自动缩放 图表标题是否显示 Pane 的一些填充信息 缩放比例基数(可以试试效果) 不清楚干吗用的
是否允许自动绘图(没试过,一般都 true,动态绘图) Cache 保存时间0 输出格式 输出路径
输出模式,不太清楚一般都是 ImageTag,另一个输出的是乱码不是图片。对于图表而言,一般是三种表现形式:柱状图、饼状图和点线图。
Class Description A class to manage multiple GraphPane objects, derived from PaneBase. Use of the MasterPane class is optional, as the GraphPane class can be used directly for a single pane. MasterPane Also provides methods for layout, arrangement, and management of the individual GraphPane objects. The primary class for the graph, derived from PaneBase. GraphPane Includes all other classes as properties. Also controls the pane title, the pane frame and axis frame, backgrounds, etc. Children of the Axis class. These classes include many aspects of the axis display, including tics, grids, colors, pens, fonts, labels, and styles. A class instance maintained by the Axis class. Contains the scale range, step sizes, formats, and display options for the XAxis, Y2Axis YAxis, Scale scale. Comes in variants for Linear, Log, Text, Date, Ordinal, Exponent, DateAsOrdinal scales. Legend to draw the legend. LinearAsOrdinal, and The class that describes the location, font, colors, etc., used An abstract base class that contains data for a single CurveItem LineItem, BarItem, HiLowBarItem, ErrorBarItem, PieItem, StickItem, OHLCBarItem, and JapaneseCandleStickItem are all derived from this curve. class. A collection class to maintain a list of CurveItem objects. The order of the curves in the list controls the Z-Order for drawing. The last curve in the list will appear behind all other curves. An abstract base class that includes position information for a variety of supplemental graphic objects on a plot. CurveList GraphObj GraphObjList TextObj, ImageObj, LineObj, ArrowObj, EllipseObj, BoxObj, and PolyObj are derived from GraphObj. A collection class to maintain a list of GraphObj objects. The order of the objects in the list, plus a ZOrder property, control the Z-Order for drawing. The last item in the list will appear behind all other items with the same ZOrder value. A utility class that includes information about the font family, color, angle, size, style, frame, and background fill of the text FontSpec on the graph. Each class that includes text information will contain one or more FontSpec objects to specifically describe the associated fonts. A utility class that includes characteristics of background color fills. Each object that has color fill capability will contain one or more Fill objects to specifically describe the associated color fill. A utility class that includes characteristics of object borders. Fill Border Each object that has border capability will contain one or more Border objects to specifically describe the associated border color and line properties. Location A general class for handling the location of graphic objects on the plot. A data struct that encapsulates a single pair of double values representing an (X,Y) data point. This is the internal data storage format for the value arrays in each CurveItem. A collection class to maintain a list of PointPair objects. This class encapsulates a single date-time value (stored as a PointPair PointPairList System.Double), plus a wide array of methods to convert XDate between XL date, Astronomical Julian Day number, Gregorian Calendar date, fractional year, etc. See the discussion of Date-Time axes below, for details.
Member ->> Description
AxisChange()() ->> This performs an axis change command on the graphPane. BeenDisposed ->> This checks if the control has been disposed. This is synonymous with the graph pane having been nulled or disposed. Therefore this is the same as ZedGraphControl.GraphPane == null.
BorderStyle ->> Gets or sets the border style of the tree view control. (Inherited from UserControl.)
ContextMenuBuilder ->> Subscribe to this event to be able to modify the ZedGraph context menu.
Copy(Boolean) ->> 将图像复制到剪贴板。 DoPageSetup()() ->> 打开打印设置对话框。 DoPrint()() ->> 打印图表。
DoPrintPreview()() ->> 打印预览。
EditButtons ->> Gets or sets a value that determines which Mouse button will be used to edit point data values
EditModifierKeys ->> Gets or sets a value that determines which modifier keys will be used to edit point data values GetImage()() ->> 返回图表上的图像。
GraphPane ->> Gets or sets the GraphPane property for the control IsAntiAlias ->> Gets or sets a value that determines if all drawing operations for this control will be forced to operate in Anti-alias mode. Note that if this value is set to \sub-objects. Otherwise, the sub-object settings (such as IsAntiAlias) will be honored.
IsAutoScrollRange ->> Gets or sets a value that controls whether or not the axis value range for the scroll bars will be set automatically. IsEnableHEdit ->> Gets or sets a value that determines whether or not editing of point data is allowed in the horizontal direction.
IsEnableHPan ->> Gets or sets a value that determines whether or not panning is allowed for the control in the horizontal direction.
IsEnableHZoom ->> 是否允许横向缩放。
IsEnableSelection ->> Gets or sets a value that determines whether or not selection is allowed for the control.
IsEnableVEdit ->> Gets or sets a value that determines whether or not editing of point data is allowed in the vertical direction.
IsEnableVPan ->> Gets or sets a value that determines whether or not panning is allowed for the control in the vertical direction. IsEnableVZoom ->> 是否允许纵向缩放。 IsEnableZoom ->> 是否允许缩放。
IsPrintFillPage ->> Gets or sets a value that determines whether or not the MasterPaneRectdimensions will be expanded to fill the available space when printing this ZedGraphControl.
IsPrintKeepAspectRatio ->> Gets or sets a value that determines whether or not the visible aspect ratio of the MasterPaneRectwill be preserved when printing this ZedGraphControl.
IsPrintScaleAll ->> Gets or sets a value that determines whether the settings of IsFontsScaled and IsPenWidthScaled will be overridden to true during printing operations.
IsScrolling ->> Returns true if the user is currently scrolling via the scrollbar, or false if no scrolling is taking place. IsScrollY2 ->> Gets or sets a value that determines if the vertical scroll bar will affect the Y2 axis.
IsShowContextMenu ->> 是否显示右键菜单,如果指定了ContextMenuStrip会一直显示指定的ContextMenu。
IsShowCopyMessage ->> 复制图像时是否显示提示信息。
IsShowCursorValues ->> 鼠标在图表上移动时是否显示鼠标所在点对应的坐标值。默认为false
IsShowHScrollBar ->> 是否显示横向滚动条。
IsShowPointValues ->> 鼠标经过图表上的点时是否气泡显示该点所对应的值。默认为false
IsShowVScrollBar ->> 是否显示纵向滚动条。
IsSynchronizeXAxes ->> Gets or sets a value that determines if the XAxisScaleranges for all GraphPane objects in the MasterPane will be forced to match.
IsSynchronizeYAxes ->> Gets or sets a value that determines if the YAxisScaleranges for all GraphPane objects in the MasterPane will be forced to match.
IsZoomOnMouseCenter ->> 使用滚轮时以鼠标所在点进行缩放还是以图形中心进行缩放。
LinkButtons ->> Gets or sets a value that determines which Mouse button will be used to click on linkable objects LinkEvent ->> Subscribe to this event to be able to respond to mouse clicks within linked objects.
LinkModifierKeys ->> Gets or sets a value that determines which modifier
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库ZedGraph教程 - 图文在线全文阅读。
相关推荐: