I have one single value on a chart that looks like this:
But I want it to look like this:
I dont need a scale on the X-axis, since I only have one single value, but I want the line to run over the entire chart.
The Y-axis should have different scale depending on the value och the line.
Thank you,
Mathias
MMP
Just one simple value
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mathias,
You have several options for this:
1) Adding two points for the line.
2) Using Null points.
2) Drawing a line in the canvas.
3) Using ColorLine tool to draw the line as:
Regarding the left (Y) axis it scales authomatically by default or use SetMinMax as in the example above. For the bottom axis (X) you can make it invisible as in the code above
You have several options for this:
1) Adding two points for the line.
2) Using Null points.
2) Drawing a line in the canvas.
3) Using ColorLine tool to draw the line as:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
int Const;
Const=111;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Add(Const);
Steema.TeeChart.Tools.ColorLine colorLine1 = new Steema.TeeChart.Tools.ColorLine(tChart1.Chart);
colorLine1.Active = true;
colorLine1.AllowDrag = false;
colorLine1.Axis = tChart1.Axes.Left;
colorLine1.Pen.Color = line1.Color;
colorLine1.Value = Const;
tChart1.Aspect.View3D=false;
tChart1.Legend.Visible=false;
tChart1.Axes.Left.SetMinMax(0,Const+50);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |