Group: Forum Members
Last Active: 10 Years Ago
Posts: 16,
Visits: 1
|
My problem is that the data label is variable length. but I want to keep it in the bottom right of the chart. How to align Data label to just the right of chart? thanks, -Jacky
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Is this a series data label or a NLabel panel? Usually there are more than one data labels in a chart, so this is a little bit confusing.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 10 Years Ago
Posts: 16,
Visits: 1
|
It is a NLabel.
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hi Jacky, You have to change the content alignment of the label - in this case you need top left alignment. The following code shows a label positioned at the bottom right side of the control, 5 points from the chart right and bottom edges. NLabel label = new NLabel(); label.Text = "Some Label Text"; label.ContentAlignment = ContentAlignment.TopLeft; label.Location = new NPointL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(100, NRelativeUnit.ParentPercentage)); label.UseAutomaticSize = true; label.Margins = new NMarginsL(5, 5, 5, 5); nChartControl1.Document.RootPanel.ChildPanels.Add(label);
Hope this helps - let us know if you have any questions or comments.
Best Regards, Nevron Support Team
|