zedgraph控制項的一些比較有用的屬性 轉

來源:互聯網
上載者:User

(1)zedgraph控制項屬性具體解釋:

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 "true", it overrides the setting
for 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 keys will be used to click on linkable objects
MasterPane ->> Gets or sets the MasterPane property for the control
MouseDownEvent ->> 代替MouseDown事件,有一個bool類型的傳回值,代表是否響應該事件。
MouseUpEvent ->> 代替MouseUp事件,有一個bool類型的傳回值,代表是否響應該事件。
PanButtons
->> Gets or sets a value that determines which mouse button will
be used as a primary option to trigger a pan event.
PanButtons2
->> Gets or sets a value that determines which mouse button will
be used as the secondary option to trigger a pan event.
PanModifierKeys
->> Gets or sets a value that determines which modifier keys will
be used as a primary option to trigger a pan event.
PanModifierKeys2
->> Gets or sets a value that determines which modifier keys will
be used as a secondary option to trigger a pan event.
PointDateFormat ->> Gets or sets the format for displaying tooltip values. This format is passed to ToString(String).
PointEditEvent
->> Subscribe to this event to receive notifcation and/or respond
after a data point has been edited via IsEnableHEdit and IsEnableVEdit.
PointValueEvent ->> Subscribe to this event to provide custom formatting for the tooltips
PointValueFormat ->> Gets or sets the format for displaying tooltip values. This format is passed to ToString(String).
PrintDocument ->> Gets or sets the PrintDocumentinstance that is used for all of the context menu printing functions.
RestoreScale(GraphPane)
->> Handler for the "Set Scale to Default" context menu item.
Sets the scale ranging to full auto mode for all axes.
SaveAs()() ->> 顯示另存新檔對話方塊。
SaveAsBitmap()() ->> 顯示另存新檔對話方塊,將映像另存新檔BMP檔案。
SaveAsEmf()() ->> 顯示另存新檔對話方塊,將映像另存新檔EMF檔案。
SaveFileDialog ->> Gets or sets the SaveFileDialog instance that will be used by the "Save As..." context menu item.
ScrollDoneEvent
->> Subscribe to this event to be notified when the GraphPane is
scrolled by the user using the scrollbars.
ScrollEvent ->> Subscribe to this event to be notified when the GraphPane is scrolled by the user using the scrollbars.
ScrollGrace ->> Set a "grace" value that leaves a buffer area around the data when IsAutoScrollRange is true.
ScrollMaxX ->> The maximum value for the X axis scroll range.
ScrollMaxY ->> The maximum value for the Y axis scroll range.
ScrollMaxY2 ->> The maximum value for the Y2 axis scroll range.
ScrollMinX ->> The minimum value for the X axis scroll range.
ScrollMinY ->> The minimum value for the Y axis scroll range.
ScrollMinY2 ->> The minimum value for the Y2 axis scroll range.
ScrollProgressEvent
->> Subscribe to this event to be notified when the GraphPane is
scrolled by the user using the scrollbars.
SelectAppendModifierKeys ->> Gets or sets a value that determines which Modifier keys will be used to append a CurveItem to the selection list.
SelectButtons ->> Gets or sets a value that determines which Mouse button will be used to select CurveItem's.
Selection ->> Readonly property that gets the list of selected CurveItems
SelectModifierKeys ->> Gets or sets a value that determines which Modifier keys will be used to select CurveItem's.
SetScrollRangeFromData()()
->> Sets the value of the scroll range properties (see
ScrollMinX, ScrollMaxX, YScrollRangeList, and Y2ScrollRangeList based on
the actual range of the data for each corresponding Axis.
Y2ScrollRangeList ->> Access the ScrollRangeList for the Y2 axes.
YScrollRangeList ->> Access the ScrollRangeList for the Y axes.
ZoomButtons
->> Gets or sets a value that determines which mouse button will
be used as a primary option to trigger a zoom event.
ZoomButtons2
->> Gets or sets a value that determines which mouse button will
be used as the secondary option to trigger a zoom event.
ZoomEvent
->> Subscribe to this event to be notified when the GraphPane is
zoomed or panned by the user, either via a mouse drag operation or by
the context menu commands.
ZoomModifierKeys ->> Gets or sets a
value that determines which modifier keys will be used as a primary
option to trigger a zoom event.
ZoomModifierKeys2 ->> Gets or
sets a value that determines which modifier keys will be used as a
secondary option to trigger a zoom event.
ZoomOut(GraphPane)
->> Handler for the "UnZoom/UnPan" context menu item. Restores the
scale ranges to the values before the last zoom, pan, or scroll
operation.
ZoomOutAll(GraphPane) ->> Handler for the "Undo All
Zoom/Pan" context menu item. Restores the scale ranges to the values
before all zoom and pan operations
ZoomPane(GraphPane, Double, PointF, Boolean) ->> Zoom a specified pane in or out according to the specified zoom fraction.
ZoomStepFraction
->> Gets or sets the step size fraction for zooming with the
mouse wheel. A value of 0.1 will result in a 10% zoom step for each
mouse wheel movement.
Axis Class 座標軸資訊
Member ->> Description
AxisGap ->> The size of the gap between multiple axes (see YAxisList and Y2AxisList).
CalcSpace(Graphics, GraphPane, Single, Single%) ->> Calculate the space required (pixels) for this Axis object.
Color ->> The color to use for drawing this Axis.
Cross ->> Gets or sets the scale value at which this axis should cross the "other" axis.
CrossAuto ->> Gets or sets a value that determines whether or not the Cross value is set automatically.
Draw(Graphics, GraphPane, Single, Single) ->> Do all rendering associated with this Axis to the specified Graphics device.
DrawMinorTics(Graphics, GraphPane, Double, Single, Single, Single) ->> Draw the minor tic marks as required for this Axis.
DrawTitle(Graphics, GraphPane, Single, Single) ->> Draw the title for this Axis.
GetCrossAxis(GraphPane) ->> Gets the "Cross" axis that corresponds to this axis.
GetObjectData(SerializationInfo, StreamingContext) ->> Populates a SerializationInfoinstance with the data needed to serialize the target object
IsAxisSegmentVisible
->> Gets or sets a property that determines whether or not the
axis segment (the line that represents the axis itself) is drawn.
IsVisible ->> 是否可見。
MajorGrid ->> 見下面相關內容。
MajorTic ->> 見下面相關內容。
MinorGrid ->> 見下面相關內容。
MinorTic ->> 見下面相關內容。
MinSpace ->> Gets or sets the minimum axis space allocation.
ResetAutoScale(GraphPane, Graphics) ->> Restore the scale ranging to automatic mode, and recalculate the Axis scale ranges
Scale ->> Gets the Scale instance associated with this Axis.
ScaleFormatEvent ->> Subscribe to this event to handle custom formatting of the scale labels.
ScaleTitleEvent
->> Allow customization of the title when the scale is very large
Subscribe to this event to handle custom formatting of the scale axis
label.
SetMinSpaceBuffer(Graphics, GraphPane, Single, Boolean)
->> This method will set the MinSpace property for this Axis using
the currently required space multiplied by a fraction ().
SetTransformMatrix(Graphics, GraphPane, Single) ->> Setup the Transform Matrix to handle drawing of this Axis
ICloneable..::Clone()()
Implement the ICloneableinterface in a typesafe manner by just calling the typed version of Clone.
Tag
A
tag object for use by the user. This can be used to store additional
information associated with the Axis. ZedGraph does not use this value
for any purpose.
Title
Gets or sets the Label class that contains the title of this Axis.
Type
Gets or sets the AxisType for this Axis.
MinorGrid\MajorGrid 小刻度和大刻度的虛線的,顯示在圖表中用來分割圖表的。預設IsVisible是False,看不到效果。
Member ->> Description
Color ->> 線的顏色。
DashOff ->> 點線中點與點之間的間隔。
DashOn ->> 點線中點的長度。
IsVisible ->> 是否可見。
PenWidth ->> 畫筆寬度。
MinorTic\MajorTic 座標軸上小刻度和大刻度的線的設定。
Member ->> Description
Color ->> 刻度標記的顏色。
IsAllTics
->> This is convenience property sets the status of all the
different tic properties in this instance to the same value. true to
activate all tics, false to clear all tics.
IsCrossInside ->> Gets or sets the display mode for the Axis major inside "cross" tic marks.
IsCrossOutside ->> Gets or sets the display mode for the Axis major outside "cross" tic marks.
IsInside ->> 刻度條是否要顯示到座標軸的裡邊。
IsOpposite ->> 對面的座標軸是否顯示該刻度。
IsOutside ->> 刻度條是否要顯示到座標軸的外邊。
PenWidth ->> 畫筆寬度。
ScaledTic(Single) ->> Calculate the scaled tic size for this Axis
Size ->> 刻度標記的長度。
Scale 刻度值相關
Member ->> Description
Align ->> Controls the alignment of the Axis tic labels.
AlignH ->> Controls the alignment of the Axis tic labels.
BaseTic ->> 第一個刻度從哪個值開始。
CalcMaxLabels(Graphics, GraphPane, Single) ->> Calculate the maximum number of labels that will fit on this axis.
DeLinearize(Double) ->> Convert a value from its linear equivalent to its actual scale value for this type of scale.
Exponent ->> Gets or sets the scale exponent value. This only applies to Exponent.
FontSpec ->> 刻度值的字型屬性。
Format ->> 刻度值的格式化,string類型。
FormatAuto ->> 為true時自動化佈建Format屬性,注意設定Format屬性時該屬性自動變為False
GetClusterWidth(GraphPane)
->> Determine the width, in pixel units, of each bar cluster
including the cluster gaps and bar gaps.
GetClusterWidth(Double) ->> Calculates the cluster width, in pixels, by transforming the specified clusterScaleWidth.
IsAnyOrdinal ->> Gets a value that indicates if this Scale is of any of the ordinal types in the AxisType enumeration.
IsDate ->> 是否為日期。
IsExponent ->> True if this scale is Exponent, false otherwise.
IsLabelsInside ->> 座標標籤是不是在座標軸的內部顯示。
IsLog ->> True if this scale is Log, false otherwise.
IsOrdinal ->> True if this scale is Ordinal, false otherwise.
IsPreventLabelOverlap
->> Gets or sets a Boolean value that determines if ZedGraph will
check to see if the Axis scale labels are close enough to overlap. If
so, ZedGraph will adjust the step size to prevent overlap.
IsReverse ->> 刻度以0為中心翻轉,圖形也會隨著翻轉。
IsSkipCrossLabel ->> 不顯示交叉點的標籤。
IsSkipFirstLabel ->> 不顯示第一個刻度標籤。
IsSkipLastLabel ->> 不顯示最後一個標籤。
IsText ->> 返回刻度值是否是文本類型(唯讀)
IsUseTenPower
->> 是否為10次冪表示,scale為LogScale時有效。 The powers-of-ten notation is
just the text "10" followed by a superscripted value indicating the
magnitude. This mode is only valid for log scales. boolean value; true
to show the title as a power of ten, false to show a regular numeric
value (e.g., "0.01", "10", "1000")
IsVisible ->> 是否可見。
LabelGap ->> The gap between the scale labels and the tics.
Linearize(Double) ->> Convert a value to its linear equivalent for this type of scale.
LocalTransform(Double)
->> Transform the coordinate value from user coordinates (scale
value) to graphics device coordinates (pixels).
Mag ->> 如果座標軸的值要用10次冪顯示,此值設定冪數。為0則不用10次冪
MagAuto ->> 是否自動套用10次冪方式顯示
MajorStep ->> 大刻度步長值。
MajorStepAuto ->> 自動化佈建大刻度的步長值。
MajorUnit ->> Gets or sets the type of units used for the major step size (MajorStep).
MakeNewScale(Scale,
AxisType) ->> A construction method that creates a new Scale
object using the properties of an existing Scale object, but specifying a
new AxisType.
Max ->> 預設顯示的最大刻度值(縮放時會顯示比它大的值)
MaxAuto ->> 自動化佈建最大刻度值。
MaxGrace ->> Gets or sets the "grace" value applied to the maximum data range.
Min ->> 預設顯示的最小刻度值(縮放時會顯示比它小的值)
MinAuto ->> 自動化佈建最小刻度值
MinGrace ->> Gets or sets the "grace" value applied to the minimum data range.
MinorStep ->> 小刻度的步長值。
MinorStepAuto ->> 是否自動設定小刻度的步長值。
MinorUnit ->> Gets or sets the type of units used for the minor step size (MinorStep).
PickScale(GraphPane, Graphics, Single) ->> Select a reasonable scale given a range of data values.
ReverseTransform(Single)
->> Reverse transform the user coordinates (scale value) given a
graphics device coordinate (pixels).
SetupScaleData(GraphPane, Axis) ->> Setup some temporary transform values in preparation for rendering the Axis.
TextLabels ->> The text labels for this Axis.
Transform(Double)
->> Transform the coordinate value from user coordinates (scale
value) to graphics device coordinates (pixels).
Transform(Boolean,
Int32, Double) ->> Transform the coordinate value from user
coordinates (scale value) to graphics device coordinates (pixels).
Type ->> 擷取刻度類型(唯讀)。

(2)屬性的調用方法

列舉幾個例子:

例一:調用複製映像的功能:zedGraphControl1.Copy(false);//false不顯示複製完成的提示資訊

例二:調用列印和預覽映像功能:zedGraphControl1.DoPrint();//會彈出列印的對話方塊

                                                      zedGraphControl1.DoPrintPreview();//會彈出預覽列印對話方塊

例三:調用禁止滑鼠操作的功能: zedGraphControl1.ZoomButtons = MouseButtons.None;
                                                      zedGraphControl1.ZoomButtons2 = MouseButtons.None;

           這兩個鍵一起設定禁用全部,一個只能禁用部分功能,這個你可以試一下。

通過這幾個例子相信你知道了調用一些方法的過程,希望對你有協助。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.