Jump to content
Software FX Community

How to find the plot area?


Recommended Posts

I am setting the chart.Titles[0].Text = "something"

The problem is that the text gets cut off on both ends if the text is too long..

I understand that currently there is no option to wrap text.

I am looking at inserting a new line every time the title goes beyond.

For this I need to find the plot area, or the length available for displaying the title.

Looking forward to a response Please.

Link to comment
Share on other sites

Hi, if what you need is the area enclosing the actual plot, then you need to use the bounds property of the first pane in the panes collection:

System.Drawing.Rectangle myRect = chart1.Panes[0].Bounds;

You can use the Rectangle porperties to calculate the dimensions and the position of the plot area relative to the dimensions of the control itself. You can get the size of the Control by using the chart's Width and Height properties.




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...