Question

Is there a way I can set Font Height in Steema Teechart Graphics 3D? The Closest I could find was tchart.graphics3d.fontheight , but it gets the font height , does not set it, so is there a way I can set the font height?

Thank you so much

Was it helpful?

Solution

You cannot change only the FontHeight, because you are only allowed get the FontHeight or FontWidth to consult their values. Therefore, if you want change the size (height and width) of font you must assign a value to font size as do in next lines of code:

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private void InitializeChart()
        {
            tChart1.AfterDraw += new PaintChartEventHandler(tChart1_AfterDraw);
        }

        void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            g.Font.Size = 25; 
            g.TextOut(100, 150, "TeeChartFor.Net");
        }

I hope will helps.

Thanks,

OTHER TIPS

The Chart of TeeChart to default have a gradient in its background. If you want change the color, previously you must disable the gradient of backround. You can do something as next lines of code:

private void InitializeChart()
{
    tChart1.Panel.Gradient.Visible = false;
    tChart1.Panel.Color = Color.Aqua;

}

I hope will helps.

Thanks,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top