Jump to content
Software FX Community

axis titles in gantt chart (extra x-axis)


Neoteny
 Share

Recommended Posts

If a x-axis has a title and the gallery is changed to Gantt, the title is displayed vertically. However, if two Axes are placed on the x-axis and the second one (Axis.Item(3)) has a title, the title is not rotated, but placed on the bottom and displayed horizontally. It takes way too much space this way.

Link to comment
Share on other sites

  • 1 month later...

Unable to replicate. Make sure that you apply the latest service pack to ensure that you are using the latest version of our product:

http://support.softwarefx.com/ShowInteractive.aspx?Product=CfxCS62&option=0

I tried the following code and added a title to the primary and the secondary x-axes; when I enabled the ToolBar and changed the Gallery to Gantt, both axes where positioned vertically along with their corresponding titles. The code that I used is below:

Chart1.AxisX.Title.Text = "My X-Axis Title Test"

'The next lines create another x axis and set its properties

Dim axis As Object

Set axis = Chart1.axis(3)

axis.Visible = True

axis.Min = 0

axis.Max = 12

axis.Step = 3

axis.YAxis = False

axis.Gridlines = True

axis.Title.Text = "My Secondary X-Axis Title Test"

Link to comment
Share on other sites

I'm sorry, I meant nested axes, not an x-axis at the other side of the chart. Try this code:

Chart1.Gallery = Gallery_Gantt

'Chart1.AxisX.Title.Text = "My X-Axis Title Test"

'The next lines create another x axis and set its properties

Dim axis As axis

Set axis = Chart1.axis(3)

axis.Visible = True

axis.Min = 0

axis.Max = 12

axis.Step = 3

axis.YAxis = False

axis.Gridlines = True

axis.Position = AxisPosition_Center

axis.Title.Text = "My Secondary X-Axis Title Test"

Of course, while trying to adjust your example to match my findings I discovered that axis.Position is the key and that the title is displayed correctly when setting the position to AxisPosition_Near.

Please allow me to say that this is not the most obvious place to look for a change in the vertical orientation of an axis title.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...