Jump to content
Software FX Community
IT Support

Height of Labeltext for X-Axis

Recommended Posts

Hi there 

Is there any possibility to get the height of the labeltextarea of the x-axis? My problem is, if the text is too long, the whole chart disappears. Can I somehow define a maximum height? Because the text is written in a proportional font I don't want to limit text by the amount of letters.

Thanks in advance and regards

Luzia

Share this post


Link to post
Share on other sites

Dear Luzia. Unfortunately, Chart FX API does not provide a property to customize Label text area height. You should reduce the text you are currently sending to axis labels. As a workaround, you can change label angle (chart1.AxisX.LabelAngle = 45;). I hope this helps.

Share this post


Link to post
Share on other sites

 As a workaround maybe you could measure the distance between the bottom of the chart and the bottom of the pane (assuming you dont have anything docked on the bottom of your chart, like the datagrid). That should be and indication of the size taken by the labels.

chart1.Height - chart1.Panes[0].BoundingRectangle.Bottom;

 

Edit: Sorry, wrong Chart FX version...

ChartFXTest7.zip

Share this post


Link to post
Share on other sites

Thanks for your prompt answers! 

The Panes-Property doesn't work in my installation. By the way, we are using version 5.0.10.3, and it's embedded in ActiveReports

Could I somehow check, whether the chart disappeared because of too long label text or not? With such an information, I could at least print a suitable message.

Or is there a possibility to measure the height of the labeltext area? This I could compare with the height of the chart and thereof get the needed information.

Best regards,

Luzia

Share this post


Link to post
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...

×
×
  • Create New...