Page 1 of 1

Indexation issue with TeeChat for .Net

Posted: Thu Jun 22, 2023 8:28 am
by 15695876
Hello,

I am assigning each bar to its position, the problem i have is that the bars do not center to the axis (variable name+date), i know about a property called indexation, but i do not really know how to use it in order to center bars to the variable at the axis. Below you can see my current state and at the right, the one i would like to achieve.
Image

Thank you.

Re: Indexation issue with TeeChat for .Net

Posted: Thu Jun 22, 2023 4:15 pm
by Christopher
Hello,
David N. wrote:
Thu Jun 22, 2023 8:28 am
am assigning each bar to its position, the problem i have is that the bars do not center to the axis (variable name+date), i know about a property called indexation, but i do not really know how to use it in order to center bars to the variable at the axis. Below you can see my current state and at the right, the one i would like to achieve.
Just to confirm: when running this code:

Code: Select all

        public Form1()
        {
            InitializeComponent();

            for (int i = 0; i < 6; i++)
            {
                var bar = new Bar(tChart1.Chart);

                if(i <= 2)
                {
                    bar.FillSampleValues(1);

                }
                else if(i >= 2 && i <= 4 )
                {
                    bar.FillSampleValues(2);

                }
                else if (i >= 4 && i <= 6)
                {
                    bar.FillSampleValues(3);
                }


                bar.MultiBar = MultiBars.Side;
            }
        }
Which gives me:
Screenshot from 2023-06-22 18-14-44.png
Screenshot from 2023-06-22 18-14-44.png (14.12 KiB) Viewed 11573 times
You want the third bar6 bar with value '5' to be directly over the '2' of the X axis?