Page 1 of 1

Layout Questions

Posted: Wed Oct 27, 2010 9:10 pm
by 15057119
I have a two layout Questions. The first is I have a bar graph, screen capture of it is attached call bar graph. The data and labels are getting cut off by the edge of the controls. How do I get the bar graph to stay within the control size. My tchart control in embedded in an active X report.

My second question is regarding a pie chart. A screen capture is attached called pie chart. The data labels are over lapping one another. Is there a way to make them place in free sapce instead of overtop of one another?

Re: Layout Questions

Posted: Thu Oct 28, 2010 12:57 pm
by narcis
Hi Cartergraph,
I have a two layout Questions. The first is I have a bar graph, screen capture of it is attached call bar graph. The data and labels are getting cut off by the edge of the controls. How do I get the bar graph to stay within the control size. My tchart control in embedded in an active X report.
Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
My second question is regarding a pie chart. A screen capture is attached called pie chart. The data labels are over lapping one another. Is there a way to make them place in free sapce instead of overtop of one another?
You could try doing something as Pep suggested here. This a TeeChart for .NET thread but the same could apply to the ActiveX version.

Re: Layout Questions

Posted: Thu Oct 28, 2010 9:16 pm
by 15057119
Attached is a .Net Visual studio project displaying the problem with the grid and labels being cut off.

I also attached the exe for the mini project incase you can't open the visual studio n2010 project.

I will try the coded suggestion for the overlapping callouts, I guess I just expected the control to be able to handle that.

Re: Layout Questions

Posted: Thu Oct 28, 2010 9:49 pm
by 15057119
I tried the coded solution for the overlapping labels and unfornutaly i am in VBS with the contorl inside a report and i don't have acces to the porperties used in that fix. Any other suggestions?

Re: Layout Questions

Posted: Tue Nov 02, 2010 10:10 am
by narcis
Hi Elizabeth,
Attached is a .Net Visual studio project displaying the problem with the grid and labels being cut off.
If labels are cut off by chart axes/walls you can use this:

Code: Select all

            axTChart1.Series(0).Marks.Clip = false;
However, in your examples they are cut off by chart dimensions. In that case the only solution I can think of also is using custom marks position to plot them at a slightly different location, for example:

http://www.teechart.net/support/viewtop ... s+position
I tried the coded solution for the overlapping labels and unfornutaly i am in VBS with the contorl inside a report and i don't have acces to the porperties used in that fix. Any other suggestions?
Are those missing properties available outside a report? If so the only solution I can think of is drawing the chart outside the report, export it to an image and use that image into the report.

Re: Layout Questions

Posted: Wed Nov 03, 2010 4:53 pm
by 15057119
you are right the clip setting did not work.

When i tried the code, where it drills down into the postions (Marks.Positions.Position(ii).Custom = True & .Marks.Positions.Position(ii).LeftTop.Y = yValue), thsoe values could not be evalued and i get an unknown exception. I got a simailr error when i tried to re-write the code in c# in the sample project in .Net.
As a side note, the compiler would not allow me to call the InternalRepaint giving the error message: "Only assignment, call, increment, decrement, and new object expressions can be used as a statement"

Re: Layout Questions

Posted: Wed Nov 03, 2010 4:59 pm
by 15057119
What's interesting is that if i add a title with Text and the Left axis to visible, nothing gets cut off. The problem is my designer does not want a left axis or a title. Are there other properties i need to set to support that?

Re: Layout Questions

Posted: Thu Nov 04, 2010 8:17 am
by narcis
Hi Cartergraph,

Try callin InternalRepaint with parenthesis, like this:

Code: Select all

axTChart1.Environment.InternalRepaint();
If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.

Thanks in advance.

Re: Layout Questions

Posted: Wed Nov 10, 2010 2:31 pm
by 15057119
Any suggestions on the data that is getting cut off?

Re: Layout Questions

Posted: Wed Nov 10, 2010 2:59 pm
by narcis
Hi Cartergraph,

You could try increasing axes MinimumOffset and MaximumOffset.