Bars are displyed saperately w.r.t left and right axes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

Bars are displyed saperately w.r.t left and right axes

Post by Amol » Thu Feb 04, 2021 1:53 pm

Hi Steema,

We have used TChart.Net 2012 and created a bar chat. In which we have plotted multiple bar series on left and bottom axis. Now we want to add some bar series on Right and bottom axis.
When we created this chart then the xyz bar snugly with "Jan" label.
If we set the MultiBars Styles as "SideAll" then all bars are displayed separately.
So we want to display the chart as same as attached image.
Bar chart.png
Bar chart.png (35.64 KiB) Viewed 18735 times
For your reference, we have also added a demo.


Thanks
Amol
Attachments
BarChart.rar
For your reference, we have also added a demo.
(67.44 KiB) Downloaded 1848 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Bars are displyed saperately w.r.t left and right axes

Post by Christopher » Fri Feb 05, 2021 8:49 am

Hello,

yes, this is possible - I've attached a retouched project, which here gives me:
WindowsFormsApplication1_2021-02-05_09-46-34.png
WindowsFormsApplication1_2021-02-05_09-46-34.png (17.07 KiB) Viewed 18679 times
Attachments
BarChart_Retouched.zip
(16 KiB) Downloaded 1840 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

Re: Bars are displyed saperately w.r.t left and right axes

Post by Amol » Sat Feb 06, 2021 11:13 am

Thanks for your valuable reply.
I have run your code and found that that in demo, axis line of left and right axis and legend are not visible.

Thanks
Amol

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Bars are displyed saperately w.r.t left and right axes

Post by Christopher » Mon Feb 08, 2021 9:39 am

Hello Amol,

Commenting out some existing code and adding in a couple more lines gives me the following:
WindowsFormsApplication1_2021-02-08_10-37-19.png
WindowsFormsApplication1_2021-02-08_10-37-19.png (17.67 KiB) Viewed 18601 times

Code: Select all

            ArrangeBottomAxes(m_bar2);

            //m_bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.SideAll;

            //tChart1.Legend.Visible = true;
            //tChart1.Aspect.View3D = false;


            //tChart1.Legend.CustomPosition = true;
            //tChart1.Legend.LegendStyle = LegendStyles.Series;
            //tChart1.Legend.Shadow.Visible = false;
            //tChart1.Legend.Transparency = 100;
            //tChart1.Legend.Top = 100;
            //tChart1.Legend.Left = 900;

            tChart1.Axes.Bottom.Title.Text = "X-Axes";
            tChart1.Axes.Left.Title.Text = "Y-Axes";
            //tChart1.Axes.Right.Title.Text = m_Points3.Title;// Right-Axes title

            tChart1.Axes.Left.Grid.Visible = true;
            tChart1.Axes.Left.Grid.Color = Color.Red;
            tChart1.Axes.Left.Grid.DrawEvery = 1;
            tChart1.Axes.Right.Grid.Visible = true;
            tChart1.Axes.Right.Grid.Color = Color.Blue;
            tChart1.Axes.Right.Grid.DrawEvery = 1;
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

Re: Bars are displyed saperately w.r.t left and right axes

Post by Amol » Tue Feb 09, 2021 4:53 pm

Hi Steema,

Thanks for your valuable support.

We have got your code but in chart the vertical Axis line, in which ticks and labels are showing, are missing. Only the grid lines are displayed on chart.
But we want to display the vertical axes lines(i.e. Y-Axis and Alternate Y axis) on chart.

Thanks & regards
Amol

Post Reply