Jump to content
Software FX Community

Feature Request...Wrapping X-Axis Labels


Recommended Posts

Even with the staggered feature turned on, long series names can run into each other for charts with many data points. Excel's charts have a wrapping feature that automatically wraps the x-axis label text to respect it's real-estate.  In addition to vertical/45%/Staggered...a "wrapping" option would be a very helpful feature to add to 2005. After reviewing the forum I see this is a freuquent request.

Link to comment
Share on other sites

Thank you for the response.


I have a bar chart that has 10 or so series that a represented in the chart as bars (so 10 vertical bars). The descriptions of the 10 items on the x-axis "run into" each other...even when staggered.


When I implement the fix suggested, all of the bars shift over to the left (next to the Y1 axis) to where the first bar was originally.  It looks like they are all piled on top of each other. So instead of 10 bars, it looks like I have one bar (which I think is really 10 in the same location).


Am I doing something wrong? 

Link to comment
Share on other sites

My code:

chart1.AxisX.Style &= ~AxisStyles.SingleLine;

Your code:

Chart.AxisX.Style = ChartFX.WinForms.AxisStyles.SingleLine

 Not quite the same. I am leaving all flags as they were and turning ON SingleLine, you are turning OFF every other flag and leaving SingleLine ON

 The equivalent VB code would be:

Chart1.AxisX.Style = Chart1.AxisX.Style And Not ChartFX.WinForms.AxisStyles.SingleLine


Link to comment
Share on other sites

Tried the new code you suggested.  The chart did not change visually.

I looked online for documentation on the "Style" capabilities and could not find "SingleLine".  Is there somewhere I could read up on the options for this property so I can experiment without having to pester you?


Link to comment
Share on other sites

Please paste the following code into a brand new VB project with a default chart in it:

  Chart1.Data.Series = 1   Chart1.Data.Points = 3   Chart1.Data(0, 0) = 10   Chart1.Data(0, 1) = 20   Chart1.Data(0, 2) = 30   Chart1.AxisX.Labels(0) = "Label One"   Chart1.AxisX.Labels(1) = "Label Two"   Chart1.AxisX.Labels(2) = "Label Three"   Chart1.AxisX.Labels(3) = "Label Four"   Chart1.AxisX.Step = 1   Chart1.AxisX.Style = Chart1.AxisX.Style And Not ChartFX.WinForms.AxisStyles.SingleLine   Chart1.Width = 300   Chart1.PlotAreaMargin.Bottom = 50


This demonstrates the functionality we discussed.

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.

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.


  • Create New...