Skip to content

Replies

0
Naresh Nichani
Naresh Nichani answered on Jan 31, 2017 11:23 AM

Hi,

Thanks.

On a different topic I create my X-Axis as follows.

CategoryXAxis xAxis = new CategoryXAxis
{
Label = xFieldEnumName,
LabelFontSize = 10,
LabelsVisible = true,
Interval = 1,
//LabelExtent = 90,
//LabelAngle = 0,
DataSource = dt,
Title = xField.DisplayName,
LabelLocation = AxisLabelsLocation.OutsideBottom

};

The Labels are visible below the axis as expected. However really long labels get cut off on a column chart. I would like to see more of the label. Is there a wrap function? I tried a LabelAngle = 320 – however that takes too much space at times.

0
Naresh Nichani
Naresh Nichani answered on Jan 24, 2017 10:19 AM

Hi,

Thanks.

First can let me know or point me to an article on the differences between UltraChart and UltraDataChart. Which is the better one to use? 

I tried the following code – 

Control series1_TooltipContentUpdating(object sender, ChartTooltipContentEventArgs e)
{

Control ctl = e.CurrentContent;

if (ctl != null && e.DataContext.Item != null)
{
   ctl.SuspendLayout();
   SetControlText(ctl, e.DataContext.Item);
   ctl.ResumeLayout();
}
return ctl;

}

private void SetControlText(Control ctl, object item)
{
foreach (Control ctl1 in ctl.Controls)
{
Control ctl2 = ctl1;
if (ctl2.Text.Equals(string.Format("{0}:",_yFieldName)))
{
ctl2.Text = ctl2.Text.Replace(_yFieldName, _yFieldDisplayName);
}
SetControlText(ctl2, item);
}
}

This seems to find the text and replace it. However the label displayed is blurry on the screen.

Regards,

Naresh

D-Tools Inc.