Difference between TeeChart 5 and TeeChart 2011

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

Difference between TeeChart 5 and TeeChart 2011

Post by MVuser2 » Thu Jun 14, 2012 11:04 am

Hi,

my company integrated from VB to C# and these differences are really important to me, because it can change the whole behavior of the software.
our software is clinical software that serves physicians and nurses, so every pixel difference or a small change can count.

i made some sample project in VB and NET and i'm trying to understand the differences between the two.

in these samples, there are charts with similar configuration. when you press the button, the textbox text filled up with the first five points of the left axis(see the sample code for more information - it is really simple).

i get different values in VB and .NET, and the behavior of the bars(without SideMargins) is not the same.
my target is to get the .NET chart to behave like the VB one.

we have other problems in our application, i'm still trying to reproduce it in a side project.
some of the problems can be fixed when i set the MinimumOffset and MaximumOffset of the axes. What is the difference from VB?

P.S
Can i serialize the chart to a file and load it configuration in another project? it may help me to pass some problems to you.
Attachments
TChartNet.rar
(15.88 KiB) Downloaded 428 times
TChartVBTest.rar
(1.86 KiB) Downloaded 422 times

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by MVuser2 » Thu Jun 14, 2012 1:49 pm

addition:

i succeeded to export the tchart to a *.ten file, so i can send you some of our configuration.
you can load it and reproduce this problem:

i have some space between the first bar and the start of the chart, even though SideMargins in false.
if i change MinimumOffset or MaximumOffset of Bottom axis from 0 to another value, the first bar "jumps" to the start.
why it doesn't starts from the start of the chart with 0 value?

attached: chart configuration with data.
Attachments
graph_with_data.rar
(2.84 KiB) Downloaded 417 times

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by Sandra » Fri Jun 15, 2012 12:39 pm

Hello MVuser2,
in these samples, there are charts with similar configuration. when you press the button, the textbox text filled up with the first five points of the left axis(see the sample code for more information - it is really simple).i get different values in VB and .NET, and the behavior of the bars(without SideMargins) is not the same.my target is to get the .NET chart to behave like the VB one.
Ok. First you use to check the behavior, two different products of TeeChart and is possible as you find differences of behavior, and is the case of FillSampleValues the values are generated are different, so its function is added a sample of random values. If you want achieve the same values in the both versions, I recommend you add manually the values with Series.Add method.
we have other problems in our application, i'm still trying to reproduce it in a side project.
some of the problems can be fixed when i set the MinimumOffset and MaximumOffset of the axes. What is the difference from VB?
You can solve your problem setting property InflateMargins of Marks to true as do in next line of code:

Code: Select all

 Steema.TeeChart.Styles.Bar bar;
        Steema.TeeChart.Styles.Line line;
        private void Form1_Load(object sender, EventArgs e)
        {
            tChart1.Clear();
            tChart1.Series.Clear();
            tChart1.Aspect.View3D = false;

            bar = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar.FillSampleValues(10);
            bar.SideMargins = false;
            line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line.DataSource = bar;
            bar.Marks.InflateMargins = false;
            line.RefreshSeries();
           // bar.Marks.Visible = false;
            //Axes;
            tChart1.Axes.Left.SetMinMax(0, 28);
            //  tChart1.Axes.Left.MaximumOffset = 1;
            tChart1.Axes.Bottom.SetMinMax(0, 9);
            tChart1.Walls.Back.Visible = false;
            tChart1.Draw();
        }
i have some space between the first bar and the start of the chart, even though SideMargins in false.
if i change MinimumOffset or MaximumOffset of Bottom axis from 0 to another value, the first bar "jumps" to the start.
why it doesn't starts from the start of the chart with 0 value?
I can not reproduce your problem, can you please attached an image where you indicate the exactly problem, because we can try to find a good solution for you? On the other hand, can you tell us which version of TeeChartFor.Net are you using now?

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: Difference between TeeChart 5 and TeeChart 2011

Post by MVuser2 » Sun Jun 17, 2012 8:12 am

i'm using TeeChart version 4.1.2011.6283.

InflateMargins didn't solve me problem.

i posted two screenshots for you to understand the offset problems.
you can load the same chart configuration and data from the file above in my last message(graph_with_data.rar).

when MinimumOffset and MaximumOffset of an axis is 0, there is a strange space.
i cannot reproduce this behavior in VB because there is no MinimumOffset and MaximumOffset there.

i'm trying to understand if there is another way cope with this difference instead of setting offsets, because i'm getting different behavior in VB and .NET application.
space1.jpg
space1.jpg (48.96 KiB) Viewed 9507 times
space2.jpg
space2.jpg (47.74 KiB) Viewed 9518 times

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by Sandra » Mon Jun 18, 2012 12:39 pm

Hello MVuser2,

Ok, thanks for the information. Checking your code, I have found where the problem is and I think you can solve it if you change the value of OffsetPercent of the Bar Series as do in next lines of code:

Code: Select all

        private void button3_Click(object sender, EventArgs e)
        {
            tChart1.Series.Clear();
            tChart1.Import.Template.Load(@"C:\Users\Sandra\Downloads\graph_with_data\graph_with_data.ten");
            (tChart1[2] as Steema.TeeChart.Styles.Bar).OffsetPercent = 10;
        
        }
Can you tell us if previous code help you to solve your problem?

On the other hand, I inform you that you there are a newest maintenace releases of TeeChartFor.Net and I recommend you update your version. You can download it in the customer page

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

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by MVuser2 » Mon Jun 18, 2012 3:05 pm

Thanks Sandra,

Here is another question:
Can you check if InflateMargins behave differently in VB and .NET?

in our application, both .NET and VB, it is set to true, but in .NET in some places we need to set offsets or cancel it.

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by Sandra » Mon Jun 18, 2012 4:07 pm

Hello MVuser2,
Can you check if InflateMargins behave differently in VB and .NET?
Marks.InflateMargins property doesn't exist in VB, so is a property of TeeChartFor.Net that expands axes to fit Series Marks. Some properties are implemented in the TeeChartFor.Net to draw the chart more elegant. As I have told you are comparing two different products of TeeChart and is possible as you find differences of behavior and probably you need add or modified your code to achieve a same results in both products.

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: Difference between TeeChart 5 and TeeChart 2011

Post by MVuser2 » Mon Jun 25, 2012 3:42 pm

Hi Sandra,
thanks for your help.

i understand that the behavior is not the same and i want to do the perfect solution.
for now on, i know that i can use MinimumOffset and MaximumOffset to align the axes and InflateMargins of series to make sure that it won't change axes original location.

are there any other properties of series that affects the positioning of the axes?
are there any other properties that affects the offsets of the axes?

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

Re: Difference between TeeChart 5 and TeeChart 2011

Post by Sandra » Wed Jun 27, 2012 8:27 am

Hello MVuser2,

At the moment, I don't have any ideas at mind about other properties of Series can affects to the axes apart from of Marks.InflateMargins, Points.InflateMargins or Offset.


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