Dundas Chart for ASP.NET
Add(FinancialMarkerType,Int32,Int32) Method
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > FinancialMarkersCollection Class > Add Method : Add(FinancialMarkerType,Int32,Int32) Method


markerName
The type of financial marker to be displayed.

The type of financial marker to be displayed.


Name of the Financial marker
firstPointIndex

The index (zero-based) of the data point that represents the first price used for the financial marker. The first Y-value of the data point is used.


The index (zero-based) of the first data point to be used for a financial marker.
secondPointIndex

The index (zero-based) of the data point that represents the second price used for the financial marker. The first Y-value of the data point is used.


The index (zero-based) of the second data point to be used for a financial marker.
Enterprise Edition Only Feature. Call this method to display a financial marker for a series. Line properties, text properties and Y-values are not specified using this definition.
Adds a Financial Marker item to the collection

Syntax

Visual Basic (Declaration)  
Public Overloads Function Add( _
   ByVal markerName As FinancialMarkerType, _
   ByVal firstPointIndex As Integer, _
   ByVal secondPointIndex As Integer _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As FinancialMarkersCollection
Dim markerName As FinancialMarkerType
Dim firstPointIndex As Integer
Dim secondPointIndex As Integer
Dim value As Integer
 
value = instance.Add(markerName, firstPointIndex, secondPointIndex)
C#  
public int Add( 
   FinancialMarkerType markerName,
   int firstPointIndex,
   int secondPointIndex
)

Parameters

markerName
The type of financial marker to be displayed.

The type of financial marker to be displayed.


Name of the Financial marker
firstPointIndex

The index (zero-based) of the data point that represents the first price used for the financial marker. The first Y-value of the data point is used.


The index (zero-based) of the first data point to be used for a financial marker.
secondPointIndex

The index (zero-based) of the data point that represents the second price used for the financial marker. The first Y-value of the data point is used.


The index (zero-based) of the second data point to be used for a financial marker.

Return Value

Position in the collection.

Example

Visual Basic Copy Code
Imports Dundas.Charting.WebControl<CRLF>...<CRLF><CRLF> ' the 15th point for P1<CRLF> Dim firstPointIndex As Integer = 15<CRLF><CRLF> ' the 140th point for P2<CRLF> Dim secondPointIndex As Integer = 140<CRLF><CRLF> ' Add the financial marker to the collection<CRLF> chart1.Series("Input").FinancialMarkers.Add(FinancialMarkerType.FibonacciArcs, firstPointIndex, secondPointIndex)<CRLF><CRLF>...
C# Copy Code
using Dundas.Charting.WebControl <CRLF>... <CRLF>     <CRLF>    ' the 15th point for P1 <CRLF>    Dim firstPointIndex As Integer = 15 <CRLF>  <CRLF>    ' the 140th point for P2 <CRLF>    Dim secondPointIndex As Integer = 140 <CRLF>  <CRLF>    ' Add the financial marker to the collection <CRLF>    chart1.Series("Input").FinancialMarkers.Add(FinancialMarkerType.FibonacciArcs, firstPointIndex, secondPointIndex) <CRLF>     <CRLF>...

Remarks

Call this method to display a financial marker (a FinancialMarker object is appended at the end of the financial markers collection). Note that the Insert method can also be used (the order in which these objects are stored only determines the order in which they are drawn).

A financial marker graphically compares two prices, which are represented by two data points in a series.

The marker that is displayed is determined by the markerType parameter.

To set the text font, text color, line color or line width of the financial marker use a definition that takes textColor, textFont, lineColor and lineWidth parameters, respectively.

To use Y-values other than the first Y-value of the data points use a definition that takes firstYIndex and secondYIndex parameters.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.