HorzLineAnnotationType
Scope
|
Pego, Pesgo, Pe3do, Pepso
|
Type
|
Property Array of type Int32
|
Default
|
empty
|
.NET
|
PeAnnotation.Line.YAxisType
|
Ocx|Vcl
|
HorzLineAnnotationType
|
DLL
|
PEP_naHORZLINEANNOTATIONTYPE
|
Purpose
This property array is used to define horizontal line annotation types. Type 16 and over only work if RenderEngine is Hybrid or GdiPlus.
Note that horizontal line annotations will not be seen unless ShowAnnotations or ShowHorzLineAnnotations is set to TRUE.
The types of line annotations available are defined by the following constants:
.NET Gigasoft.Enums.
|
ActiveX and
|
|
LineAnnotationType.
|
DLL Constants
|
Description
|
ThinSolid
|
PELT_THINSOLID(0)
|
Thin Solid Line
|
Dash
|
PELT_DASH(1)
|
Dashed Line
|
Dot
|
PELT_DOT(2)
|
Dot Line
|
DashDot
|
PELT_DASHDOT(3)
|
Dash Dot Line
|
DashDotDot
|
PELT_DASHDOTDOT(4)
|
Dash Dot Dot
|
MediumSolid
|
PELT_MEDIUMSOLID(5)
|
Medium Solid Line
|
ThickSolid
|
PELT_THICKSOLID(6)
|
Thick Solid Line
|
GridTick
|
PELAT_GRIDTICK(7)
|
Grid Tick Mark
|
GridLine
|
PELAT_GRIDLINE(8)
|
Grid Line
|
MediumThinSolid
|
PELT_MEDIUMTHINSOLID(9)
|
Medium Thin Solid Line
|
MediumThickSolid
|
PELT_MEDIUMTHICKSOLID(10)
|
Medium Thick Solid Line
|
ExtraThickSolid
|
PELT_EXTRATHICKSOLID(11)
|
Extra Thick Solid Line
|
ExtraThinSolid
|
PELT_EXTRATHINSOLID(12)
|
Extra Thin Solid Line
|
ExtraExtraThinSolid
|
PELT_EXTRAEXTRATHINSOLID(13)
|
Extra Extra Thin Solid Line
|
GridTickColoredText
|
PELAT_GRIDTICKII(14)
|
Grid Tick Mark, colors text
|
GridLineColoredText
|
PELAT_GRIDLINEII(15)
|
Grid Line, colors text
|
MediumThinDash
|
PELT_MEDIUMTHINDASH (16)
|
Medium Thin Dash Line
|
MediumThinDot
|
PELT_MEDIUMTHINDOT (17)
|
Medium Thin Dot Line
|
MediumThinDashDot
|
PELT_MEDIUMTHINDASHDOT (18)
|
Medium Thin Dash Dot Line
|
MediumThinDashDotDot
|
PELT_MEDIUMTHINDASHDOTDOT (19)
|
Medium Thin Dash Dot Dot Line
|
MediumDash
|
PELT_MEDIUMDASH (20)
|
Medium Dash Line
|
MediumDot
|
PELT_MEDIUMDOT (21)
|
Medium Dot Line
|
MediumDashDot
|
PELT_MEDIUMDASHDOT (22)
|
Medium Dash Dot Line
|
MediumDashDotDot
|
PELT_MEDIUMDASHDOTDOT (23)
|
Medium Dash Dot Dot Line
|
MediumThickDash
|
PELT_MEDIUMTHICKDASH (24)
|
Medium Thick Dash Line
|
MediumThickDot
|
PELT_MEDIUMTHICKDOT (25)
|
Medium Thick Dot Line
|
MediumThickDashDot
|
PELT_MEDIUMTHICKDASHDOT (26)
|
Medium Thick Dash Dot Line
|
MediumThickDashDotDot
|
PELT_MEDIUMTHICKDASHDOTDOT (27)
|
Medium Thick Dash Dot Dot Line
|
ThickDash
|
PELT_THICKDASH (24)
|
Thick Dash Line
|
ThickDot
|
PELT_THICKDOT (25)
|
Thick Dot Line
|
ThickDashDot
|
PELT_THICKDASHDOT (26)
|
Thick Dash Dot Line
|
ThickDashDotDot
|
PELT_THICKDASHDOTDOT (27)
|
Extra Thick Dash Dot Dot Line
|
ExtraThickDash
|
PELT_EXTRATHICKDASH (24)
|
Extra Thick Dash Line
|
ExtraThickDot
|
PELT_EXTRATHICKDOT (25)
|
Extra Thick Dot Line
|
ExtraThickDashDot
|
PELT_EXTRATHICKDASHDOT (26)
|
Extra Thick Dash Dot Line
|
ExtraThickDashDotDot
|
PELT_EXTRATHICKDASHDOTDOT (27)
|
Extra Thick Dash Dot Dot Line
|
Comments
PeAnnotation.Line.YAxisType members of Pego.PeAnnotation.Line, Pesgo.PeAnnotation.Line, Pe3do.PeAnnotation.Line, Pepso.PeAnnotation.Line
See Also: HorzLineAnnotation, HorzLineAnnotationText, and HorzLineAnnotationColor. If you want to legend an annotation, see LegendAnnotationType. If you are implementing multiple axes, see HorzLineAnnotationAxis.
Use PELAT_GRIDTICK and PELAT_GRIDLINE to construct your own custom scale. When PELAT_GRIDTICK and PELAT_GRIDLINE are used, HorzLineAnnotationText controls the location of the annotation text via a text justification code. Also, if you assign a color of (1) to these annotations, the current GraphForeColor will be used to color the annotation. This allows these annotations to function identically to normal grid lines and GridLineControl also controls the look of these annotations. You may also need to disable the default grid with ShowYAxis and generally set LineAnnotationTextSize = 100
You can define horizontal line annotations with respect to the right Y axis by adding 1000 to the above constants.
See Also: VertLineAnnotationType, GraphAnnotationType
Refer to Chapter 7, Question 10 for more information on annotations.
Within the demo, see example 101.
WinForm VB.NET Example
The following example shows how to add two horizontal line annotations, a thin line at 10, and a dashed line at 20.
Pesgo1.PeAnnotation.Line.YAxisType(0) = LineAnnotationType.ThinSolid
Pesgo1.PeAnnotation.Line.YAxis(0) = 10
Pesgo1.PeAnnotation.Line.YAxisText(0) = "Line1"
Pesgol.PeAnnotation.Line.YAxisType(1) = LineAnnotationType.Dash
Pesgo1.PeAnnotation.Line.YAxis(1) = 20
Pesgo1.PeAnnotation.Line.YAxisText(1) = "Line2"
|
OCX Example
The following example shows how to add two horizontal line annotations, a thin line at 10, and a dashed line at 20.
Pesgo1.HorzLineAnnotationType(0) = PELT_THINSOLID
Pesgo1.HorzLineAnnotation(0) = 10
Pesgo1.HorzLineAnnotationText(0) = "Line1"
Pesgo1.HorzLineAnnotationType(1) = PELT_DASH
Pesgo1.HorzLineAnnotation(1) = 20
Pesgo1.HorzLineAnnotationText(1) = "Line2"
|
C / C++ Example
The following example shows how to add two horizontal line annotations, a thin line at 10, and a dashed line at 20.
int nTypes[2];
double fYLoc[2];
char szText[] = "Line1\tLine2\t"; /* Code to define text */
/* Code to define line styles */
nTypes[0] = PELT_THINSOLID;
fYLoc[0] = 10.0F;
nTypes[1] = PELT_DASH;
fYLoc[1] = 20.0F;
PEvset (hWndPE, PEP_naHORZLINEANNOTATIONTYPE, nTypes, 2);
PEvset (hWndPE, PEP_faHORZLINEANNOTATION, fYLoc, 2);
PEvset (hWndPE, PEP_szaHORZLINEANNOTATIONTEXT, szText, 2);
|
|