Replies: 4 comments
-
Same question here. Especially curious how to change the size. |
Beta Was this translation helpful? Give feedback.
-
Turns out there is a TextSize property for Axis, see example below:
The full example can be found here: I'm still not sure how to set the text alignment. |
Beta Was this translation helpful? Give feedback.
-
Finally, I thought I had to take a closer look at the source code. It looks like alignment is possible. There are HorizontalAlign and VerticalAlign properties on the LabelGeometry that is used in the Axis class but the default values are Align.Middle
and there is no implementation to set them in the Axis. However I guess they can be changed if you get labels Axis.LabelsPaint and then get geometries from LabelsPaint.GetGeometries(), then cast items to LabelGeometry and change the alignment. It might be necessary to reinitialize something after that. Anyway, all that are just guesses. I don't really need to change the alignment but if I do I would try to change the code, add new public properties to the Axis for alignment and use those properties values where AddGeometryToPaintTask is. Again, if I understand the logic right. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the guidance @alex4998, I will try to figure out the implementation as soon as possible. For now, to make the alignment less noticeable, I have applied String Format on the values using Labeler property as shown below:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I would like to align Y-axis text to the right (currently set to centre by default) and adjust font size, how can I do this?

Beta Was this translation helpful? Give feedback.
All reactions