Problem with Multiple Bars in MultiBars.Side mode

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Thomas
Newbie
Newbie
Posts: 7
Joined: Mon Dec 04, 2006 12:00 am

Problem with Multiple Bars in MultiBars.Side mode

Post by Thomas » Thu Feb 01, 2007 1:44 pm

Hello,

I use TeeChart for .NET v2 and I would like to place one bar of the 1st series beside another one of the 2th series. Both bars have the same DateTime-value on the vertical axis.

The "Automatic" property of the vertical axis is set to true and I use DatetimeSteps like


_x_axis.Increment = Utils.DateTimeStep[(int)DateTimeSteps.OneYear];


but the bars are displayed with distance...can anybody help me?

Thanks,
Thomas

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Fri Feb 02, 2007 10:44 am

Hi Thomas

Could you try these lines:

bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;
bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;

Here It's working fine using lastest release (Build 2.0.2586.24038) and the below code:

Code: Select all

 private void Form1_Load(object sender, EventArgs e)
        {
            DateTime[] dates = new DateTime[5];

            dates[0] = Convert.ToDateTime("1/1/07 07:00:00");
            dates[1] = Convert.ToDateTime("1/1/07 08:00:00");
            dates[2] = Convert.ToDateTime("1/1/07 09:00:00");
            dates[3] = Convert.ToDateTime("1/1/07 10:00:00");
            dates[4] = Convert.ToDateTime("1/1/07 11:00:00");

            bar1.XValues.DateTime = true;
            bar2.XValues.DateTime = true;
            
            bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;
            bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;

            for (int i = 0; i < 5; i++)
            {
                bar1.Add(dates[i], i);
                bar2.Add(dates[i], i);
            }            
        }
If the problem persist could you please send us a simple example project we can run "as-is" to reproduce the issue here?

You can post your files either at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup or at our upload page

Thanks in advance.
Last edited by Edu on Tue Apr 10, 2007 9:10 am, edited 1 time in total.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Thomas
Newbie
Newbie
Posts: 7
Joined: Mon Dec 04, 2006 12:00 am

Post by Thomas » Tue Feb 13, 2007 7:52 am

Thanks for your quick reply,

My series datapoints are exactly the same in both series i.e.:

_series.Add(Convert.ToDateTime("1/1/07 01:00:00"), 2);
_series.Add(Convert.ToDateTime("1/1/05 01:00:00"), 7);
_series.Add(Convert.ToDateTime("1/1/06 01:00:00"), 8);
_series.Add(Convert.ToDateTime("1/1/07 01:00:00"), 4);
...

The result is that the one bars will not be displayed beside the other. In addition I added the series values chronological unordered how you can see in the code snippet above.

I have uploaded a image via the upload page. There you can see that the bars are misplaced.

Greetings,
Thomas

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Tue Feb 13, 2007 9:14 am

Hi Thomas

We don't have enough information for reproduce your Chart. Here It's working fine using lastets realease (Build 2.0.2586.24038 "avaible at the web") and the below code, the series values are chronological unordered:

Code: Select all

private void Form1_Load(object sender, EventArgs e)
        {
            DateTime[] dates = new DateTime[7];
            tChart1.Aspect.View3D = false;
           
            dates[0] = Convert.ToDateTime("1/1/07 09:00:00");
            dates[1] = Convert.ToDateTime("1/1/07 08:00:00");
            dates[2] = Convert.ToDateTime("1/1/07 11:00:00");
            dates[3] = Convert.ToDateTime("1/1/07 10:00:00");
            dates[4] = Convert.ToDateTime("1/1/07 07:00:00");
            dates[5] = Convert.ToDateTime("1/1/07 12:00:00");
            dates[6] = Convert.ToDateTime("1/1/07 09:30:00");

            bar1.XValues.DateTime = true;
            bar2.XValues.DateTime = true;

            bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;
            bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;

            for (int i = 0; i < 5; i++)
            {
                bar1.Add(dates[i], i);
                bar2.Add(dates[i], i + 2);     
            }            
        }
Could you try this code please?
If this code doesn't work fine in your machine, you should download the last version (Build 2.0.2586.24038). Then if the problem persist could you please send us a simple example project we can run "as-is" to reproduce the issue here?

upload page

Thanks in advance
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply