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.
Unfortunately, activation email could not send to your email. Please try again.

ChartControl border goes off...is it a Bug???

Thread ID:

Created:

Updated:

Platform:

Replies:

33276 Aug 17,2005 04:52 AM Sep 6,2005 02:14 AM Windows Forms 5
loading
Tags: Chart
Atanu Podder
Asked On August 17, 2005 04:52 AM

Hi, In a form, 1. Put a Chart Control. 2. Goto "InitializeComponent" menthod of the form. 3. Say this.chartControl1.PrimaryXAxis.DrawGrid = false; this.chartControl1.PrimaryYAxis.DrawGrid = false; 4. Now the look at the chart area of the chart control, the borders around it is not there. 5. Should the "draw grid = false" make the borders invisible?. 6. Is there a way to make the borders visible while setting the drawgrid to false. Thanks, Atanu

Administrator [Syncfusion]
Replied On August 17, 2005 11:04 AM

Hi Atanu, The "borders" you see initially are the grid lines at the ends of the chart rendering area. That''s why the borders are not displayed when the grid lines are turned off. To get a border for the ChartArea, you can use the BorderStyle property of the ChartArea: this.chartControl1.ChartArea.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; This border will look different as it includes the axes area also. Thanks, Davis

Atanu Podder
Replied On August 17, 2005 01:26 PM

Okie, but suppose i say the drawgrid of Yaxis is false, that should mean the vertical border should not be drawn and if I say drawgrid of XAxis false then horizntal border should not be drawn. And if I say drawgrid false for both of them then none of the borders should be drawn. But the chart borders are drawn if any one may it be Xaxis or Yaxis has drawborder true, So, I am little confused here how is the drawgrid property of YAxis draws the horizontal border (TopBorder) of the Chartarea? And also, is it possible to draw the borders in a different color and the grids insode the chart in different color? I mean I want to have a different colored border which should not look similar to the grid line in the chart... Thanks, Atanu

Administrator [Syncfusion]
Replied On August 18, 2005 02:45 PM

Hi Atanu, The X axis grid lines are drawn for each major tick and also for the left edge - this is on top of the Y axis line itself. Since the Gridline is a 1 pixel back line and the Y axis is also a 1 pixel back line, the difference is not visible. Please see the image below. It shows the X axis gridlines clearly by setting a different color and thickness to them: this.chartControl1.PrimaryXAxis.GridLineType.ForeColor = System.Drawing.Color.IndianRed; this.chartControl1.PrimaryXAxis.GridLineType.PenType = System.Drawing.Drawing2D.PenType.PathGradient; this.chartControl1.PrimaryXAxis.GridLineType.Width = 5F; You can differentiate the grid lines by setting the above properties. Thanks, Davis

Atanu Podder
Replied On August 22, 2005 12:58 PM

Hi, Davis, Thanks for the reply, In the example shown above, I just wanted to know, as we have mentioned the grid line color of XAxis is Red, then how the all the Right border and the top border is drawn with the same color. And also, after setting the Xaxis grid line type, if i set the y axis grid line type to some other color, then again the top border and the right border becomes the new color. So , how grid line type of one axis is modifying both the borders, horzontal as well as vertical? Thanks, Atanu

Atanu Podder
Replied On September 6, 2005 02:14 AM

Just a reminder... A reply is still awaited ...

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.

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.

;