I am using asp.net 3.5 chart control and for showing message when there is no data present . I have used this method
我正在使用asp.net 3.5图表控件,在没有数据时显示消息。我用过这种方法
if (dsAllDepartment.Tables[0].Rows.Count == 0)
{
System.Web.UI.DataVisualization.Charting.TextAnnotation annotation =
new System.Web.UI.DataVisualization.Charting.TextAnnotation();
annotation.Text =ddldepartment.SelectedItem.Text+" विभाग के लिए डाटा उपलब्ध नहीं है";
annotation.X = 5;
annotation.Y = 25;
annotation.Font = new System.Drawing.Font("Arial", 12);
annotation.ForeColor = System.Drawing.Color.Red;
chAllDepartmentAllActivity.Annotations.Add(annotation);
}
its working but problem is when text too long its cross the chart instead of appearing in two lines ...
它的工作,但问题是当文本太长它的横切图表,而不是出现在两行……
1 个解决方案
#1
1
If you are OK with explicit line breaks in your text, try inserting \n
in "strategic" places. This way you will at least be able to control your manually written text.
如果你对文本中明确的换行符没有意见,可以尝试在“战略”位置插入\n。这样你至少可以控制你的手写文字。
#1
1
If you are OK with explicit line breaks in your text, try inserting \n
in "strategic" places. This way you will at least be able to control your manually written text.
如果你对文本中明确的换行符没有意见,可以尝试在“战略”位置插入\n。这样你至少可以控制你的手写文字。