ViewXY,IntensityGrid - logarithmic Y axis

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Thu Nov 05, 2015 9:27 am

Setting m_chart.ViewXY.YAxes[0].ScaleType to logarithmic has no effect on IntensityGrids.

Linear scaling:
2_Linear.png
2_Linear.png (92.93 KiB) Viewed 42903 times
Logarithmic scaling:
2_Logarithmic.png
2_Logarithmic.png (96.61 KiB) Viewed 42903 times
Expected: most of the image to be blue, few coloured lines at the top
Attachments
FormIntensityLog.zip
Source based on "Heat map" demo
(1.5 KiB) Downloaded 1247 times

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Thu Nov 05, 2015 9:43 am

View3D seems to work correctly, I will try to see how much time it would take me to switch over.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ArctionPasi » Fri Nov 06, 2015 10:35 am

Hi,

set grid.PixelRendering = False.

PixelRendering uses a bitmap (texture) directly composes from source data, and it doesn't have any logarithmic translation. It is just evenly spaced grid.

By setting PixelRendering = false, the grid coordinates are applied with a logarithmic translation.

We are sorry for the confusion, but currently there's no way to make PixelRendering = True work with logarithmic spacing of data.
LightningChart Support Team, PT

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Fri Nov 06, 2015 12:59 pm

Confirm, disabling PixelRendering works. Thank you.

Could you please add this kind of information to the documentation?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ArctionPasi » Fri Nov 06, 2015 3:16 pm

Absolutely, we added this note in PixelRendering property remarks in v.6.5.5 assembly pack that was just released.

Also updated User's manual http://arction.com/download/lightningch ... manual.pdf, regarding this.
LightningChart Support Team, PT

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Wed Feb 03, 2016 1:49 pm

There seems to be an issue with the combination of AutoAdjustMargins = true and LabelsNumberFormat = "g"
logaxis_1.png
logaxis_1.png (44.46 KiB) Viewed 42551 times
logaxis_2.png
logaxis_2.png (43.49 KiB) Viewed 42551 times
It looks like the default number format is used to calculate the width of the axis instead of the provided one.
By default, all values below 0.1 would be 0.0, and above 1 zeroes are added (e.g. 10000000).

Note that number labels and AxisLabel are overlapping, which does not happen with the default configuration.

I added a sample project which reproduces the problem.
Attachments
AL_LogAutoScale.zip
Sample code
(11.47 KiB) Downloaded 1114 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ArctionPasi » Wed Feb 03, 2016 2:21 pm

Please set
axis.AutoFormatLabels = false;

Then the LabelsNumberFormat applies and margin is resized correctly.
LightningChart Support Team, PT

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Wed Feb 03, 2016 2:51 pm

I changed line 167 of Form1.cs in my sample code. That does make it better, but...

After each ResetZoom (via mouse), the axis is scaled correctly. Zooming or panning will cause a resize that has too much space:
logaxis_3.png
logaxis_3.png (45.41 KiB) Viewed 42549 times
(Lightning Charts 6.5.6)

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ArctionPasi » Thu Feb 04, 2016 4:18 pm

OK, there is problem. Fix will be in the next assembly pack in a month. We haven't prepared for a use case like this.

Meanwhile, you may want to disable automatic margins and calculate the margins yourself with aid of chart.MeasureText method.
LightningChart Support Team, PT

User avatar
ArctionNikolai
Posts: 38
Joined: Fri Feb 05, 2016 11:37 am
Location: Finland
Contact:

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ArctionNikolai » Wed Feb 10, 2016 3:01 pm

ahe wrote:I changed line 167 of Form1.cs in my sample code. That does make it better, but...

After each ResetZoom (via mouse), the axis is scaled correctly. Zooming or panning will cause a resize that has too much space:
The attachment logaxis_3.png is no longer available
(Lightning Charts 6.5.6)
Good evening, this problem was fixed and will be included in the next assembly pack. It was tested with your attached project with name "AL_FontSize".
Capture.PNG
Capture.PNG (44.29 KiB) Viewed 42465 times
We apologize for inconvenience.
Best regards,
Nikolai Arsenov
Software developer
Arction Ltd
Microkatu 1, 70210 Kuopio, Finland

ahe
Posts: 51
Joined: Tue Aug 11, 2015 4:33 pm
Location: Düsseldorf, DE

Re: ViewXY,IntensityGrid - logarithmic Y axis

Post by ahe » Wed Feb 24, 2016 2:34 pm

After one of our testers notified me, I was able to reproduce this odd behaviour with my sample application (AL_FontSize):
Bug_LogAxis_Drag.png
Bug_LogAxis_Drag.png (131.06 KiB) Viewed 42245 times
Same with 6.5.6 and 6.5.7

--Andreas

Post Reply