HI Steema,
I am facing following problem.
I need to display a bar chart and a line series on same plot. Line series have different y axis points but we have same axis for X(bottom)
My line is not going from middle of Bars. Please see below snaps.
I need below type chart with 2 series bar and line.
I have fixed 6 point for line series and fix 6 bars but not able to generate plot like above image.
I have getting results like below image.
Please help me.
Thanks
Amol
Regarding Bars and line plot issue
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Regarding Bars and line plot issue
Hello,
this code:
here gives me the following chart:
this code:
Code: Select all
private void InitializeChart()
{
Bar bar = new Bar(tChart1.Chart);
Line line = new Line(tChart1.Chart);
line.Pointer.Visible = true;
line.Pointer.InflateMargins = false;
bar.Marks.Style = MarksStyles.Value;
Random rnd = new Random();
for (int i = 10; i < 100; i+=10)
{
int y = rnd.Next(100);
bar.Add(y, i.ToString());
line.Add(rnd.Next(y));
}
}
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 |
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Regarding Bars and line plot issue
The same result can be obtained using this code:
giving me here:
Code: Select all
private void InitializeChart()
{
Bar bar = new Bar(tChart1.Chart);
Line line = new Line(tChart1.Chart);
line.Pointer.Visible = true;
line.Pointer.InflateMargins = false;
bar.Marks.Style = MarksStyles.Value;
Random rnd = new Random();
for (int i = 10; i < 100; i+=10)
{
int y = rnd.Next(100);
bar.Add(i, y);
line.Add(i, rnd.Next(y));
}
}
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 |
Re: Regarding Bars and line plot issue
Thanks you very much.
It helps.
Thanks
Amol
It helps.
Thanks
Amol