?
Solved

MSChart stripline text covered by column

Posted on 2011-10-18
3
Medium Priority
?
2,249 Views
Last Modified: 2012-08-13
Programming in Viusal studio 2010 C#, I added mschart in my application and added stripline to chart, but the text of stripline is covered by column. I had tried set text position to far or set Axis X minimum size to -1, the result is still covered or shows ugly.
Is it possible to move stripline text to left side of Axis Y or change setting to let text not covered?
Thanks for any suggestion.

//Define the chart area
            ChartArea chartArea = new ChartArea();
            chartArea.Name = "chartArea"+chartID.ToString();
            //define up stripline
            StripLine sl1 = new StripLine();  
            sl1.BackColor = System.Drawing.Color.Red;  
            sl1.IntervalOffset = 4.25;  
            sl1.StripWidth = 0.001;  
            sl1.Text = "4.25";  
            sl1.TextAlignment = StringAlignment.Near;
            chartArea.AxisY.StripLines.Add(sl1); 
            //define low stripline
            StripLine sl2 = new StripLine();
            sl2.BackColor = System.Drawing.Color.Red;
            sl2.IntervalOffset = 2.74;
            sl2.StripWidth = 0.01;
            sl2.Text = "2.74";
            sl2.TextAlignment = StringAlignment.Near;//change near to far, text is still covered
            chartArea.AxisY.StripLines.Add(sl2);
            //chartArea.AxisX.Minimum = -1;//looks ugly in image

Open in new window

stripline.jpg
0
Comment
Question by:snowycanada
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
dexterrajesh earned 1500 total points
ID: 36992298
hi,

I tried to bring the stripline text front.. unfortunately I can't. How about setting the TextOrientation property as like,

sl1.TextOrientation = TextOrientation.Rotated270;//Display text in vertical from bottom to top

this should display the text completely

hope this helps for you
0
 

Author Comment

by:snowycanada
ID: 37034388
seems no more suggestion, i had to increase range at X axis ( max. 12 ) and put text at right side, so text can display completely.
Thanks for dexterrajesh. I just fell vertical text is hard for user to read.
0
 

Author Closing Comment

by:snowycanada
ID: 37034422
is a solution, but not be convenience for reading
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question