Jump to content
Software FX Community

how to remove Left, Top and Right borders?


Recommended Posts


if there is no Y axis ploted on the chart, you cannot put a line on the base. I tried to imitate the chart proposed. Please check the code snippet below. Copy this in the load method of your application. Let me know if this works for you.

chart1.Gallery = Gallery.Gantt;   chart1.Data.Series = 2;   chart1.Data.Points = 3;   chart1.Data[0, 0] = 10;   chart1.Data[0, 1] = 20;   chart1.Data[0, 2] = 30;   chart1.Data[1, 0] = -10;   chart1.Data[1, 1] = -20;   chart1.Data[1, 2] = -30;   chart1.LegendBox.Visible = false;   chart1.AllSeries.PointLabels.Visible = true;   chart1.AxesStyle = AxesStyle.None;   CustomGridLine cg = new CustomGridLine(0,string.Empty);   cg.Color = Color.Gray;   cg.Width = 1;   chart1.AxisY.CustomGridLines.Add(cg);   chart1.AxisY.Step = 5;     chart1.AxisY.Grids.Major.Visible = false;   chart1.AxisY.Grids.Minor.Visible = false;   chart1.AxisX.Grids.Major.Visible = false;   chart1.AxisX.Grids.Minor.Visible = true;   Pane pane = new Pane();   chart1.Panes.Add(pane);   pane.Separation = 0;   chart1.Series[1].Pane = pane;   pane.AxisY.Grids.Major.Visible = false;   pane.AxisY.Grids.Minor.Visible = false;   pane.AxisY.Step = 5;   chart1.AxisX.Style |= AxisStyles.HideText;   chart1.AxisY.Line.Style = System.Drawing.Drawing2D.DashStyle.Solid;   chart1.AxisY.Line.Width = 2;   chart1.AxisY.Line.Color = Color.Gray;

Link to comment
Share on other sites


The code snippet you provided produces the attached chart. As you can see, the chart is missing the BASELINE. In fact, I think that, without even adding a new pane as in your code, simply setting AxesStyle.None produces the same result as your code does.

This has to be possible since the desrired chart I posted in the beginning was done by previous version of ChartFX.

I think we are missing a few properties here and there. Please continue to help me out here. I appreciate your help.



Link to comment
Share on other sites

 Hi Sam,

This is what is happening: the chart type is Gantt, so the Axis Y change position with Axis X in order to move the bars horizontally. This means the the zero position of X axis belongs to the first bar. If you want to put for example a custom gridline to zero position on Axis X, this will put it on top of the bar. So custom gridlines will not solve the issue. Then, In Chart FX 7, you cannot draw lines if there is no axis showed on the chart. So in your case, you need that the X axis is not showed, so no lines could be draw.

What i think that might help you is to use an annotation object, but this is a work around. Yo have to calculate the px coordinates of the position Y axis in order to draw and annotation line there.

 I apologize for the inconvenient since this is a chart limitation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...