SeriesBand tool for vertical custom axises

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

SeriesBand tool for vertical custom axises

Post by Avijit » Fri Mar 26, 2010 4:00 pm

Hi,
Can you help me use the SeriesBandTool for custom axises?

I have 4 data series and out of these 4 Line serieses i want to create 2 SeriesBand tool.
I have created two custom vertical axis and the Pixel Position of each of the custom axis is as below -

Custom Vert Axis 1 :
StartPosition = 0
EndPosition = ChartHeight/2 + some offset

Custom Vert Axis 2 :

StartPosition = EndPosition of Custom Vert Axis 1 + some offset
EndPosition = ChartHeight;

I have associated the first 2 Line serieses with Custom Vert Axis 1 and the last two with Custom Vert Axis 2.
Then i am creating SeriesBandTool 1 with the first two serieses and SeriesBandTool 2 with last two serieses.
My expectation was - the two series band tool will not overlap with each other. But the series bands are fully overlapping.
To my understanding - i think both the SeriesBand tool is getting drawn irrespective of the Custom axis positions. I may be wrong here.

Please let me know how can i solve that problem.

Regards,
Avijit

Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

Re: SeriesBand tool for vertical custom axises

Post by Avijit » Mon Mar 29, 2010 9:23 am

Hi,

I have solved that issue...

Thanks.

-Avijit

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: SeriesBand tool for vertical custom axises

Post by Yeray » Mon Mar 29, 2010 3:33 pm

Hi Avijit,

I'm glad to see that you've solved your problem. Anyway, here is an example that may help other users in the same situation:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            for (int i = 0; i < 4; i++)
			{
                new Steema.TeeChart.Styles.Line(tChart1.Chart);
                tChart1[i].FillSampleValues();
			}

            tChart1.Draw();

            for (int i = 0; i < 2; i++)
            {
                new Steema.TeeChart.Tools.SeriesBandTool(tChart1.Chart);
                (tChart1.Tools[i] as Steema.TeeChart.Tools.SeriesBandTool).Series = tChart1[i*2];
                (tChart1.Tools[i] as Steema.TeeChart.Tools.SeriesBandTool).Series2 = tChart1[(i*2)+1];
                
                tChart1.Axes.Custom.Add(new Steema.TeeChart.Axis());
                tChart1.Axes.Custom[i].StartPosition = 100/2 * i;
                tChart1.Axes.Custom[i].EndPosition = 100 / 2 * (i + 1);
                tChart1[i * 2].CustomVertAxis = tChart1.Axes.Custom[i];
                tChart1[(i * 2) + 1].CustomVertAxis = tChart1.Axes.Custom[i];
            }
            
        }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply