GetAxisLabel behaviour issue.
Posted: Wed Oct 29, 2008 6:40 am
Hi .
I would like to limit the label size in the bottom axis. for this I handle the
GetAxisLabel event
Chart.GetAxisLabel += OnChartGetAxisLabel;
protected void OnChartGetAxisLabel(object sender, GetAxisLabelEventArgs e)
{
if (((Steema.TeeChart.Axis)sender).Equals(Chart.Axes.Bottom))
{
if (e.LabelText.Length > 15)
{
e.LabelText = string.Format("{0}{1}", e.LabelText.Substring(0, 15), "...");
}
}
}
HOWEVER I noticed that although the label is cut properly , the graph itself is drawn must smaller becuase it seems to the think that the labels are longer and so what we get is alot of empty space at the bottom .
see image.
I would like to limit the label size in the bottom axis. for this I handle the
GetAxisLabel event
Chart.GetAxisLabel += OnChartGetAxisLabel;
protected void OnChartGetAxisLabel(object sender, GetAxisLabelEventArgs e)
{
if (((Steema.TeeChart.Axis)sender).Equals(Chart.Axes.Bottom))
{
if (e.LabelText.Length > 15)
{
e.LabelText = string.Format("{0}{1}", e.LabelText.Substring(0, 15), "...");
}
}
}
HOWEVER I noticed that although the label is cut properly , the graph itself is drawn must smaller becuase it seems to the think that the labels are longer and so what we get is alot of empty space at the bottom .
see image.