Defining the ChartGroup Object

Data in a chart is organized into ChartGroups. Each chart contains two ChartGroups (although most charts will only use the first ChartGroup), each of which is treated as a separate entity. ChartGroups allow more than one chart to be displayed in the ChartArea and provide access to many of the chart-specific properties.

In C1Chart, a chart group is represented by a ChartGroup object. The ChartGroup objects are organized into the ChartGroupsCollection, which is accessed through the ChartGroups object. This collection provides access to the ChartGroups through two methods.

First the individual chart groups can be accessed through the collection. For example, the following code shows how to access individual chart groups through the ChartGroupsCollection object:

      Visual Basic

      C#

Secondly, the Group0 and Group1 properties of the ChartGroup's object return the associated ChartGroup and allow circumvention of the long collection name by using the following code:

      Visual Basic

      C#

The ChartGroupsCollection accepts usual iteration methods as illustrated below:

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.