ComponentOne Chart 8.0 for ActiveX
Setting an Object Property

 

Setting an Object Property

The following statement sets the background color of the chart area. The variable m_chart contains an instance of a Chart2D object (the main 2D Chart object).

m_chart.GetChartArea().GetInterior().SetBackgroundColor(

       RGB(247,206,151));

This statement navigates the 2D Chart object hierarchy by retrieving the values of successive properties. First, the value of the ChartArea property is retrieved, which is a ChartArea object. Then, this ChartArea object's Interior property is retrieved, which is an Interior object. Finally, the Interior object's BackgroundColor property is set.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback