I set up the far margin of the x-axis so I can have some space to create my own legend and it would not colide with the data.
The problem that I have now is that the gridlines for the y-axis go beyond the length of the x-axis. How can I make the gridlines to go only as far as the x-axis go.
try handling the FillSceneGraph method with some code like this:
private void ch_FillSceneGraph(object sender, FillSceneGraphEventArgs e) { Axis xAxis = e.Grid["X"] as Axis; Axis yAxis = e.Grid["Y"] as Axis; foreach (Primitive currentPrimitive in e.SceneGraph) { Line currentLine = currentPrimitive as Line; if (currentLine != null) { if (currentLine.p1.Y == currentLine.p2.Y) { // must be the x axis or an x gridline currentLine.p1.X = xAxis.axisLineStart.X; currentLine.p2.X = xAxis.axisLineEnd.X; } } } }