User (Old forums)MemberJuly 1, 2009 at 3:25 pmPost count: 23064
I got a quick question. I am using a LineSeries chart at the moment and am supplying my own text labels for the xAxis ( xAxis.DimensionScale.AutoLabels = false;). I get my labels rendering just fine which is great. The issue I am having is that my labels are kinda long, so they tend to overwrite each other.
How can I get them to display vertically with a bit of a tilt as is common in such situations? Having them display horizontally right now is not working very well.
Imported from legacy forums. Posted by Nazeeh (had 2643 views)User (Old forums)MemberJuly 13, 2009 at 8:14 pmPost count: 23064
Any body has a solution to this ? I am running into this same issue .
Imported from legacy forums. Posted by Vihang (had 1149 views)User (Old forums)MemberJuly 24, 2009 at 1:27 pmPost count: 23064
If you launch the Xceed Chart Explorer for .NET (located in “C:\Program Files\Xceed Components\Bin\.NET\Xceed Chart Explorer.exe” by default), and if you open the “Texts and Labels” chapter and if you click on “General”, you will see that you can add a new label and give it the orientation you want. You can then click on the C# Code (or VB.NET Code).
private void UpdateLabelFromControls()
ChartLabel label = GetSelectedLabel();
m_bUpdating = true;
if (label != null)
label.HorizontalMargin = HorizontalMarginScrollBar.Value;
label.VerticalMargin = VerticalMarginScrollBar.Value;
label.TextProps.HorzAlign = (HorzAlign)HorizontalAlignComboBox.SelectedIndex;
label.TextProps.VertAlign = (VertAlign)VerticalAlignComboBox.SelectedIndex;
label.TextProps.Orientation = OrientationScrollBar.Value;
label.TextProps.Backplane.Visible = HasBackplaneCheckBox.Checked;
label.TextProps.Backplane.Style = (BackplaneStyle)ShapeComboBox.SelectedIndex;
m_bUpdating = false;
So the important, here, is label.TextProps.Orientation = OrientationScrollBar.Value;
Okay, this for a normal label. If we are looking for the axes labels, then, still in the Xceed Chart Explorer for .NET,
go to All Examples -> Axes -> General -> Appearance and, from there, click on the “Axis Texts Properties” at the right.
This is what is getting called :
private void TextsFontButton_Click(object sender, System.EventArgs e)
So if you set:
m_Chart.Axis(StandardAxis.PrimaryY).Text.Orientation = 45.0f;
you will be setting the Y axis text orientation 45 degrees counterclockwise.
Imported from legacy forums. Posted by Ghislain (had 2858 views)
- You must be logged in to reply to this topic.