Leo Posted May 24, 2007 Report Share Posted May 24, 2007 I have a Gannt chart with 3 panes. I would like to have a title for each pane to display above the chart but it always goes below the chart. chart.Panes[1].AxisY.Title.Text = "Test title";Is there any setting that would move the title on top ? Link to comment Share on other sites More sharing options...
Frank Posted May 24, 2007 Report Share Posted May 24, 2007 The title of each pane goes on top of each pane. chart.Panes[0].AxisY.Title.Text = "Test title"; Will set the title for the topmost pane. Link to comment Share on other sites More sharing options...
Leo Posted May 24, 2007 Author Report Share Posted May 24, 2007 In Gannt type chart all panes are horizontal. There is no a "topmost pane". Link to comment Share on other sites More sharing options...
Frank Posted May 24, 2007 Report Share Posted May 24, 2007 I am confused! Where do you want the title? Please attach screenshot. Link to comment Share on other sites More sharing options...
Leo Posted May 24, 2007 Author Report Share Posted May 24, 2007 Here we go... I want the title which is currentl under the pane in the middle to go up above it. Link to comment Share on other sites More sharing options...
Frank Posted May 24, 2007 Report Share Posted May 24, 2007 Ok. I see now. chart.Panes[1].AxisY.Title.Text = "Test title"; Is setting the title for the Y-Axis of the pane, not the pane itself. The Y-Axis is showing at the bottom of the chart, therefore the title also is. You have a few options: 1) Use the Chart Titles. For example: chart.Titles.Add(new Title("TestTitle")); These titles are not attach to the panes but they can be aligned to the left right or center of the chart. 2) Create a secondary Y-Axis at the top of each of your panes (Axis.Position = AxisPosition.Far), hide the labels and set a title to it. For example: AxisY axisY = new AxisY(); axisY.Min = 0; axisY.Max = 1;axisY.Style |= AxisStyles.HideText; axisY.Grids.Major.TickMark = TickMark.None;axisY.Title.Text = "My Title"; chart.Panes[1].Axes.Add(axisY); PieChart.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.