Hello,
Please let me know whether it is possible to display histograms in persistence mode using TeeChart? If yes, which version supports it?
Some explanations
Suppose we have a continuously updated histogram. Each time it represents some value it should keep a trace. Color intensity of the traces should be higher in those place where the histogram was more frequent. This feature have latest oscilloscopes.
Thanks.
Persistence mode
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Persistence mode
Hello icecream,
There's no built-in functionality to do that. However, what I see in the image can be achieve manually combining ColorGrid and Bar series as shown here:
If that's not what you are looking for please provide more detailed information about how your chart should exactly be.
There's no built-in functionality to do that. However, what I see in the image can be achieve manually combining ColorGrid and Bar series as shown here:
Code: Select all
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
tChart1.Width = 100;
tChart1.Height = 300;
tChart1.Axes.Bottom.MaximumOffset = 1;
Steema.TeeChart.Styles.ColorGrid colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
const int maxVal = 10;
for (int i = 0; i < 1; i++)
{
for (int j = 0; j < maxVal; j++)
{
colorGrid1.Add(i, 0, j);
}
}
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.None;
bar1.Marks.Visible = false;
bar1.ColorEach = true;
Random y = new Random();
for (int i = 0; i < 100; i++)
{
bar1.Clear();
double tmp = y.Next(maxVal);
int index = colorGrid1.ZValues.IndexOf(tmp);
colorGrid1.YValues[index] += 1;
bar1.Add(0.5, tmp, colorGrid1.StartColor);
}
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: Persistence mode
Thank you Narcis.
I am afraid it won't work for me. When maxVal is 255 the background is gray because of cells borders. Even if there would be a way to not draw a borders (I was not able to find it) the problem is that size of the chart is less than maxVal.
I was thinking about drawing a lines (e.g. for last 1000 samples) and update their color using some algorithm. However, think it will be very slow. By the way, grid also may be slow.
Thanks.
I am afraid it won't work for me. When maxVal is 255 the background is gray because of cells borders. Even if there would be a way to not draw a borders (I was not able to find it) the problem is that size of the chart is less than maxVal.
I was thinking about drawing a lines (e.g. for last 1000 samples) and update their color using some algorithm. However, think it will be very slow. By the way, grid also may be slow.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Persistence mode
Hi icecream,
Yes, this is possible setting Pen visibility to false:icecream wrote: Even if there would be a way to not draw a borders (I was not able to find it) the problem is that size of the chart is less than maxVal.
Code: Select all
colorGrid1.Pen.Visible = false;
Ok, you could try accessing line's Colors ValueList to modify colors accordingly.icecream wrote: I was thinking about drawing a lines (e.g. for last 1000 samples) and update their color using some algorithm.
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 |