Forum > TAChart
Tchart legend font size setting?
(1/1)
stephanweber:
Hi,
the legend seems to use font size = 0, so it is quite large. How can I made the legend smaller. I found no size scale factor and also no place to change the font size. Also changing the chart font sizes seems to have no impact.
This is a simple thing and should work easy, but it looks not...
Does anybody know how to get a more compact legend?
Bye Stephan
wp:
Size 0 in Lazarus is always the default font size, which is the size of the system font. You certainly can use any different size for Chart.Legend.Font.Size (which is in typographic points then (1pt = 1/72 inch)).
If you want to know the size of the default font you can call GetFontData from the Graphics unit. It returns a TTextMetric record with the font height as element. Font height, however is in pixels, and you must do a small calculation to get the size in points:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var metric: TTextMetric; fontSize: Integer;begin metric := GetFontData(Font.Handle); fontSize := round(-metric.Height/Screen.PixelsPerInch*72);...
Navigation
[0] Message Index