size/bottom left coordinate of graph


Author
Message
Daniel Csimszi
Daniel Csimszi
Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)
Group: Forum Members
Posts: 61, Visits: 35
Hi,

I need to insert extra graphical objects on my graph. To make it look nice I need to know the coordinate of the bottom left corner. Could you please tell me how can I retrieve that data? Is it possible to know size of the graph?
My graph is set to Dock: Fill so it re-sizes, that is why I need to know the proper size/coordinates of the graph.

Please find attached a picture explaining the situation.

Thank you for your help in advanced
Daniel
Attachments
coordinate.png (164 views, 8.00 KB)
Reply
Daniel Csimszi
Daniel Csimszi
Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)
Group: Forum Members
Posts: 61, Visits: 35
Hi,

Should have waited 5 min before my last port. Previously I been have advised that I can for the graph to recalculate itself, using that it seems to be working, it is not perfect but the best what I could do just now, so it might just do. This is the code:

private void nChartControl1_SizeChanged(object sender, EventArgs e)
{
nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);

NPointF p = nChartControl1.Charts[0].PlotArea.LeftBottom;
Console.WriteLine("Chart X: " + p.X + "Chart Y: " + p.Y);
panel2.Location = new Point(Convert.ToInt32(p.X), Convert.ToInt32(p.Y));
}

Thank you for your help
Daniel
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search