ActiveReports 6 Online Help
Financial Chart

Financial charts are useful for displaying stock information using High, Low, Open and Close values. This walkthrough illustrates how to create a Candle chart.

The walkthrough is split up into the following activities:

Tip: For basic steps like adding a report to a Visual Studio project and viewing a report, please see the Basic Data Bound Reports walkthrough.

When you have finished this walkthrough, you will have a chart that looks similar to the following.

To add a chart control to the report

  1. Resize the section in which you want to place the chart.
  2. Click the ChartControl in the ActiveReports toolbox and draw it onto the report.

To add a series and data points to the chart

  1. With the chart control highlighted, click the Series (Collection) property in the Properties Window, then click the ellipsis button that appears.
  2. In the Series Collection Editor window that appears, Series1 is selected by default.
  3. Under Series1 Properties, change the Type property to Candle.
  4. Expand the Properties node and set the BodyDownswingBackdrop property to (Default) so that you can expand the node and change the Color property to Fuchsia.
  5. Set the BodyUpswingBackdrop property to (Default) so that you can expand the node and change the Color property to DarkViolet.
  6. Set the BodyWidth property to 5 to make the opening to closing figure bar, the candle, wider than the wick.
  7. Set the WickLine property to (Default) for a black wick.
  8. Click the Points (Collection) property, then click the ellipsis button that appears. 
  9. In the DataPoint Collection window that appears, click Add to add a data point
    • Set its YValues property to 99; 37; 53; 88.
      Note: The first Y value is the high figure or top of the wick; the second is the low figure, or bottom of the wick; the third is the opening figure; the fourth is the closing figure.  If the fourth figure is higher than the third, the candle is DarkViolet, the BodyUpswingBackdrop.
    • Add another data point, and set its YValues property to 115; 22; 101; 35.
    • Add another data point, and set its YValues property to 87; 1; 7; 80.
    • Add another data point, and set its YValues property to 63; 14; 57; 25.
    • Add another data point, and set its YValues property to 130; 25; 25; 120.
  10. Click OK to save the data points and close the window.
  11. Back on the Series Collection Editor window, set the Legend property to (none).
  12. Remove Series2 and Series3.
  13. Click OK to return to the report design surface.

To set the chart's properties

Axes

  1. With the chart control highlighted, click the ChartAreas (Collection) property in the Properties Window, then click the ellipsis button that appears.
  2. In the ChartArea Collection Editor window that appears, under defaultArea properties, click the Axes (Collection) property, then click the ellipsis button that appears.
  3. In the AxisBase Collection Editor window that appears, the AxisX member is selected by default. Under AxisX properties, delete the text from the Title property.
  4. Click the Labels (Collection) property, then click the ellipsis button that appears. This is where you add the labels that appear along the X axis, the line across the bottom of the chart.
  5. In the Array Data Editor window that appears, enter the following into the editor, each item on a separate line:
    • Monday
    • Tuesday
    • Wednesday
    • Thursday
    • Friday
  6. Click the OK button to return to the AxisBase Collection Editor.
  7. Select the AxisY member, and under AxisY properties, expand the MajorTick property node and set the Step property to 10. This controls the numeric labels along the Y axis, the line along the left side of the chart.
  8. Set the LabelsVisible property to True.
  9. Set the Min property to 0.
  10. Set the AxisY member's Title property to $,000 and click OK to return to the ChartArea Collection Editor.
  11. Click OK to return to the report design surface and see the changes reflected in the chart.

Title and Legend

  1. With the chart control highlighted, click the Titles (Collection) property in the Properties Window, then click the ellipsis button that appears.
  2. In the Title Collection Editor that appears, under header properties, change the Text property to Candle Chart.
  3. Expand the Font property and set the Size to 14.
  4. Remove the footer title, and click OK to return to the report design surface.
  5. With the Chart control highlighted, click the Legends (Collection) property in the Properties Window, then click the ellipsis button that appears.
  6. In the Legend Collection Editor window that appears, set the Visible property to False, and click OK to return to the report design surface and see the completed chart.