We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Horizontal ChartThinStripLine

Thread ID:

Created:

Updated:

Platform:

Replies:

35537 Oct 3,2005 02:23 PM UTC Oct 5,2005 02:19 PM UTC WinForms 2
loading
Tags: Chart
Administrator [Syncfusion]
Asked On October 3, 2005 02:23 PM UTC

Hi, I am trying to create a thin ChartStripLine(Basically trying to place a horizontal line of equal width to those in my line chart). Right now I set my values as follows: MeanStrip.Enabled = true; MeanStrip.Vertical = false; MeanStrip.StartAtAxisPosition = true; MeanStrip.Offset = 0.02; MeanStrip.Width = 0.005; MeanStrip.Period = 10000; MeanStrip.Text = ""; MeanStrip.Font = new Font(MeanStrip.Font.FontFamily.Name, 18); MeanStrip.TextColor = Color.CadetBlue; MeanStrip.Interior = new BrushInfo(100, new BrushInfo(GradientStyle.Vertical, Color.Red, Color.Red)); chartcontrol.PrimaryYAxis.StripLines.Add(MeanStrip); I output my chartcontrol as an image, which should not be a problem. I believe the problem is because my axis values are generated dynamically and can range from anywhere from -200 to 1000. Because of this, when I generate my chart I use the "chartcontrol.RangeType = ChartAxisRangeType.Auto", and the first problem is that the ChartStripLine.Width is based on the internal chart values, not the number of pixels like a series line. The second problem is based with the offset. I can have negative values, so sometimes the YAxis shows negative values too. The ChartStripLine.Offset begins at the lowest YAxis value and NOT zero. So for this situation, I think I will either need to be able to set it to start off zero, or to figure out how to get the lowest value on the YAxis when ChartAxisRangeType is Auto. Thanks for your help. Musters

Administrator [Syncfusion]
Replied On October 4, 2005 07:59 PM UTC

This thread may be of interest to you: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=34133 It includes a sample that creates a vertical line on a position on the x-axis. Should be easily modifed to a horizontal line. Min and max values you find in the Range object, and are set after the autorange is applied (after adding series i think): PrimaryYAxis.Range.Min PrimaryYAxis.Range.Max Rune >Hi, I am trying to create a thin ChartStripLine(Basically trying to place a horizontal line of equal width to those in my line chart). > >Right now I set my values as follows: > >MeanStrip.Enabled = true; >MeanStrip.Vertical = false; >MeanStrip.StartAtAxisPosition = true; >MeanStrip.Offset = 0.02; >MeanStrip.Width = 0.005; >MeanStrip.Period = 10000; >MeanStrip.Text = ""; >MeanStrip.Font = new Font(MeanStrip.Font.FontFamily.Name, 18); >MeanStrip.TextColor = Color.CadetBlue; >MeanStrip.Interior = new BrushInfo(100, new BrushInfo(GradientStyle.Vertical, Color.Red, Color.Red)); >chartcontrol.PrimaryYAxis.StripLines.Add(MeanStrip); > >I output my chartcontrol as an image, which should not be a problem. I believe the problem is because my axis values are generated dynamically and can range from anywhere from -200 to 1000. Because of this, when I generate my chart I use the "chartcontrol.RangeType = ChartAxisRangeType.Auto", and the first problem is that the ChartStripLine.Width is based on the internal chart values, not the number of pixels like a series line. The second problem is based with the offset. I can have negative values, so sometimes the YAxis shows negative values too. The ChartStripLine.Offset begins at the lowest YAxis value and NOT zero. So for this situation, I think I will either need to be able to set it to start off zero, or to figure out how to get the lowest value on the YAxis when ChartAxisRangeType is Auto. > >Thanks for your help. >Musters

Geetha M [Syncfusion]
Replied On October 5, 2005 02:19 PM UTC

Hi Musters, We regret for the delayed response. Please refer the attached sample. In the sample ChartAreaPaintEvent Handler is used to draw the stripline with Pen object so that the width is maintained in pixels. F35537_792.zip I hope this helps you. Please let me know if you have any questions. Regards, Geetha.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;