Update to version 10

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
michel
Posts: 10
Joined: Wed Jun 29, 2016 3:34 pm

Update to version 10

Post by michel » Mon Nov 23, 2020 7:18 pm

All,

We've updated our Lightningchart from version 8.1 to 10. I had to make a couple of changes because of the updated API.
All seems to be working fine again.....however it seems like something changed in the font rendering. We're using Arial font
size 8.25 for our axis labels and in the old version fonts rendered correctly. The new version 10 renders fonts a lot smaller. Is this expected? Is there a work around for this or should we just increase font sizes?

Old
old.jpg
old.jpg (12.6 KiB) Viewed 4470 times
New
new.jpg
new.jpg (10.85 KiB) Viewed 4470 times

Arction_LasseP
Posts: 141
Joined: Wed Mar 27, 2019 1:05 pm

Re: Update to version 10

Post by Arction_LasseP » Tue Nov 24, 2020 9:20 am

Hello Michel,

We checked this issue and were able to reproduce it. In our tests the font size was reduced only in WinForms when creating the chart by dragging it from Visual Studio toolbox. This indicates a serialization issue with default fonts. We fixed many of these serialization cases in this release but there are still few left. We hope to get them fixed in the next release.

Possible workaround for this is to create the chart in code behind, not via toolbox. This should prevent all the possible serialization issues in WinForms.

Creating chart in code:

Code: Select all

            LightningChart _chart = new LightningChart();
            _chart.Parent = this;
            _chart.Dock = DockStyle.Fill;
Alternatively, you can change the font size of axis labels, titles etc. in code or in designer.

Code: Select all

_chart.ViewXY.XAxes[0].LabelsFont = new Font(_chart.ViewXY.XAxes[0].LabelsFont.FontFamily, 10, FontStyle.Regular);
Best regards,
Lasse

michel
Posts: 10
Joined: Wed Jun 29, 2016 3:34 pm

Re: Update to version 10

Post by michel » Tue Nov 24, 2020 11:52 am

Lasse,

It doesn't seem to be related to serialization. I've attached a VS project showing the issue.
This creates a new empty chart in code and adds a single annotation. After creating the chart it opens a
properties editor.

Using the properties editor go to ViewXY -> Annotations -> Annotation[0] -> TextStyle -> Font
It will show Arial, 6.1875pt although the font is set in code to Arial, 8.25pt.

Now set the font to Arial, Regular, 10 using the font picker from the properties editor.
The value in the property editor now changes to Arial, 7.3125pt ????
Attachments
LightningChart issue.zip
(9.47 KiB) Downloaded 302 times

Arction_LasseP
Posts: 141
Joined: Wed Mar 27, 2019 1:05 pm

Re: Update to version 10

Post by Arction_LasseP » Tue Nov 24, 2020 2:25 pm

Hello Michel,

Thank you for the test project.
You are correct, as it seems that there is a font size issue at least with Annotations unrelated to serialization. However, there is also a serialization issue, which can be avoided by creating the chart in code. This seems to be a different issue though than the one in your test project.

We need to investigate this further to see if there is in fact an error somewhere in our font creation code. Meanwhile, the only fix we see is to increase the font size.

Best regards,
Lasse

Arction_LasseP
Posts: 141
Joined: Wed Mar 27, 2019 1:05 pm

Re: Update to version 10

Post by Arction_LasseP » Mon Nov 30, 2020 10:42 am

Hello,

We found out that there in fact was an error in our code regarding font creation. We managed to fix this issue along with other font related issues. This fix will be included in our next release (LightningChart version 10.1), though its release date has not yet been decided.

Best regards,
Lasse

Post Reply