Space between chart and axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MVuser2
Newbie
Newbie
Posts: 9
Joined: Wed Jun 29, 2011 12:00 am

Space between chart and axis

Post by MVuser2 » Thu May 31, 2012 1:15 pm

hi,

i get a space between the chart and the axis. it happens somehow only in bar series.
it happens in our software, i can't reproduce it in a simple standalone application.
i also cannot send our code here(it is very complex and involves many classes in addition the teechart).

what can i do? which properties control this aspect? do you have any idea?

thanks
Attachments
TEECHART.jpg
TEECHART.jpg (59.99 KiB) Viewed 6141 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Space between chart and axis

Post by Sandra » Thu May 31, 2012 2:55 pm

Hello MVuser2,

I suggest you set property SideMargins to false as do in next line of code:

Code: Select all

 bar1.SideMargins = false;
Can you tell if my suggestion solve your problem?

Thanks,
Best Regards,
Sandra Pazos / 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

MVuser2
Newbie
Newbie
Posts: 9
Joined: Wed Jun 29, 2011 12:00 am

Re: Space between chart and axis

Post by MVuser2 » Sun Jun 03, 2012 9:24 am

Hi,

i set this property, now the bars draw also inside the space, but the line of the space(near the arrows that i drawn) still exists.
how can i remove it?

MVuser2
Newbie
Newbie
Posts: 9
Joined: Wed Jun 29, 2011 12:00 am

Re: Space between chart and axis

Post by MVuser2 » Mon Jun 04, 2012 7:15 am

Hi,

i have added more screenshots to demonstrate my problems.
you can see in the screenshot the same application with the same data, the difference is that in one picture it's teechart 2011(for .net) and in the other one it's teechart 5 ocx(for vb).

you can see a have 2 series, line and bar.

1. in teechart 5, when combining the two, the line starts from the start of the column. in teechart 2011, it starts from the middle of the column. how can i make the line start from the start of the column in teechart 2011?

2. you can see that in teechart 2011 i have some extra vertical line(the line series starts from it). what is this line and how can i remove it?

3. in teechart 2011 the left the right borders are colored in black. how can i make them look like teechart 5?

thanks
Attachments
teechart2011.jpg
teechart2011.jpg (60.95 KiB) Viewed 6100 times
teechart5.jpg
teechart5.jpg (46 KiB) Viewed 6109 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Space between chart and axis

Post by Sandra » Mon Jun 04, 2012 9:48 am

Hello MVuser2,
1. in teechart 5, when combining the two, the line starts from the start of the column. in teechart 2011, it starts from the middle of the column. how can i make the line start from the start of the column in teechart 2011?
I have chacke if your problem appears for me using the same code in TeeChart 5 of Activex and TeeChartFor.Net 2012 and I get the same behavior, the line in the both cases is drawn in the middle of bar:

TeeChartFor.Net:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar bar1 = new Bar(tChart1.Chart);
            Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
            bar1.FillSampleValues();
            line1.DataSource = bar1;
            bar1.SideMargins = false;
            tChart1.Axes.Bottom.AxisPen.Color = tChart1.Axes.Bottom.Grid.Color;
            tChart1.Axes.Left.AxisPen.Color = tChart1.Axes.Left.Grid.Color;
            tChart1.Walls.Back.Visible = false;
            tChart1.Axes.Bottom.Grid.Visible = false;
            tChart1.Axes.Left.Grid.Visible = false;
}
Activex:

Code: Select all

Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scBar
.AddSeries scLine
.Series(0).FillSampleValues 10
.Series(1).DataSource = TChart1.Series(0)
.Series(0).asBar.SideMargins = False
.Axis.Bottom.AxisPen.Color = .Axis.Bottom.GridPen.Color
.Axis.Left.AxisPen.Color = .Axis.Left.GridPen.Color
.Axis.Left.GridPen.Visible = False
.Axis.Bottom.GridPen.Visible = False
.Walls.Back.Visible = False
End With
Can you tell us if using your assemblies, the code works in diferent way? If it works in same way, but your problem persist in the code you have made,please modify my code to achieve your results because we can try to find a solution for you.
2. you can see that in teechart 2011 i have some extra vertical line(the line series starts from it). what is this line and how can i remove it?
I am afraid, your problem doesn't appear for me using last version of TeeChartFor.Net. Can you update your version to last and check again if your problem persist? You can download last version in the Customer download page. If your problem persist, please send us a simple project so we can try to reproduce the problem.
3. in teechart 2011 the left the right borders are colored in black. how can i make them look like teechart 5?
You need change the default color of axes to achieve the same results as in ActiveX, you can do something as next:

Code: Select all

            tChart1.Axes.Bottom.AxisPen.Color = tChart1.Axes.Bottom.Grid.Color;
            tChart1.Axes.Left.AxisPen.Color = tChart1.Axes.Left.Grid.Color;
Can you tell if it works as you want?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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