The ActiveReports Chart control can draw a number of financial chart types:
See below for details on each of the financial chart types.
A candle chart displays stock information using High, Low, Open and Close values. The size of the wick line is determined by the High and Low values, while the size of the bar is determined by the Open and Close values. The bar is displayed using different colors, depending on whether the price of the stock has gone up or down.
Chart Information
| |
---|---|
Number of Y values per data point | 4 (The first value is the high figure, the second is the low figure, the third is the opening figure, and the fourth is the closing figure.) |
Number of Series | 1 or more |
Marker Support | Series or Data Point. Marker labels use the first Y value as the default value. |
Custom Properties | BodyDownswingBackdrop gets or sets the backdrop information used to fill the rectangle for data points in which the closing figure is lower than the opening figure. BodyUpswingBackdrop gets or sets the backdrop information used to fill the rectangle for data points in which the closing figure is higher than the opening figure. BodyWidth gets or sets the width of the rectangle used to show upswing or downswing. WickLine gets or sets the line information for the wick line. |
Below is an example of how to set the custom chart properties at run time for a candle chart as shown in the image above.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("BodyDownswingBackdrop") = New Chart.Graphics.Backdrop(Color.FromArgb(255, 192, 255)) .Properties("BodyUpswingBackdrop") = New Chart.Graphics.Backdrop(Color.FromArgb(192, 192, 255)) .Properties("WickLine") = New Chart.Graphics.Line(Color.Indigo) .Properties("BodyWidth") = 7.0F End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
Using DataDynamics.ActiveReports.Chart.Graphics |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["BodyDownswingBackdrop"]= new Chart.Graphics.Backdrop (Color.FromArgb(255, 192, 255)); this.chartControl1.Series[0].Properties["BodyUpswingBackdrop"] = new Chart.Graphics.Backdrop (Color.FromArgb(192, 192, 255)); this.chartControl1.Series(0).Properties("WickLine") = new Chart.Graphics.Line(Color.Indigo); this.chartControl1.Series[0].Properties["BodyWidth"] = 7f; |
A HiLo chart displays stock information using High and Low or Open and Close values. The length of the HiLo line is determined by the High and Low values or the Open and Close values.
Chart Information
| |
---|---|
Number of Y values per data point | 2 |
Number of Series | 1 or more |
Marker Support | Series or Data Point. Marker labels use the first Y value as the default value. |
Custom Properties | HiloLine gets or sets the line information for the HiLo line. |
Below is an example of how to set the custom chart properties at run time for a HiLo chart as shown in the image above.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
Me.ChartControl1.Series(0).Properties("HiloLine") = New DataDynamics.ActiveReports.Chart.Graphics.Line(Color.DeepSkyBlue, 4) |
To write the code in C#
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["HiloLine"] = new DataDynamics.ActiveReports.Chart.Graphics.Line(Color.DeepSkyBlue, 4); |
A HiLo OpenClose chart displays stock information using High, Low, Open and Close values. Opening values are displayed using lines to the left, while lines to the right indicate closing values.
Chart Information
| |
---|---|
Number of Y values per data point | 4 |
Number of Series | 1 or more |
Marker Support | Series or Data Point. Marker labels use the first Y value as the default value. |
Custom Properties | HiloLine gets or sets the line information for the HiLo line. CloseLine gets or sets the line information for the close line. OpenLine gets or sets the line information for the open line. TickLen gets or sets the length of the tick for the open and close lines. |
Below is an example of how to set the custom chart properties at run time for a HiLoOpenClose chart as shown in the image above.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("OpenLine") = New Chart.Graphics.Line(Color.Green) .Properties("CloseLine") = New Chart.Graphics.Line(Color.Red) .Properties("HiloLine") = New Chart.Graphics.Line(Color.Black, 2) .Properties("TickLen") = 10.0F End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
using DataDynamics.ActiveReports.Chart.Graphics; |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["OpenLine"] = new Chart.Graphics.Line(Color.Green); this.chartControl1.Series[0].Properties["CloseLine"] = new Chart.Graphics.Line(Color.Red); this.chartControl1.Series[0].Properties["HiloLine"] = new Chart.Graphics.Line(Color.Black, 2); this.chartControl1.Series[0].Properties["TickLen"] = 10f; |
A Kagi chart displays supply and demand trends using a sequence of linked vertical lines. The thickness and direction of the lines vary depending on the price movement. If closing prices go in the direction of the previous Kagi line, then that Kagi line is extended. However, if the closing price reverses by the preset reversal amount, a new Kagi line is charted in the next column in the opposite direction. Thin lines indicate that the price breaks the previous low (supply) while thick lines indicate that the price breaks the previous high (demand).
Chart Information
| |
---|---|
Number of Y values per data point | 1 |
Number of Series | 1 |
Marker Support | Series or Data Points |
Custom Properties | BodyDownswingBackdrop Gets or sets the style and color settings for the three-dimensional side view of downswing Kagi lines. This property is only available with the Kagi 3D chart type, and is only effective when the Width property is set to a value higher than 25. BodyUpswingBackdrop Gets or sets the style and color settings for the three-dimensional side view of upswing Kagi lines. This property is only available with the Kagi 3D chart type, and is only effective when the Width property is set to a value higher than 25. DownswingLine Gets or sets the style and color settings to use for a Kagi line which charts a price decrease. ReversalAmount Gets or sets the amount that a price must shift in order for the Kagi line to change direction. UpswingLine Gets or sets the style and color settings to use for a Kagi line which charts a price increase. Width Gets or sets the width of the three-dimensional side view of the Kagi lines.This property is only available with the Kagi 3D chart type, and must be set higher than its default value of 1 in order to display body downswing and upswing backdrops. |
Below is an example of how to set the custom chart properties at run time for a Kagi chart.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("BodyDownswingBackdrop") = New Backdrop(Color.Red) .Properties("BodyUpswingBackdrop") = New Backdrop(Color.Blue) .Properties("DownswingLine") = New Chart.Graphics.Line(Color.DarkRed) .Properties("ReversalAmount") = "25" .Properties("UpswingLine") = New Chart.Graphics.Line(Color.DarkBlue) .Properties("Width") = 50.0F End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
using DataDynamics.ActiveReports.Chart.Graphics; |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["BodyDownswingBackdrop"] = new Backdrop(Color.Red); this.chartControl1.Series[0].Properties["BodyUpswingBackdrop"] = new Backdrop(Color.Blue); this.chartControl1.Series[0].Properties["DownswingLine"] = new Chart.Graphics.Line(Color.DarkRed); this.chartControl1.Series[0].Properties["ReversalAmount"] = "25"; this.chartControl1.Series[0].Properties["UpswingLine"] = new Chart.Graphics.Line(Color.DarkBlue); this.chartControl1.Series[0].Properties["Width"] = 50f; |
The point and figure chart uses stacked columns of X's to indicate that demand exceeds supply and columns of O's to indicate that supply exceeds demand to define pricing trends. A new X or O is added to the chart if the price moves higher or lower than the BoxSize value. A new column is added when the price reverses to the level of the BoxSize value multiplied by the ReversalAmount. The use of these values in the point and figure chart to calculate pricing trends makes this chart best suited for long-term financial analysis.
Chart Information
| |
---|---|
Number of Y values per data point | 2 |
Number of Series | 1 |
Marker Support | Series or Data Points |
Custom Properties | BoxSize Gets or sets the amount a price must change in order to create another X or O. DownswingLine Gets or sets the style and color settings for the downswing O's. ReversalAmount Gets or sets the amount that a price must shift in order for a new column to be added. UpswingLine Gets or sets the style and color settings for the upswing X's. |
Below is an example of how to set the custom chart properties at run time for a Point and Figure chart.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("DownswingLine") = New Chart.Graphics.Line(Color.Red) .Properties("UpswingLine") = New Chart.Graphics.Line(Color.Blue) .Properties("BoxSize") = 3.0F End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
using DataDynamics.ActiveReports.Chart.Graphics; |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["DownswingLine"] = new Chart.Graphics.Line(Color.Red); this.chartControl1.Series[0].Properties["UpswingLine"] = new Chart.Graphics.Line(Color.Blue); this.chartControl1.Series[0].Properties["BoxSize"] = 3f; |
The Renko chart uses bricks of uniform size to chart price movement. When a price moves to a greater or lesser value than the preset BoxSize value required to draw a new brick, a new brick is drawn in the succeeding column. The change in box color and direction signifies a trend reversal.
Chart Information
| |
---|---|
Number of Y values per data point | 2 |
Number of Series | 1 |
Marker Support | Series or Data Points |
Custom Properties | BodyDownswingBackdrop Gets or sets the style and color settings for the downswing bricks. BodyUpswingBackdrop Gets or sets the style and color settings for the upswing bricks. BoxSize Gets or sets the amount a price must change in order to create another brick. |
Below is an example of how to set the custom chart properties at run time for a Renko chart.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("BodyDownswingBackdrop") = New Backdrop(Color.BlueViolet) .Properties("BodyUpswingBackdrop") = New Backdrop(Color.Navy) .Properties("BoxSize") = 3.0F End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
using DataDynamics.ActiveReports.Chart.Graphics; |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["BodyDownswingBackdrop"] = new Backdrop(Color.BlueViolet); this.chartControl1.Series[0].Properties["BodyUpswingBackdrop"] = new Backdrop(Color.Navy); this.chartControl1.Series[0].Properties["BoxSize"] = 3f; |
A Three Line Break chart uses vertical boxes or lines to illustrate price changes of an asset or market. Movements are depicted with box colors and styles; movements that continue the trend of the previous box paint similarly while movements that trend oppositely are indicated with a different color and/or style. The opposite trend is only drawn if its value exceeds the extreme value of the previous three boxes or lines. The below Three Line Break depicts upward pricing movement with black boxes and downward pricing movement with red boxes.
Chart Information
| |
---|---|
Number of Y values per data point | 1 |
Number of Series | 1 |
Marker Support | Series or Data Points |
Chart-Specific Properties | BodyDownswingBackdrop Gets or sets the style and color settings for the downswing boxes. BodyUpswingBackdrop Gets or sets the style and color settings for the upswing boxes. NewLineBreak Gets or sets the number of previous boxes/lines that must be compared before a new box/line is drawn. The default value is 3. |
Below is an example of how to set the custom chart properties at run time for a Three Line Break chart.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste ABOVE the report class. |
Copy Code |
---|---|
Imports DataDynamics.ActiveReports.Chart.Graphics |
Visual Basic.NET code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
With Me.ChartControl1.Series(0) .Properties("BodyDownswingBackdrop") = New Backdrop(Color.Red) .Properties("BodyUpswingBackdrop") = New Backdrop(Color.Black) .Properties("NewLineBreak") = 3 End With |
To write the code in C#
C# code. Paste ABOVE the report class. |
Copy Code |
---|---|
using DataDynamics.ActiveReports.Chart.Graphics; |
C# code. Paste INSIDE the section Format event. |
Copy Code |
---|---|
this.chartControl1.Series[0].Properties["BodyDownswingBackdrop"] = new Backdrop(Color.Red); this.chartControl1.Series[0].Properties["BodyUpswingBackdrop"] = new Backdrop(Color.Black); this.chartControl1.Series[0].Properties["NewLineBreak"] = 3; |