Line Series not shown when values at borders of the chart
Line Series not shown when values at borders of the chart
Hi,
I am having an issue with line series when the values are to be displayed at the borders of the chart.
A screenshot will illustrate my problem.
The first screenshot shows the problem. The blue line does not show all the values in the series.
The second screenshot shows the chart when I enabled point markers. It has exactly the same data points, but in this case the entire line is shown.
Any idea what I can do about this?
Thanks,
Marijke.
I am having an issue with line series when the values are to be displayed at the borders of the chart.
A screenshot will illustrate my problem.
The first screenshot shows the problem. The blue line does not show all the values in the series.
The second screenshot shows the chart when I enabled point markers. It has exactly the same data points, but in this case the entire line is shown.
Any idea what I can do about this?
Thanks,
Marijke.
- Attachments
-
- this is the same data but with point markers enabled
- Chart2.png (8.16 KiB) Viewed 15751 times
-
- illustrates the problem in my line series
- Chart1.png (8.81 KiB) Viewed 15748 times
Re: Line Series not shown when values at borders of the chart
apparently, when posting the topic, the screenshots are twisted.
So, what I mean is that
- when point markers are not shown (in the chart with the blue line) part of the line is missing. when the line touches the boundaries of the chart section.
- when there are point markers shown, the entire line is shown as it should (in the chart with the red line).
I hope that my explanation is a bit clear.
Marijke.
So, what I mean is that
- when point markers are not shown (in the chart with the blue line) part of the line is missing. when the line touches the boundaries of the chart section.
- when there are point markers shown, the entire line is shown as it should (in the chart with the red line).
I hope that my explanation is a bit clear.
Marijke.
Re: Line Series not shown when values at borders of the chart
Even with the latest version (4.1.2012.5103) I have this issue.
Marijke
Marijke
Re: Line Series not shown when values at borders of the chart
Hello Marijke,
I have made a simple code, where I am using two lines series and your problem doesn't appears for me.
For these reason, would be very helpful if you can try to modify it so I can reproduce your problem here. On the other hand, you need know that when you active the pointer of series to default property inflateMargins sets true and the values of axes scale are changed. To achieve the same effect in series that doesn't have visible the pointer, you can use SetMinMax() to rescale axes.
Thanks,
I have made a simple code, where I am using two lines series and your problem doesn't appears for me.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Line line,line2;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
DateTime dt = DateTime.Now;
Random rnd = new Random(1000);
line.XValues.DateTime = true;
for (int i = 0; i < 10; i )
{
line.Add(dt, rnd.Next(1000));
dt = dt.AddDays(1);
}
line2.DataSource = line;
line2.Active = false;
checkBox1.CheckedChanged = new EventHandler(checkBox1_CheckedChanged);
}
void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (!checkBox1.Checked)
{
line.Active = false;
line2.Active = true;
line2.Pointer.Visible = true;
}
else
{
line.Active = true;
line2.Active = false;
}
}
For these reason, would be very helpful if you can try to modify it so I can reproduce your problem here. On the other hand, you need know that when you active the pointer of series to default property inflateMargins sets true and the values of axes scale are changed. To achieve the same effect in series that doesn't have visible the pointer, you can use SetMinMax() to rescale axes.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Line Series not shown when values at borders of the chart
Here is a simple class where I can reproduce the problem
The result of this class shows the chart in the attachment of this post.
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Steema.TeeChart;
namespace TeeChartTest
{
class ChartTester
{
private TChart chut; // chart under test
private Steema.TeeChart.Styles.Line line;
public ChartTester(TChart chartToTest)
{
chut = chartToTest;
ConfigChart();
AddTestData();
}
public void ConfigChart()
{
chut.Axes.Left.Grid.Visible = false;
chut.Axes.Bottom.Grid.Visible = false;
chut.Walls.Back.Visible = false;
chut.Header.Visible = false;
}
public void AddTestData()
{
chut.Aspect.View3D = false;
line = new Steema.TeeChart.Styles.Line(chut.Chart);
line.Add(1, 10);
line.Add(2, 15);
line.Add(3, 15);
line.Add(4, 10);
}
}
}
- Attachments
-
- chart_reproduced.png (27.78 KiB) Viewed 15705 times
Re: Line Series not shown when values at borders of the chart
Hello MVB,
Ok, in this case I suggest you change the MaximumOffset of left axis to achieve show all of series as I do in next lines of code:
Can you tell us if previous code works as you expect?
I hope will helps.
Thanks,
Ok, in this case I suggest you change the MaximumOffset of left axis to achieve show all of series as I do in next lines of code:
Code: Select all
Steema.TeeChart.Styles.Line line;
public Form1()
{
InitializeComponent();
tChart1.Aspect.View3D = false;
line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line.Add(1, 10);
line.Add(2, 15);
line.Add(3, 15);
line.Add(4, 10);
tChart1.Axes.Left.MaximumOffset = 5;
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Line Series not shown when values at borders of the chart
This works only when I switch the automatic values off.
So, the offset works only when I do this:
But I really need to have the Left Axis scaled automatically. And as soon as I enable automatic axes, the offset does not do anything anymore.
Marijke
So, the offset works only when I do this:
Code: Select all
TChart chut;
chut.Aspect.View3D = false;
chut.Axes.Left.Grid.Visible = false;
chut.Axes.Left.AutomaticMaximum = false;
chut.Axes.Left.MaximumOffset = 5;
chut.Axes.Left.Maximum = 15;
chut.Axes.Bottom.Grid.Visible = false;
chut.Walls.Back.Visible = false;
chut.Header.Visible = false;
line = new Steema.TeeChart.Styles.Line(chut.Chart);
line.Add(1, 10);
line.Add(2, 15);
line.Add(3, 15);
line.Add(4, 10);
Marijke
Re: Line Series not shown when values at borders of the chart
So, if I change this line
into this line:
The issue appears again.
Many thanks for your help.
Marijke
Code: Select all
chut.Axes.Left.AutomaticMaximum = false;
Code: Select all
chut.Axes.Left.AutomaticMaximum = true;
Many thanks for your help.
Marijke
Re: Line Series not shown when values at borders of the chart
Hello Marijke,
I can not reproduce your issue using your code and last version of TeeChartFor.Net.
If I use your code setting the tChart1.Axes.Left.AutomaticMaximum to false
I get next result:
If I use your code setting the tChart1.Axes.Left.AutomaticMaximum to true:
I get next result:
As you see I have gotten the same result, independently if I set true or false the AutomaticMaximum of Axis. For this reason, if you can attach me your project so we can try to find where is the problem. On the other hand, you need know, if you want work with automatic axes is not necessary use next lines of code, so to default TChart use automatic values in Axes:
Thanks,
I can not reproduce your issue using your code and last version of TeeChartFor.Net.
If I use your code setting the tChart1.Axes.Left.AutomaticMaximum to false
Code: Select all
Steema.TeeChart.Styles.Line line;
public Form1()
{
InitializeComponent();
//Chart
tChart1.Aspect.View3D = false;
tChart1.Axes.Left.Grid.Visible = false;
tChart1.Axes.Left.AutomaticMaximum = false;
tChart1.Axes.Left.MaximumOffset = 5;
tChart1.Axes.Left.Maximum = 15;
tChart1.Axes.Bottom.Grid.Visible = false;
tChart1.Walls.Back.Visible = false;
tChart1.Header.Visible = false;
//Series
line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line.Add(1, 10);
line.Add(2, 15);
line.Add(3, 15);
line.Add(4, 10);
checkBox1.CheckedChanged +=new EventHandler(checkBox1_CheckedChanged);
}
Code: Select all
Steema.TeeChart.Styles.Line line;
public Form1()
{
InitializeComponent();
//Chart
tChart1.Aspect.View3D = false;
tChart1.Axes.Left.Grid.Visible = false;
tChart1.Axes.Left.AutomaticMaximum = true;
tChart1.Axes.Left.MaximumOffset = 5;
tChart1.Axes.Left.Maximum = 15;
tChart1.Axes.Bottom.Grid.Visible = false;
tChart1.Walls.Back.Visible = false;
tChart1.Header.Visible = false;
//Series
line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line.Add(1, 10);
line.Add(2, 15);
line.Add(3, 15);
line.Add(4, 10);
}
Code: Select all
tChart1.Axes.Left.AutomaticMaximum = true;
tChart1.Axes.Left.Maximum = 15;
Best Regards,
Sandra Pazos / 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 |
Re: Line Series not shown when values at borders of the chart
This is the project I made for this test program.
- Attachments
-
- teeChartTest.rar
- (32.16 KiB) Downloaded 533 times
Re: Line Series not shown when values at borders of the chart
Hello MVB,
I am afraid your problem doesn't appear for me using last version 4 and your project and would be very greatful if you can check the same test in other computers and tell us what results you are achieved.
On the other hand, we consider that the problem that you have with Line Series that not shown when values at borders of the chart is a bug and we added it in bug list report wit number [TF02016217]. We try to fix it for next maintenance release of TeeChartFor.Net.
Thanks,
I am afraid your problem doesn't appear for me using last version 4 and your project and would be very greatful if you can check the same test in other computers and tell us what results you are achieved.
On the other hand, we consider that the problem that you have with Line Series that not shown when values at borders of the chart is a bug and we added it in bug list report wit number [TF02016217]. We try to fix it for next maintenance release of TeeChartFor.Net.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Line Series not shown when values at borders of the chart
I changed my project to use the very last release of TeeChart .NET (4.1.2012.5103). The problem seems to be solved. In the project I have sent to you, I still used the older version (4.0.2009.42282).
Many thanks for your help.
Many thanks for your help.
Re: Line Series not shown when values at borders of the chart
Hello MVB,
Thanks for your information. I am glad that your problem have been solved, using last version of TeeChartFor.Net.
Thanks,
Thanks for your information. I am glad that your problem have been solved, using last version of TeeChartFor.Net.
Thanks,
Best Regards,
Sandra Pazos / 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 |