Chart walls are among the most important chart components, contributing to the realistic 3D look of the image and improving the readability of the data presented. Each Chart object has a collection of ChartWall objects, which contains exactly five instances: left wall, back wall, right wall, front wall, and floor. The wall collection can be accessed with the help of the Walls read-only property of the Chart object. To access a particular wall, you can use the GetWall method of the ChartWallCollection . It takes a parameter of type ChartWallType, which indicates the desired wall.
VB.NET |
|
Dim backWall As ChartWall = chart.Walls.GetWall(ChartWallType.Back) |
C# |
|
ChartWall backWall = chart.Walls.GetWall(ChartWallType.Back); |
A shorter way to gain access to a wall is the Wall method of the Chart object:
VB.NET |
|
Dim backWall As ChartWall = chart.Wall(ChartWallType.Back) |
C# |
|
ChartWall backWall = chart.Wall(ChartWallType.Back); |
Using the ChartWall object, the user can control various aspects of chart walls, including their visibility, width, fill effect, border properties, and interactivity features. The following code changes some of the properties of the back chart wall.
VB.NET |
|
backWall.Visible = True ' show the wall backWall.Width = 4 ' make it thicker backWall.FillEffect.SetSolidColor(Color.Green) ' make it green
|
C# |
|
backWall.Visible = true; // show the wall backWall.Width = 4; // make it thicker backWall.FillEffect.SetSolidColor(Color.Green); // make it green |
Chart walls are not displayed when an exclusive charting type (for example Pie chart) is presented.
Related Examples
Windows Forms: Walls\General
See Also
ChartWall | ChartWallCollection | Chart | ChartWallType