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?
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;
Code: Select all
_chart.ViewXY.XAxes.LabelsFont = new Font(_chart.ViewXY.XAxes.LabelsFont.FontFamily, 10, FontStyle.Regular);
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
Using the properties editor go to ViewXY -> Annotations -> Annotation -> 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 ????
- LightningChart issue.zip
- (9.47 KiB) Downloaded 77 times
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.
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.