Page 1 of 1

Gradient behaviour

Posted: Tue Dec 03, 2013 2:29 pm
by 16665313
Hi,

I've got some issues with the use of gradient.
Look at the first image, specifically at the gradient around the horizontal line at around Y=64, The gradient is roughly defined between 56 and 71. This looks as you would expect it. The density of the gradient is at its maximum around y=64 and fades away to higher and lower values.

Now the only thing that gets changed are the min. and max. values of the y-axis (see second image).

As you can see the gradient arond Y=64 looks different as you would expect. The maximum density didn't stay at Y=64, it shifted to a lower value.
You can see the same behaviour, to a lesser extend, at Y=4
image001.png
image001.png (57.39 KiB) Viewed 9422 times
image003.png
image003.png (56.31 KiB) Viewed 10957 times

Re: Gradient behaviour

Posted: Wed Dec 04, 2013 10:04 am
by yeray
Hi,

I'm not sure to see how are you drawing those gradients. Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Gradient behaviour

Posted: Wed Dec 04, 2013 11:39 am
by 16665313
Hi Yeray,

Look at the Ax featuredemo. Look in new features/Tools/New stats.
Open the editor.
Fix the left axis to 0 and 600.
Add in tools a colorband. Choose the left axis. Set its start and end values to 300 and 500. Make Gradient visible and choose as (start, middle, end)colors white, red, white. Other symmetrical colors ae also possible.
Notice that the maximum gradient density is at 400, as expected. The gradient fades away to 300 and 500, as expected.
Now, change the left axis to 0 and 400. The maximum gradient density has shifted to around 350. This is not as expected, it should stay at 400.
Change the left axis to 0 and 350. Now the maximum gradient density is again shifted to around 325.

My point is that the appearance of the gradient of the colorband should not be affected by the values of the according axis but should obey the chosen start and end value of the band.

Hope this clarifies.

TIA,

Jack

Re: Gradient behaviour

Posted: Thu Dec 05, 2013 9:42 am
by yeray
Hi Jack,

I've added it to the wish list to be revised in future releases:
http://bugs.teechart.net/show_bug.cgi?id=504

Thanks for reporting it.

Note I reproduced it and added it to the VCL version because the ActiveX is a wrapper from VCL so it will inherit the changes on it.