I have a chart (see below) where my orange line should go straight throught the x axis but it is ending on a point, is there any way to stop this happening?
I assume it is something to do with the points on my x axis?
Thanks
If you have a point below zero set the RangeType (custom), RangeMin and RangeMax in order to make them all visible such as:
ultraChart1.Axis.X.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;ultraChart1.Axis.X.RangeMin = -5;ultraChart1.Axis.X.RangeMax = 10;
Please note that setting a RangeMin below zero will move the X axis to the specified (below zero) coordinate.
Let me know if this approach works for you.
Hi
I tried your suggestion but I don't know If i explained myself correctly!
I need the yellow line to be a continous straight line through the x axis!
Is there any way to achieve this, stop the line changing its direction at month 1?
If you also would like to have a line on zero coordinate, while moving X axis below zero, you can handle FillSceneGraph event and draw a line there, here is how:
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
{
IAdvanceAxis x = (IAdvanceAxis)e.Grid["X"];
IAdvanceAxis y = (IAdvanceAxis)e.Grid["Y"];
if (x != null)
int target = 0;
int yVal = (int)y.Map(target);
int xStart = (int)x.Map(0);
int xEnd = (int)x.Map(5);
Line line = new Line(new Point(xStart, yVal), new Point(xEnd, yVal));
line.PE.Stroke = Color.Red;
line.PE.StrokeWidth = 3;
e.SceneGraph.Add(line);
}