I am trying to have the xCoordinate in OnRender().
I have the following code:
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
base.OnRender(chartControl, chartScale);
DateTime timeToCheck = new DateTime(2023, 5, 24, 11, 0, 0);
int xCoordinate = chartControl.GetXByTime(timeToCheck);
Print(xCoordinate);
}
This code is returning negative high numbers in absolute values, what is surprising for me. I have -14055.
I have also tried with
DateTime timeToCheck = new DateTime(Time[0]);
How can I have the x coordinate in OnRender() using the function GetXByTime()? What is wrong in my code?
I would appreciate any help.
Best regards

Comment