Page 1 of 1

Space between chart and axis

Posted: Thu May 31, 2012 1:15 pm
by 15659704
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

Re: Space between chart and axis

Posted: Thu May 31, 2012 2:55 pm
by 10050769
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,

Re: Space between chart and axis

Posted: Sun Jun 03, 2012 9:24 am
by 15659704
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?

Re: Space between chart and axis

Posted: Mon Jun 04, 2012 7:15 am
by 15659704
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

Re: Space between chart and axis

Posted: Mon Jun 04, 2012 9:48 am
by 10050769
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,