Reputation: 10755
I am using asp.net 3.5 chart control and for showing message when there is no data present . I have used this method
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 ...
Upvotes: 0
Views: 1232
Reputation: 15971
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.
Upvotes: 1