Zooming-in on my scatter graph sometimes shows diddly squat
Zooming-in on my scatter graph sometimes shows diddly squat
Hi
I have created a scatter graph using TeeChart NET v3
There are quite a lot of points, typically around 50,000. They are in a single "Points" series When I zoom-in using the mouse (dragging a rectangle) it sometimes shows a blank. ie. zero points.
Ive noticed when I zoom in on the right side of the chart its always OK but when I zoom-in on the left side there is often nothing shown even though Ive dragged
the zoom-in box over a lot of points.
Any ideas what is happening here?
thanks
I have created a scatter graph using TeeChart NET v3
There are quite a lot of points, typically around 50,000. They are in a single "Points" series When I zoom-in using the mouse (dragging a rectangle) it sometimes shows a blank. ie. zero points.
Ive noticed when I zoom in on the right side of the chart its always OK but when I zoom-in on the left side there is often nothing shown even though Ive dragged
the zoom-in box over a lot of points.
Any ideas what is happening here?
thanks
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
Could you send us a simple project because we can reproduce your problem exactly here?
Thanks
Could you send us a simple project because we can reproduce your problem exactly here?
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: Zooming-in on my scatter graph sometimes shows diddly squat
Thanks. Ive uploaded an executeable and a chart for for you to look at. Its compressed. Let me know if there are any problems. You need to add TeeChart.dll to make it run. I tried uploading the project including the TeeChart.dll but the file was too big.
Try zooming-in on the concentrated circular section of points. No points are displayed. The view should be full of points
Thanks.
Try zooming-in on the concentrated circular section of points. No points are displayed. The view should be full of points
Thanks.
- Attachments
-
- Release.rar
- Please open the attached folder and run the executeable. You need to add TeeChart.dll to make it run
- (10.06 KiB) Downloaded 668 times
Re: Zooming-in on my scatter graph sometimes shows diddly squat
The source for the executeable is very simple. Here it is.
Its in C#.Net
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TeeChartTest10 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
tChart1.Import.Template.Load("mychart.ten");
}
}
}
Its in C#.Net
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TeeChartTest10 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
tChart1.Import.Template.Load("mychart.ten");
}
}
}
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
Ok, we can reproduce your problem here, but we need that you send us your complete project where you created this chart, because we can investigate why the is produced problem. For attachments not being too big you can omit "bin" and "obj" folders. Only "Properties" folder is necessary.
Thanks,
Ok, we can reproduce your problem here, but we need that you send us your complete project where you created this chart, because we can investigate why the is produced problem. For attachments not being too big you can omit "bin" and "obj" folders. Only "Properties" folder is necessary.
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: Zooming-in on my scatter graph sometimes shows diddly squat
Hi
Sorry for the delay in getting back (was sidetracked to something else temporarily).
Its a bit difficult for me to send the project because its so large.
I basically create the chart by reading the x and y coords into 2 arrays. I then call drawGraph(x,y) which draws the chart. ie.
public void drawGraph(int[] waves, int[] I) {
tChart1.Series.RemoveAllSeries();
Points pts = new Points();
pts.Add(waves, I);
pts.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
pts.Pointer.VertSize = 2;
pts.Pointer.HorizSize = 2;
pts.Pointer.Color = Color.DarkRed;
tChart1.Series.Add(pts);
tChart1.Legend.Symbol.WidthUnits = Steema.TeeChart.LegendSymbolSize.Pixels;
tChart1.Legend.Symbol.Width = 1;
}
Does this look OK?
The data looks as though its all there when I use the TeeChart editor and see all the raw data listed.
Its weird how the points vanish when I zoom-in to an area. Note: Its not all areas. It seems like just some areas the points vanish.
Sorry for the delay in getting back (was sidetracked to something else temporarily).
Its a bit difficult for me to send the project because its so large.
I basically create the chart by reading the x and y coords into 2 arrays. I then call drawGraph(x,y) which draws the chart. ie.
public void drawGraph(int[] waves, int[] I) {
tChart1.Series.RemoveAllSeries();
Points pts = new Points();
pts.Add(waves, I);
pts.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
pts.Pointer.VertSize = 2;
pts.Pointer.HorizSize = 2;
pts.Pointer.Color = Color.DarkRed;
tChart1.Series.Add(pts);
tChart1.Legend.Symbol.WidthUnits = Steema.TeeChart.LegendSymbolSize.Pixels;
tChart1.Legend.Symbol.Width = 1;
}
Does this look OK?
The data looks as though its all there when I use the TeeChart editor and see all the raw data listed.
Its weird how the points vanish when I zoom-in to an area. Note: Its not all areas. It seems like just some areas the points vanish.
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
I have made simple code using your suggestion:
Could you please tell us if it reproduce your problem? If it doesn't reproduce your problem, please modify previous code and explain how reproduce it here.
Thanks,
I have made simple code using your suggestion:
Code: Select all
private void InitializeChart()
{
int[] waves = new int[50000];
int[] I= new int[50000];
Random rnd = new Random();
tChart1.Series.Clear();
for(int i = 0; i<waves.Length; i++)
{
waves[i]= i;
I[i] = rnd.Next(100);
}
Steema.TeeChart.Styles.Points pts = new Steema.TeeChart.Styles.Points();
pts.Add(waves, I);
pts.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
pts.Pointer.VertSize = 2;
pts.Pointer.HorizSize = 2;
pts.Pointer.Color = Color.DarkRed;
tChart1.Series.Add(pts);
tChart1.Legend.Symbol.WidthUnits = Steema.TeeChart.LegendSymbolSize.Pixels;
tChart1.Legend.Symbol.Width = 1;
}
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: Zooming-in on my scatter graph sometimes shows diddly squat
Sandra thanks. Yes that code works OK.
I think Ive worked out why there was a problem. Its because my chart data plotted several points at the same location.
If I ensure no 2 points are the same then the graph draws OK and I can zoom into any area.
However the chart doesn't look quite right. There is a black section that doesnt show the individual points.
Ive attached it so you can take a quick look. Thanks.
I think Ive worked out why there was a problem. Its because my chart data plotted several points at the same location.
If I ensure no 2 points are the same then the graph draws OK and I can zoom into any area.
However the chart doesn't look quite right. There is a black section that doesnt show the individual points.
Ive attached it so you can take a quick look. Thanks.
- Attachments
-
- Chart1.rar
- This contains chart1.ten which shows a black area where individual points should be.
- (11.65 KiB) Downloaded 710 times
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
Loading your chart1.ten and using last version 3 of TeeChart.Net, I get next image: You can see I have drawn a red circle where there is condensed points area. Can you confirm us; if problem you mean is area where there is circle?
If it is your problem, is produced because you are drawing many points in this section or your chart and these are condensed. For solves this, I suggest two options:
First: Make the pointer of points smaller so you can see more points.
Second: Does the chart biggest to see the points.
Otherwise, if in the image doesn’t appear your problem please explain exactly how we can reproduce it.
I hope will helps.
Thanks,
Loading your chart1.ten and using last version 3 of TeeChart.Net, I get next image: You can see I have drawn a red circle where there is condensed points area. Can you confirm us; if problem you mean is area where there is circle?
If it is your problem, is produced because you are drawing many points in this section or your chart and these are condensed. For solves this, I suggest two options:
First: Make the pointer of points smaller so you can see more points.
Second: Does the chart biggest to see the points.
Otherwise, if in the image doesn’t appear your problem please explain exactly how we can reproduce it.
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: Zooming-in on my scatter graph sometimes shows diddly squat
Sandra yes you have circled the correct area.
I tried making the points smaller but the chart doesn't look very good. Also expanding the chart doesn't help much.
Im going to try and play around with the chart editor settings and see if I can make the chart look better. Thanks for your help.
I tried making the points smaller but the chart doesn't look very good. Also expanding the chart doesn't help much.
Im going to try and play around with the chart editor settings and see if I can make the chart look better. Thanks for your help.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hi Dave,
In that case you could try setting Pointer.Style to PointerStyles.SmallDot as in the example below. If that's not enough then I recommend you to use DownSampling function as in the All\Welcome !\Functions\Extended\Reducing number of points example at the features demo, available at TeeChart's program group, and also in the code snippet below.
In that case you could try setting Pointer.Style to PointerStyles.SmallDot as in the example below. If that's not enough then I recommend you to use DownSampling function as in the All\Welcome !\Functions\Extended\Reducing number of points example at the features demo, available at TeeChart's program group, and also in the code snippet below.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
tChart1.Import.Template.Load(@"C:\temp\Chart1.ten");
for (int i = 0; i < tChart1.Series.Count; i++)
{
if (tChart1[i] is Steema.TeeChart.Styles.Points)
{
Steema.TeeChart.Styles.Points points = (Steema.TeeChart.Styles.Points)tChart1[i];
points.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.SmallDot;
}
}
if (tChart1.Series.Count > 0)
{
Steema.TeeChart.Functions.DownSampling downSampling1 = new Steema.TeeChart.Functions.DownSampling(tChart1.Chart);
downSampling1.Tolerance = 5;
Steema.TeeChart.Styles.Points lessPoints = new Steema.TeeChart.Styles.Points(tChart1.Chart);
lessPoints.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.SmallDot;
lessPoints.Color = tChart1[0].Color;
lessPoints.Function = downSampling1;
lessPoints.DataSource = tChart1[0];
lessPoints.CheckDataSource();
tChart1[0].Visible = false;
}
}
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 |
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Thanks Narcis I will try that.
Ive been playing about with the TeeChart editor and I can improve the display when I set the border transparency of the Points to 50%.
However I dont know how to do this in code? I tried something like:
pts.Pointer.Border.Transparency = 50;
but of course this doesn't exist. Do you know how I do this?
Ive been playing about with the TeeChart editor and I can improve the display when I set the border transparency of the Points to 50%.
However I dont know how to do this in code? I tried something like:
pts.Pointer.Border.Transparency = 50;
but of course this doesn't exist. Do you know how I do this?
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
You need use in code, property pen of points as do in next lines of code:
I hope will helps.
Thanks,
You need use in code, property pen of points as do in next lines of code:
Code: Select all
Series1.Pointer.Pen.Transparency = 50;
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: Zooming-in on my scatter graph sometimes shows diddly squat
Thanks but wont that just set the transparency of the points?
Im trying to set the transparency of the border around each point.
Im trying to set the transparency of the border around each point.
Re: Zooming-in on my scatter graph sometimes shows diddly squat
Hello Dave,
The Pen used to draw a frame around Series Pointers. So if you want change border of Pointer for each points of Series point in code, you need modify transparency using pen propriety. You can find more information about Pen in TeeChart for .Net Help.
Thanks,
The Pen used to draw a frame around Series Pointers. So if you want change border of Pointer for each points of Series point in code, you need modify transparency using pen propriety. You can find more information about Pen in TeeChart for .Net Help.
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 |