Page 1 of 1

Circular Gauge Alignment

Posted: Thu Feb 21, 2019 11:31 am
by 21085269
Good morning,
I am working on a circular gauge with an annotation.

I want the chart left aligned to use the rest of area to put some annotations.
Attached my TChart area print.
What I mean is to put the gauge at left, leaving the whole area of chart freed for notes.

Is it possible to left align the chart?

Re: Circular Gauge Alignment

Posted: Fri Feb 22, 2019 7:57 am
by Christopher
Hello!
Sofia Moraes wrote:
Thu Feb 21, 2019 11:31 am
Is it possible to left align the chart?
Yes, yes it is. You will be able to use the GetAxesChartRect event to define the rectangle in which you want to draw the CircularGauge series e.g.:

Code: Select all

        public Form1()
        {
            InitializeComponent();

            tChart1.Series.Add(typeof(CircularGauge)).FillSampleValues();

            tChart1.GetAxesChartRect += TChart1_GetAxesChartRect;
        }

        private void TChart1_GetAxesChartRect(object sender, Steema.TeeChart.GetAxesChartRectEventArgs e)
        {
            var rect = e.AxesChartRect;
            rect.Width = 200;
            rect.X = 200;

            e.AxesChartRect = rect;
        }