Layout Questions

TeeChart for ActiveX, COM and ASP
Post Reply
Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Layout Questions

Post by Cartegraph » Wed Oct 27, 2010 9:10 pm

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?
Attachments
Pie chart.png
Pie chart.png (31.54 KiB) Viewed 11760 times
bar graph.png
bar graph.png (8.36 KiB) Viewed 11723 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Layout Questions

Post by Narcís » Thu Oct 28, 2010 12:57 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Re: Layout Questions

Post by Cartegraph » Thu Oct 28, 2010 9:16 pm

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.
Attachments
VisualStudioProjectShowingCutOffGrid.zip
(440.61 KiB) Downloaded 575 times
ReleaseExeShowingCutOffGrid.zip
(211.2 KiB) Downloaded 602 times

Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Re: Layout Questions

Post by Cartegraph » Thu Oct 28, 2010 9:49 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Layout Questions

Post by Narcís » Tue Nov 02, 2010 10:10 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Re: Layout Questions

Post by Cartegraph » Wed Nov 03, 2010 4:53 pm

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"
Attachments
Error.png
Error.png (29.15 KiB) Viewed 11698 times

Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Re: Layout Questions

Post by Cartegraph » Wed Nov 03, 2010 4:59 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Layout Questions

Post by Narcís » Thu Nov 04, 2010 8:17 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Cartegraph
Newbie
Newbie
Posts: 11
Joined: Thu Sep 02, 2010 12:00 am

Re: Layout Questions

Post by Cartegraph » Wed Nov 10, 2010 2:31 pm

Any suggestions on the data that is getting cut off?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Layout Questions

Post by Narcís » Wed Nov 10, 2010 2:59 pm

Hi Cartergraph,

You could try increasing axes MinimumOffset and MaximumOffset.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply