Hi,
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();
if (m_bUpdating)
return;
m_bUpdating = true;
if (label != null)
{
EnableControls(true);
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_ChartControl.Refresh();
}
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)
{
if (m_Chart.Axis(StandardAxis.PrimaryY).Text.ShowEditor())
{
m_ChartControl.Refresh();
}
}
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.
Ghislain
Technical Support and software developer
Xceed Software Inc.
Knowledge Base : http://xceed.com/kb/
Update Center : http://xceed.com/updates/
Documentation Center : http://xceed.com/doc/
For everything else, there is Google