BarChart Side by Side
BarChart Side by Side
How can I keep this chart from overlapping each other? I have them set on the series to display side by side. See attached.
Thanks.
Thanks.
- Attachments
-
- 2017-05-31_1149.png (21.74 KiB) Viewed 35244 times
Re: BarChart Side by Side
Hello realsol,
To do as Series are drawn side by side, you need active the BarStack propierty Side by Side. The code below shows you how can do it:
Hoping this helps you, otherwise don't hesistate to contact us.
Thanks in advance
To do as Series are drawn side by side, you need active the BarStack propierty Side by Side. The code below shows you how can do it:
Code: Select all
var Series1,Series2,Series3,Series4: TBarSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1 := TBarSeries.Create(Self);
Series2 := TBarSeries.Create(Self);
Series3 := TBarSeries.Create(Self);
Series4 := TBarSeries.Create(Self);
Chart1.AddSeries(Series1);
Chart1.AddSeries(Series2);
Chart1.AddSeries(Series3);
Chart1.AddSeries(Series4);
Series1.FillSampleValues(5);
Series2.FillSampleValues(5);
Series3.FillSampleValues(5);
Series4.FillSampleValues(5);
Series1.Marks.Visible := False;
Series2.Marks.Visible := False;
Series3.Marks.Visible := False;
Series4.Marks.Visible := False;
Series1.MultiBar := mbSide;
end;
Thanks in advance
Best Regards,
Sandra Pazos / 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: BarChart Side by Side
I had that set for the Series already in the IDE but added it in my OnCreate procedure, but it still makes no difference. What other properties might cause this?Sandra wrote:Hello realsol,
To do as Series are drawn side by side, you need active the BarStack propierty Side by Side. The code below shows you how can do it:
Hoping this helps you, otherwise don't hesistate to contact us.Code: Select all
var Series1,Series2,Series3,Series4: TBarSeries; procedure TForm1.FormCreate(Sender: TObject); begin Series1.MultiBar := mbSide; end;
Thanks in advance
Re: BarChart Side by Side
Also, please see my earlier post where it was supposed to be addressed: http://www.teechart.net/support/viewtop ... 17&t=16485. In that post the did address the 'Other Slice' in the pie chart, but no word no the bar chart fix. ..
Re: BarChart Side by Side
Hello realsol,
We are doing many test to verify if the bug is fixed or not for next maintenance release, so I can't reproduce it using our production TeeChart Pro/VCL source code.
Thanks in advance
We are doing many test to verify if the bug is fixed or not for next maintenance release, so I can't reproduce it using our production TeeChart Pro/VCL source code.
Thanks in advance
Best Regards,
Sandra Pazos / 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: BarChart Side by Side
Are there any settings I might have accidentally changed that would cause this? I think I used the basic bar chart settings but could have accidentally changed a setting that causes this. What is weird is some months print OK. Others don't.
Re: BarChart Side by Side
If I set View3d to false, all the bars line up like they are suppose too. Here are 3 images.
1. Chart in 3d
2. Chart without 3d
3. My chart 3d settings
1. Chart in 3d
2. Chart without 3d
3. My chart 3d settings
- Attachments
-
- 2017-06-02_1017.png (20.91 KiB) Viewed 35203 times
-
- 2017-06-02_1016.png (19.45 KiB) Viewed 35207 times
-
- 2017-06-02_1015.png (28.97 KiB) Viewed 35206 times
Re: BarChart Side by Side
Hello realsol,
Sorry for the delay.
I would like inform you that the problem occurs when is set the Xvalues property Order to Descending. Therefore, as a workaround, I would suggest you set the XValues order for each series to None. The code below shows you how:
Hoping this helps you.
Thanks in advance
Sorry for the delay.
I would like inform you that the problem occurs when is set the Xvalues property Order to Descending. Therefore, as a workaround, I would suggest you set the XValues order for each series to None. The code below shows you how:
Code: Select all
Chart1[0].XValues.Order := loNone;
Chart1[1].XValues.Order := loNone;
Thanks in advance
Best Regards,
Sandra Pazos / 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: BarChart Side by Side
I have 'None' already set in the ide so I added to the MainForm.OnCreate. No difference.
Also, in this situation, X is a date. Late I change the 'X' value to an integer set to 'None' and still they overlap. I hate not using 3d on my first release using your product since it looks so nice and I have a 3d chart right below it.
Any other suggestions?
Also, in this situation, X is a date. Late I change the 'X' value to an integer set to 'None' and still they overlap. I hate not using 3d on my first release using your product since it looks so nice and I have a 3d chart right below it.
Any other suggestions?
Re: BarChart Side by Side
Hello,
Try setting the Order as loAscending instead of loNone. Ie:
This works in the test project in #1820
Try setting the Order as loAscending instead of loNone. Ie:
Code: Select all
Chart1[1].XValues.Order:=loAscending;
Chart1[1].XValues.Sort;
Chart1.Repaint;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: BarChart Side by Side
I tried to add that to the end of my OnCreate method:
Same result as before. Again, only when printed in 3d.
Code: Select all
DBChart2[1].XValues.Order:=loAscending;
DBChart2[1].XValues.Sort;
DBChart2.Repaint;
Re: BarChart Side by Side
After looking at the code again, I figure the 'sort' is a method, thus needs values to sort, so I moved the code right after I assign the series it's values, but they still overlap.
Code: Select all
TopQuery.Active := true;
if DBChart2[1] <> nil then
begin
DBChart2[1].XValues.Order:=loAscending;
DBChart2[1].XValues.Sort;
DBChart2.Repaint;
end;
Re: BarChart Side by Side
Got it working. I needed to Sort each of the 1 to 4 Series that might be active in a for to loop.
Thanks for your help!
Code: Select all
TopQuery.Active := true;
DBChart2[i].XValues.Order:=loAscending;
DBChart2[i].XValues.Sort;
DBChart2.Repaint;
Re: BarChart Side by Side
Glad to hear it works fine now!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |