This interface provides access to the plot axes properties.
You may change axis coordinate range by using Min and Max
properties, or set AutoScale=true to calculate coordinate
range automatically so that all points will be visible.
Use other properties to show or hide appropriate axis
elements or to change their visual attributes.
| Kind | Name | ID | Description |
| Min | 1 | Change TAxis.Min | |
| Max | 2 | Change TAxis.Max | |
| Margins | 3 | Change TAxis.Margins | |
| AutoScale | 4 | Change TAxis.AutoScale | |
| Title | 5 | Change TAxis.Title | |
| Expression | 6 | Change TAxis.Expression | |
| IsVisible | 101 | Control axis visibility | |
| GridVisible | 102 | Change grid lines visibility | |
| LabelVisible | 103 | Change ticks and labels visibility | |
| MajorTicks | 104 | Change TAxis.MajorTicks | |
| MinorTicks | 105 | Change TAxis.MinorTicks | |
| TickStyle | 106 | Change ticks layout | |
| Color | -501 | Change axis color | |
| Font | -512 | Change axis labels font | |
| Format | 107 | Change labels format | |
| Document | 108 | Returns owner document object | |
| LineWidth | 201 | Changes axis line width | |
| TitleMargin | 202 | Changes distance in pixels between axis line and title | |
| LabelMargin | 203 | Changes distance in pixels between axis line and labels | |
| TickLength | 204 | Relative tick length (1-font height) | |
| TicksVisible | 205 | Controls axis ticks visibility | |
| InnerTicks | 206 | If true, ticks painted inside axis frame | |
| IsLinked | 207 | If true, axis labels depend on parallel axis scale | |
| ExpressionVisible | 208 | If true, expression painted in axis title (if title is not empty) | |
| FontColor | 209 | Changes axis font color | |
| GridColor | 210 | Changes grid lines color | |
| GridLineWidth | 211 | Changes grid line width | |
| GridLineType | 212 | Changes grid line type | |
| AssignObject | 213 | Copies all attributes from the given axis |
| property Min: Double |
For DMAxis, Min define minimal value of the axis range. Note: if you want to fix axis range you have to clear AutoScale flag. Also keep in mind that in DM2003 Min may be greater than Max.
For DMSerie, this property allows you to change minimal limit of the parameter ("cx") for parameterized (or functional) series.
For DMSpinEdit and DMFloatEdit ActiveX controls, it defines minimal possible value of the Value property.
| property Max: Double |
For DMAxis, Max defines maximal value of the axis range. Note: if you want to fix axis range you have to clear AutoScale flag. Also keep in mind that in DM2003 Min may be greater than Max.
For DMSerie, this property allows you to change maximal limit of the parameter ("cx") for parameterized (or functional) series.
For DMSpinEdit and DMFloatEdit ActiveX controls, it defines maximal possible value of the Value property.
| property Margins: Double |
Margins defines the distance between axis ranges given by Min, Max values and calculated by series data. Value of 0.1 corresponds to approximately 10% blank space. This property should be used in conjunction with AutoScale.
| property AutoScale: Boolean |
If this flag set to true, every time when plot will be repainted new axis range will be automatically calculated. All nonempty series take part in autoscaling.
| property Title: BSTR |
Axis may have a title. If this property is not empty, axis title will be visible. Note that not all fonts are displayed properly in the vertical direction!
| property Expression: BSTR |
For DM2003 plot axis, you may transform all series simultaneously
if you assign valid expression to this property.
See details about expression
syntax and allowed arguments and function names.
For DMFitter ActiveX control, Expression property should be defined before you
start fitting. There are several possible situations:
Server.CreateDocument Server.InstallPath & "samples\data_1.dat" Server.ExecuteCommand "ShowWorksheetAction" Server.ActiveDocument.Worksheet.Expression(3)="a+b"
| property IsVisible: Boolean |
IsVisible property determines whether appropriate object is visible on the screen. Note that for ActiveX controls embedded in the HTML page, you can also change Object.style.visibility property. Some controls like DMClientSocket, DMIEEE488Port and DMComPort are invisible by design and don't implement this property.
| property TickStyle: User_Defined |
TickStyle property determines axis major ticks positions. Possible values of this property listed in the AxisTicksType enumeration.
| property Color: User_Defined |
This property should be used to change color of the selected object.
| property Font: PTR |
This property should be used to change font of the selected object. It returns reference to the special IFontDisp interface pointer. See Microsoft OLE documentation for more details.
Server.ActiveDocument.Worksheet.Font.Name Server.ActiveDocument.Worksheet.Font.Size Server.ActiveDocument.Worksheet.Font.Bold Server.ActiveDocument.Worksheet.Font.Italic Server.ActiveDocument.Worksheet.Font.Underline Server.ActiveDocument.Worksheet.Font.Strikethrough Server.ActiveDocument.Worksheet.Font.Weight Server.ActiveDocument.Worksheet.Font.Charset Server.ActiveDocument.Worksheet.Font.Color 'absent!
| property Format: BSTR |
This property allows you to change numeric format. Possible values are: XX.Yt, where XX - total number of digits, Y - number of digits after decimal point, t - one of the following characters:
| r/o property Document: IDispatch |
Document property returns DMDocument object which is an owner of the given object. So that, you don't need to cycle through the object collections to determine the object's owner. Keep in mind that in DM, VCL objects may be destroyed while appropriate COM objects still alive since their lifecycle is governed by reference counting mechanism. Such COM objects with killed VCL owner become a "zombie" - they have no actual data, their methods do nothing and properties return empty data.
sub TestSerie
dim Serie
if Server.ActiveDocument is Nothing then
MsgBox "NULL document"
else
set Serie=Server.ActiveDocument.Plot.CurrentSerie
MsgBox Serie.Document.WindowCaption
end if
end sub
sub TestAxis
dim Axis
set Axis=Server.ActiveDocument.Plot.XAxis2
MsgBox Axis.Document.WindowCaption
end sub
sub TestContainer
dim Container
set Container=Server.ActiveDocument.Container
MsgBox Container.Document.WindowCaption
end sub
sub TestPlot
dim Plot
set Plot=Server.ActiveDocument.Plot
MsgBox Plot.Document.WindowCaption
end sub
sub TestWorksheet
dim Worksheet
set Worksheet=Server.ActiveDocument.Worksheet
MsgBox Worksheet.Document.WindowCaption
end sub
dim Worksheet1
set Worksheet1=Server.ActiveDocument.Worksheet
sub TestWorksheet1
MsgBox Worksheet1.Document.WindowCaption
end sub
dim Serie1
set Serie1=Server.ActiveDocument.Plot.CurrentSerie
sub TestSerie1
if Serie1.Document is Nothing then
MsgBox "NULL document"
else
MsgBox Serie1.Document.WindowCaption
end if
end sub
| property LineWidth: Long |
LineWidth property determines the width of object's line or contour.
| property TitleMargin: Long |
TitleMargin property determines the distance between plot axis and Title text, in pixels. It is used only if IDMPlot3.AutoSizeMargins property is set to True.
| property LabelMargin: Long |
LabelMargin property determines the distance between plot axis and tick labels, in pixels. It is used only if IDMPlot3.AutoSizeMargins property is set to True.
| property TickLength: Double |
TickLength determines major (and minor) ticks length relative to the size of tick labels font.
| property IsLinked: Boolean |
If this flag is set, axis scale is linked to another axis of the same direction (X or Y). In this mode, axis serves as an additional visual marker, and its labels calculated by the values of labels in paired axis and by its Expression. Typical use of this mode includes scaling factors (inches and centimeters), or reverse scale (1/T - T, Hz - 1/cm).
| property FontColor: User_Defined |
Use FontColor property to change font color for worksheets, plot axes and labels. Unlike VCL objects, IFont interface has no Color property so it has to be implemented separately.
| property GridLineType: User_Defined |
This property determines grid line type. Possible values listed in the PlotLineType enumeration.
| function AssignObject(Value): VOID |
AssignObject method allows to quickly copy all properties of axis, series, label or worksheet. In the first 3 cases it is just a wrapper for appropriate VCL method; worksheet copies only those properties that affect visual appearance and may be changed (by user interface or programmatically). It is especially useful when you need to clone separate objects in the data window.
Notice that DMLabel object also can assign DMPlot objects, in this case rectangular label will display plot as a metafile.
sub worksheet_assign_test
dim sw, dw
if Server.DocumentCount=0 then exit sub
set sw=Server.ActiveDocument
set dw=Server.CreateDocument("")
call dw.Worksheet.AssignObject(sw.Worksheet)
dw.WindowState=0
end sub
sub axis_ser_lbl_assign_test
' note: source window must have series and labels!
dim sw, dw
if Server.DocumentCount=0 then exit sub
set sw=Server.ActiveDocument
set dw=Server.CreateDocument("")
call dw.Plot.XAxis.AssignObject(sw.Plot.XAxis)
call dw.Plot.YAxis.AssignObject(sw.Plot.YAxis)
dw.Plot.Series(0).AssignObject sw.Plot.Series(2)
dw.Plot.Labels.AddItem.AssignObject sw.Plot.Labels(0)
dw.WindowState=1
end sub
sub lbl_assign_plot_self
dim doc, lbl
set doc= server.CreateDocument("")
doc.WindowState=1
set lbl=doc.Plot.Labels.AddItem
lbl.LabelKind=pltRectangle
lbl.XMin=doc.Plot.XAxis.Min
lbl.YMin=doc.Plot.YAxis.Min
lbl.XMax=doc.Plot.XAxis.Max/2
lbl.YMax=doc.Plot.YAxis.Max/2
lbl.AssignObject doc.Plot
end sub