Hi ,
I have modify the acis set with this code on the fillscengraph :
// Create axes foreach (Primitive item in e.SceneGraph) { if (item.GetType() == typeof(Line) && ((Line)item).lineStyle.DrawStyle != LineDrawStyle.Dash) { if (((Line)item).p1.X == ((Line)item).p2.X) { ((Line)item).p1.Offset(this.Chartquadrant.Width / 2 - 50, 0); ((Line)item).p2.Offset(this.Chartquadrant.Width / 2 - 50, 0); } else { ((Line)item).p1.Offset(0, -360); ((Line)item).p2.Offset(0, -360); } } Text pl = item as Text; if (pl != null && ((Text)item).labelStyle.Orientation == TextOrientation.VerticalLeftFacing) { ((Text)item).bounds = new Rectangle(((Text)item).bounds.X + 0, ((Text)item).bounds.Y - (360), ((Text)item).bounds.Width, ((Text)item).bounds.Height); } if (pl != null && ((Text)item).labelStyle.Orientation == TextOrientation.Horizontal) { ((Text)item).bounds = new Rectangle(((Text)item).bounds.X + this.Chartquadrant.Width / 2 - 50, ((Text)item).bounds.Y, ((Text)item).bounds.Width, ((Text)item).bounds.Height); } }According to some sample I can put a text wherever I want on the graph by :
// name axes IAdvanceAxis xAxis = (IAdvanceAxis)e.Grid["X"]; IAdvanceAxis yAxis = (IAdvanceAxis)e.Grid["Y"]; if (xAxis == null || yAxis == null) return; Text text = new Text(); text.PE.Fill = Color.Red; text.bounds = new Rectangle((int)xAxis.Map(8), (int)yAxis.Map(10), 100, 20); text.SetTextString("Sample Text");
But the sample text is not visible, can you tell me what is wrong ?
Thanks
Hello eltorfuerte,
Looking at the provided information, I suppose that somewhere in your code you are using these properties:
axisY.RangeType = AxisRangeType.Custom;
axisY.RangeMin = -50;
axisY.RangeMax = 50;
To acheive desired behavior you could try to set
axisY.RangeType = AxisRangeType.Automatic;
Let me know if you think that I misunderstand your scenario or if you have other questions.
Regards
Ok, If I plot something on your axis with let say the maximum point at y = 5 and the minimum point at y = -2 I will still see the scale of the Y axis from -50 to +50. Instead of that I want to see it from -10 to 10. So how to make the choice a the axis scale dynamic ?
I`m not sure that I understand your question / scenario. Could you please try to explain more deeply.
Thanks Georgi , this works perfectly !
Additional question:
I don't know what will be the boundary of my graph before I plot it so how can I set the limits of my axis more dynamic ?
This is the sample