Menu

#8 Custom Display of Coordinates

open
nobody
General (9)
5
2007-05-30
2007-05-30
Anonymous
No

A user may want to display Co-ordinates in custome format ... say for example in a candle plot one may want to display the Open High Low Close points in the tool tip.

I tried in this way but not that good

in CandlePlot.CandleDataAdapter

public string GetCoordinateString(double x, uint stickwidth)
{
string s = "";
for (int i = 0; i < this.Count-1; i++)
{
PointOLHC pnt = this[i];
double x1 =this[i].X;
double x2 = this[i+1].X;
if (x>x1 && x< x2)
{
s = "Open\t" + pnt.Open.ToString("{0.00}") + "\nHigh\t" + pnt.High.ToString("{0.00}") + "\nLow\t" + pnt.Low.ToString("{0.00}") + "\nClose\t" + pnt.Close.ToString("{0.00}");
break;
}
}
return s;
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.