Scrollbar components overlap
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Scrollbar components overlap
Hello:
Here is a scrollbar I added to a legend using example code provided by you in another (recent) post.
If you examine the "arrow" parts of the bar you will see that when the thumb is all the way up (0), there is some overlap in the rendering, but if the thumb is on the bottom (max), there is no overlap. Is there way to control this? Or maybe you could clean this up?
Thanks
Here is a scrollbar I added to a legend using example code provided by you in another (recent) post.
If you examine the "arrow" parts of the bar you will see that when the thumb is all the way up (0), there is some overlap in the rendering, but if the thumb is on the bottom (max), there is no overlap. Is there way to control this? Or maybe you could clean this up?
Thanks
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrollbar components overlap
Hello,
This has been added to our issue tracker with id=1792, and a 'fix' to it has been made which will be included in the next maintenance release.biqpaulson wrote: If you examine the "arrow" parts of the bar you will see that when the thumb is all the way up (0), there is some overlap in the rendering, but if the thumb is on the bottom (max), there is no overlap. Is there way to control this? Or maybe you could clean this up?
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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
Hello. Using the TeeChartNET2017_4.1.2017.03140.exe release, I don't see this as being fixed. It's possible it's been changed slightly but not fixed.
For example:
In this image, you can see the top does not look the same as the bottom. The top has a 2 pixel line "touching" the top part of the arrow, while the bottom has a one pixel line with a one pixel gap and does not touch the bottom arrow.
Also, when one scrolls to the bottom, the darker 1 pixel line on the thumb just touches the bottom line, making a nice 2 pixel line. But when one scrolls to the top, it looks like it overlaps.
Sorry, but it looks messy. Can you please take another look at this?
Thanks,
Matt
For example:
In this image, you can see the top does not look the same as the bottom. The top has a 2 pixel line "touching" the top part of the arrow, while the bottom has a one pixel line with a one pixel gap and does not touch the bottom arrow.
Also, when one scrolls to the bottom, the darker 1 pixel line on the thumb just touches the bottom line, making a nice 2 pixel line. But when one scrolls to the top, it looks like it overlaps.
Sorry, but it looks messy. Can you please take another look at this?
Thanks,
Matt
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrollbar components overlap
I am sceptical that further improvements can be made in this area, and expressed my scepticism in the comment I added to the ticket:biqpaulson wrote: Sorry, but it looks messy. Can you please take another look at this?
The issue here is that the rounding problem (from double -> int for GDI+ pixels) will depend on the number of elements in the LegendScrollBar, meaning that the 'fix' of a pixel (an int of value '1') will not necessarily render correctly in all cases.
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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
I understand how rounding issues can cause problems, but in this case, can't you increase the gap between the line and the bottom arrow to the point where regardless of how it rounds it will contain at least 1 pixel of space? I don't care if you have make it 5 pixels of gap, as long as the top doesn't have overlap. It's really the fact that the top looks so different than the bottom. Does this make sense?
Thanks
Thanks
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
Hello:
Have you had a chance to look my comments below? Do you this it would be possible to resolve this issue?
Thanks!
Have you had a chance to look my comments below? Do you this it would be possible to resolve this issue?
Thanks!
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrollbar components overlap
Using the .NET 4.0 version of the TeeChart.dll from the latest version and the following code:biqpaulson wrote: Have you had a chance to look my comments below? Do you this it would be possible to resolve this issue?
Code: Select all
private void InitializeChart()
{
Line series = new Line(tChart1.Chart);
series.FillSampleValues(100);
LegendScrollBar tool = new LegendScrollBar(tChart1.Chart);
}
from what I understand the problematic rendering should occur within the two yellow circles, but in my view the placement of the arrows seem correct, or rather, are symmetrical and non-overlapping.
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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
Hi Chris:
OK -- I found the difference. Please add this single line to your test case and you will see the difference:
.scrollBar.Size = 14
Also, even with the size left to the default setting, if you move the thumb to the top and then the bottom, you will see a difference in how the thumb overlaps the top and bottom arrows. I can understand why changing the size would affect your scaling (you have mentioned this before), but I don't see why, at the default size, it shouldn't look perfect.
Thanks,
Matt
OK -- I found the difference. Please add this single line to your test case and you will see the difference:
.scrollBar.Size = 14
Also, even with the size left to the default setting, if you move the thumb to the top and then the bottom, you will see a difference in how the thumb overlaps the top and bottom arrows. I can understand why changing the size would affect your scaling (you have mentioned this before), but I don't see why, at the default size, it shouldn't look perfect.
Thanks,
Matt
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrollbar components overlap
Hello Matt,
And here is a screenvideo of what is looks like here:
https://www.screencast.com/t/WfdfmP2EGIH
this is as close as I can get to a 'default' chart with a LegendScrollBar - could you please be so kind as to point out to me where you see the imperfections you mention?
Okay, here is some sample code:biqpaulson wrote: I can understand why changing the size would affect your scaling (you have mentioned this before), but I don't see why, at the default size, it shouldn't look perfect.
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
CreateChart();
InitializeChart();
}
TChart tChart1 = new TChart();
private void CreateChart()
{
//tChart1.Dock = DockStyle.Fill;
splitContainer1.Panel2.Controls.Add(tChart1);
}
LegendScrollBar tool;
private void InitializeChart()
{
Line series = new Line(tChart1.Chart);
series.FillSampleValues();
tool = new LegendScrollBar(tChart1.Chart);
}
private void button2_Click(object sender, EventArgs e)
{
tool.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
tool.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Export.Image.PNG.Save(@"D:\FTP\" + "TChart" + DateTime.UtcNow.Ticks.ToString() + ".png");
}
}
https://www.screencast.com/t/WfdfmP2EGIH
this is as close as I can get to a 'default' chart with a LegendScrollBar - could you please be so kind as to point out to me where you see the imperfections you mention?
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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
Hello:
For your example, please look at these two images:
Do you see the difference? There is overlap of the center (movable) area on the bottom but not on the top -- BUT -- I understand why this is happening in your case: The area over overlap is part of the 3d effect of the rendering of the movable part of the scrollbar (the beveled edge).
BUT -- I am choosing no bevel:
ChartTag.Settings.scrollBar.Bevel.Inner = BevelStyles.None
ChartTag.Settings.scrollBar.Bevel.Outer = BevelStyles.None
In which case there should be no bevel, and a simple border around that part of the control. But that is not case, part of the bevel is still visible.
Does this make sense?
Thanks
For your example, please look at these two images:
Do you see the difference? There is overlap of the center (movable) area on the bottom but not on the top -- BUT -- I understand why this is happening in your case: The area over overlap is part of the 3d effect of the rendering of the movable part of the scrollbar (the beveled edge).
BUT -- I am choosing no bevel:
ChartTag.Settings.scrollBar.Bevel.Inner = BevelStyles.None
ChartTag.Settings.scrollBar.Bevel.Outer = BevelStyles.None
In which case there should be no bevel, and a simple border around that part of the control. But that is not case, part of the bevel is still visible.
Does this make sense?
Thanks
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrollbar components overlap
Hello Matt,
if I'm not mistaken, this is the same as id=1792. Again, although I'm sure it is not immediately obvious without access to the source code (and even with the source code, it isn't necessarily so), the fact that LegendScrollBar calculations occur in System.Double means that rounding to System.Int32 for GDI+ can and does create such 'imperfect artefacts'.biqpaulson wrote: Does this make sense?
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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: Scrollbar components overlap
Hi Chris:
Yes, same issue. I can't pursue the any further right now, but if you happen to encounter this area of the code in the future and there's an opportunity to fix it, please try to.
Thanks,
Matt
Yes, same issue. I can't pursue the any further right now, but if you happen to encounter this area of the code in the future and there's an opportunity to fix it, please try to.
Thanks,
Matt