TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
David N.
- Newbie

- Posts: 8
- Joined: Wed May 17, 2023 12:00 am
Post
by David N. » Thu Jun 22, 2023 8:28 am
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.
Thank you.
-
Attachments
-

- Indexation.png (37.35 KiB) Viewed 13072 times
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Post
by Christopher » Thu Jun 22, 2023 4:15 pm
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 (14.12 KiB) Viewed 13063 times
You want the third bar6 bar with value '5' to be directly over the '2' of the X axis?