Hi all,
I am working on a plot, when I am setting ScatterChart, I have trouble with the icon. For example, i am using SymbolIcon.Circle to paint the points, however, whenever the point touches the AxisX or AxisY, it seems that the point is being cut off and appears a part of the circle. somebody knows what happened or how to solve the issue. I just want all points are pointed as complete circles.
try using Axis Margins to allocate space for the sides of your circle... check the properties under Axis.X.Margins and Axis.Y.Margins
ok, thank you for your suggestion.
I tried to set Margin.Far.Value and Margin.Near.Value to respectively appreciate data, the problem i mentioned above has been solved.
However, there is another problem. the AxisX and AxisY will never joint since there are margins existing. there is a blank during between both Axises. How could i make the AxisX cross the AxisY at right angles.
Hope your further help!!
this is by design and there's no property to disable that space. however, if you handle the ChartDrawItem or FillSceneGraph event, you should be able to find the Line primitive and extend it as desired.
private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e){ IAdvanceAxis xAxis = e.Grid["X"] as IAdvanceAxis; IAdvanceAxis yAxis = e.Grid["Y"] as IAdvanceAxis; Rectangle chartLayerBounds = e.ChartCore.GetChartLayer().GetOuterBounds(); 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 = chartLayerBounds.Left; currentLine.p2.X = chartLayerBounds.Right; } else if (currentLine.p1.X == currentLine.p2.X) { // must be the y axis or a y gridline currentLine.p1.Y = chartLayerBounds.Bottom; currentLine.p2.Y = chartLayerBounds.Top; } } }}