Table of Context
2D Graph
Control 1
Overview.. 2
Object
Model 3
2D
Graph Control COM Interface. 3
Methods
and Properties. 3
interface
IComPlot : IDispatch. 3
interface
IComPlots : IDispatch. 7
interface
IComAxis : IDispatch. 7
interface
IComMarker : IDispatch. 10
interface
IComMarkers : IDispatch. 10
interface
IComCursor : IDispatch. 11
interface
IComGraph : IDispatch. 11
interface
ITwoDeeCtrl : IDispatch. 12
Events. 13
dispinterface
_ITwoDeeCtrlEvents. 13
Other
Information. 13
Drag
and Drop. 13
Licensing
(license file) 14
Publishing
control on a web page. 14
License
pack file reference. 14
Using
JaveScript to access the properties. 14

2D Graph Control is a real-time and historical data visualisation COM component. Multiple sequences (plots) of
x and y pairs can be plotted in real time. The graph also allows display of
multiple time series of values. Comprehensive, object-oriented COM interface
allows easy integration with third party applications, data servers and OEM
equipment. Interactive features are second to none. Sophisticated data cursors,
axes and range markers allow the user to perform extensive data analysis easily
and intuitively.
2D Graph
Control is an ATL 3.0 component and is self contained in a single file
(2D.DLL). By default the file is located in C:\Program
Files\3D Software Development\2D Graph Control\ .
Features:
- Unicode Support
- Apartment Threading Model
- Rendering Engine: Win32 API
- Built with Microsoft Visual C++
6.0 Service Pack 5
- Year 2000 compliant (also year
3000, 4000, even 100,000 compliant; BC dates are also handled correctly)
·
Supports
IObjectSafety (interface allows a client to
retrieve and set an object's safety levels. For example, a web browser can make
a control safe for initialization or safe for scripting).
·
Built
using ATL 3.0 without MFC or any other 3rd party libraries.

The diagram shows UML object model representing the
COM Interface of 2D Graph Control.
interface IComPlot : IDispatch
- Name([out, retval] BSTR *pVal) – Returns Name Property. The name does not need to be
unique.
- Name([in] BSTR newVal) – Sets Name Property.
- LineColor([out, retval]
OLE_COLOR *pVal) – Returns current Line Color.
- LineColor([in] OLE_COLOR newVal) – Sets Line Color. This
property does not affect the existing data. Only new data will be rendered
using LineColor. See also LineColorEx
property.
- LineWidth([out, retval]
short *pVal) – Returns Line Width property.
- LineWidth([in] short newVal) – Sets Line Width. This
property does not affect the existing data. New data will be rendered
using LineWidth.
- LineStyle([out, retval]
LineStyleType *pVal) – Returns Line Style.
- LineStyle([in] LineStyleType
newVal) – Sets Line Style. This property does not
affect the existing data. New data will be rendered using LineStyle. See also LineStyleEx.
Possible values are:
LINE_STYLE_SOLID - same as PS_SOLID
LINE_STYLE_DASH - same as PS_DASH
LINE_STYLE_DOT - same as PS_DOT
LINE_STYLE_DASHDOT - same as PS_DASHDOT
LINE_STYLE_DASHDOTDOT - same as PS_DASHDOTDOT
LINE_STYLE_NULL - same as PS_NULL
LINE_STYLE_INSIDEFRAME - same as PS_INSIDEFRAME
Please refer to Microsoft Win32 API
documentation for detailed explanation of line styles.
- Clear() - Clears all Data Points.
- AppendPoint([in] double x, [in] double y) - Appends Data Point. Sequence
of data points is important as they are rendered from the first to the
last. If one
of the axis is scaled in as date/time, the coordinates indicate the number
of seconds since Julian year zero. For this purpose AppendPointDate
and AppendPointDateEx functions were provided.
- AppendPointDate([in] DATE systemtime,
[in] double y) - Appends Data Point, horizontal coordinate is given as systemtime.
- AppendPointDateEx([in] short year, [in] short
month, [in] short day, [in] short hour, [in] short minute, [in] double
seconds, [in] double y) - Appends Data Point, horizontal coordinate is given as
date and time.
- StdDev([in] DirectionType
dir, [out, retval] double *pVal) – Returns calculated Standard
Deviation within the range (selected markers). OR logical combination is
used for multiply selected regions in the same direction (e.g. horizontal)
and AND logical combination is used for selected
regions in opposite direction (e.g. vertical). For example, if two
horizontal markers are simultaneously selected (by holding Ctrl key), the
selected region will contain sum of the selected areas (logical OR). If a
horizontal and vertical marker are selected simultaneously, the resulting
region is a common part of the selected areas (logical AND). The calculated
Standard Deviation is for the resulting combination of regions.
Hint: Use MarkerSelectionChanged([in] IComGraph* pIComGraph) to interactively calculate this property in
real time upon user interaction.
- Average([in] DirectionType dir, [out,
retval] double *pVal) – Returns calculated average
within the range (selected markers). OR logical combination is used for
multiply selected regions in the same direction (e.g. horizontal) and AND logical combination is used for selected regions
in opposite direction (e.g. vertical). For example, if two horizontal
markers are simultaneously selected (by holding Ctrl key), the selected
region will contain sum of the selected areas (logical OR). If a
horizontal and vertical marker are selected simultaneously, the resulting
region is a common part of the selected areas (logical AND). The
calculated Average is for the resulting combination of regions.
Hint: Use MarkerSelectionChanged([in] IComGraph* pIComGraph) to interactively calculate this property in
real time upon user interaction.
- Min([in] DirectionType dir, [out,
retval] double *pVal) – Returns calculated Mininimum within the
range (selected markers). OR logical combination is used for multiply
selected regions in the same direction (e.g. horizontal) and AND logical combination is used for selected regions
in opposite direction (e.g. vertical). For example, if two horizontal
markers are simultaneously selected (by holding Ctrl key), the selected
region will contain sum of the selected areas (logical OR). If a
horizontal and vertical marker are selected simultaneously, the resulting
region is a common part of the selected areas (logical AND). The
calculated Minimum is for the resulting combination of regions.
Hint: Use MarkerSelectionChanged([in] IComGraph* pIComGraph) to interactively calculate this property in
real time upon user interaction.
- Max([in] DirectionType dir, [out,
retval] double *pVal) – Returns calculated Maximum
within the range (selected markers). OR logical combination is used for
multiply selected regions in the same direction (e.g. horizontal) and AND logical combination is used for selected regions
in opposite direction (e.g. vertical). For example, if two horizontal
markers are simultaneously selected (by holding Ctrl key), the selected
region will contain sum of the selected areas (logical OR). If a
horizontal and vertical marker are selected simultaneously, the resulting
region is a common part of the selected areas (logical AND). The
calculated Maximum is for the resulting combination of regions.
Hint: Use MarkerSelectionChanged([in] IComGraph* pIComGraph) to interactively calculate this property in
real time upon user interaction.
- LineColorEx([in] OLE_COLOR newVal) - Changes Line Color of the Existing data (but not the
subsequent samples). See also LineColor
property.
- LineWidthEx([in] short newVal) - Changes Line Width of the Existing data (but not the subsequent
samples)
- LineStyleEx([in] LineStyleType
newVal) - Changes Line Style of the Existing data (but
not the subsequent samples). See also LineStyle
property.
Possible values are:
LINE_STYLE_SOLID - same as PS_SOLID
LINE_STYLE_DASH - same as PS_DASH
LINE_STYLE_DOT - same as PS_DOT
LINE_STYLE_DASHDOT - same as PS_DASHDOT
LINE_STYLE_DASHDOTDOT - same as PS_DASHDOTDOT
LINE_STYLE_NULL - same as PS_NULL
LINE_STYLE_INSIDEFRAME - same as PS_INSIDEFRAME
Please refer to Microsoft Win32 API
documentation for detailed explanation of line styles.
- ShowLines([out, retval] VARIANT_BOOL *pVal) – Returns Show Lines property indicating whether lines
connecting individual data points are visible. This setting is applied to
both existing and subsequent samples.
- ShowLines([in] VARIANT_BOOL newVal) – Sets Show Lines property
indicating whether lines connecting individual data points are visible.
This setting is applied to both existing and subsequent samples.
- ShowPoints([out, retval]
VARIANT_BOOL *pVal) – Returns Show Points
property.
- ShowPoints([in] VARIANT_BOOL newVal) – Sets Show Points property. If set to VARIANT_TRUE,
the data points are rendered with the current PointStyle.
This setting is applied to both existing and subsequent samples.
See also PointStyle
property.
- SteppedLine([out, retval]
VARIANT_BOOL *pVal) – Returns Stepped Line property.
- SteppedLine([in] VARIANT_BOOL newVal) – Sets Stepped or Straight line style connecting data
points. If set to VARIANT_TRUE, the data points are connected with
horizontal and vertical lines only. This setting is applied to both existing
and subsequent samples. See also ShowLines
property.
- PointStyle([out, retval]
PointStyleType *pVal) - Returns Point Style applied
to subsequent samples.
- PointStyle([in] PointStyleType
newVal) - Sets Point Style property. This property does
not affect the existing data. New data will be rendered using PointStyle.
See also ShowPoints property.
- MaxNumberOfPoints([out, retval]
long *pVal) - Gets the maximum number of data points
(default 1000).
- MaxNumberOfPoints([in] long newVal) - Sets the maximum number of
data points (default 1000). If points are added and the total number of
points exceeds the specified, points will be automatically deleted from
the other end. This way only the most recent number of the specified
maximum will be displayed.
- PointLineColor([out, retval]
OLE_COLOR *pVal) - Gets outline color of Points
applied to subsequent samples only.
- PointLineColor([in] OLE_COLOR newVal) - Sets outline color of Points applied to subsequent
samples only.
- PointLineColorEx([in] OLE_COLOR newVal) - Sets outline color of Points applied to existing
samples only.
- PointFillColor([out, retval]
OLE_COLOR *pVal) - Gets fill color of Points
applied to subsequent samples only.
- PointFillColor([in] OLE_COLOR newVal) - Sets fill color of Points applied to subsequent
samples only.
- PointFillColorEx([in] OLE_COLOR newVal) - Sets fill color of Points applied to existing
samples only.
interface IComPlots : IDispatch
- Create([in] BSTR name, [out, retval]
IComPlot** pVal) - Creates new Plot with a
given name. The name does not need to be unique and is fused for
information purposes only. However, ItemByName
method will only operate properly if all the names are unique.
- RemoveAll() - Removes all Plots from the
collection.
- Item([in] long index, [out, retval]
IComPlot* *pVal) – Returns Plot Item. The index
is 1-based.
- ItemByName([in] BSTR name, [out, retval] IComPlot* *pVal) - Returns Plot Item By Name.
- _NewEnum([out, retval] LPUNKNOWN *pVal) - _NewEnum
- Count([out, retval] long *pVal) - Returns number of plots in the collection.
- Delete([in] IComPlot* pIComPlot) - Deletes plot item.
interface IComAxis : IDispatch