Good day,
I am using a TColorGridSeries to generate a scrolling color plot. My X axis values are aximuth values from 0 to 360, and I display 100 angles at a time. Once the 1st hundred are displayed, I redraw the axis labels, shifting old values to the left and adding a new value to the end (right). Everything works fine until I have a zero crossing. I think the problem is when I call Chart1.Axes.Bottom.SetMinMax(min, max). Since max cannot be less then min. For example, my left most axis value may be 250 and the right most might be 0.
I have the following code set:
Chart1[0].VertAxis := aBothVertAxis;
Chart1[0].HorizAxis := aBothHorizAxis;
Chart1.Axes.Top.OtherSide := False;
Chart1.Axes.Right.OtherSide := False;
Chart1.Series[0].IrregularGrid := False
Now I can call AddXYZ with X and Z parameters set as integers then, set the axis labels like this:
Chart1.Axes.Top.SetMinMax(Min, Max);
Chart1.Axes.Bottom.Items.add(BlkCnt-1,Format('%-.2f',[PlotParam.AngleData[High(PlotParam.AngleData)]]));
This all works fine until the zero crossing occurs. Is there a way to just set the lables without having to call SetMinMax?
Scrolling Axes Labels
Re: Scrolling Axes Labels
Hi dpatch,
It would be helpful if you could arrange a simple example project we can run as-is to reproduce the situation here because right now I'm not sure about how are you exactly populating your series, how are you redrawing the labels, shifting the old values,...
Thanks in advance.
It would be helpful if you could arrange a simple example project we can run as-is to reproduce the situation here because right now I'm not sure about how are you exactly populating your series, how are you redrawing the labels, shifting the old values,...
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Scrolling Axes Labels
Here is a simple example that shows what I am trying to do. I have sample data, but makes the upload too big. Is there an email address I can send it to?
Thanks in advance,
dave
Thanks in advance,
dave
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scrolling Axes Labels
Hi dave,
I have modified your project a little bit. I removed custom labels, used point labels and also set axes to be automatic. Doing so I now get labels all the time. However, this may not be what you are looking for. Could you please have a look at the example and let me know where you'd like to go from here? Or am I completely in the wrong way?
Thanks in advance.
BTW: Files may also be posted at our upload page.
I have modified your project a little bit. I removed custom labels, used point labels and also set axes to be automatic. Doing so I now get labels all the time. However, this may not be what you are looking for. Could you please have a look at the example and let me know where you'd like to go from here? Or am I completely in the wrong way?
Thanks in advance.
BTW: Files may also be posted at our upload page.
- Attachments
-
- Strip Example.zip
- (6.35 KiB) Downloaded 688 times
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: Scrolling Axes Labels
Narcis,
Thanks for your fast response!
I see what you did and it looks good. But, how come once the scrolling begins, the x axis labels go from showing many at the defined increment to only one on the far left?
Also, you made a call to Chart1[0].Clear instead of clearing the individual values. I have always thought that this call has a bug. When you call Chart1[0].Clear, it clears all the setup you have previously done...like setting the color palette. Is there another way to clear the plot display without loosing the plot setup?
Thanks again!
Thanks for your fast response!
I see what you did and it looks good. But, how come once the scrolling begins, the x axis labels go from showing many at the defined increment to only one on the far left?
Also, you made a call to Chart1[0].Clear instead of clearing the individual values. I have always thought that this call has a bug. When you call Chart1[0].Clear, it clears all the setup you have previously done...like setting the color palette. Is there another way to clear the plot display without loosing the plot setup?
Thanks again!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scrolling Axes Labels
Hi dpatch,
But you implemented this:
This means all series values are clearead at each loop! Changing code above for line below solves the problem .
Is that what you were looking for? I attach full project as well.
You're welcome!Thanks for your fast response!
I think I have found the problem. When scrolling begins, in the code, you wrote:I see what you did and it looks good. But, how come once the scrolling begins, the x axis labels go from showing many at the defined increment to only one on the far left?
Code: Select all
//...Clear previous 100 columns values in the chart.
Code: Select all
(Chart1.Series[0] as TColorGridSeries).XValues.Delete(0, (Chart1.Series[0] as TColorGridSeries).XValues.Count);
(Chart1.Series[0] as TColorGridSeries).YValues.Delete(0, (Chart1.Series[0] as TColorGridSeries).YValues.Count);
(Chart1.Series[0] as TColorGridSeries).ZValues.Delete(0, (Chart1.Series[0] as TColorGridSeries).ZValues.Count);
Code: Select all
//...
//...Clear previous 100 columns values in the chart.
//...
Chart1[0].Delete(0, fChartSteps);
Ok, I see. I don't think it's a bug but it clears all series ValueLists, colors included. I was trying to simplify the code, so this would also do the job:Also, you made a call to Chart1[0].Clear instead of clearing the individual values. I have always thought that this call has a bug. When you call Chart1[0].Clear, it clears all the setup you have previously done...like setting the color palette. Is there another way to clear the plot display without loosing the plot setup?
Code: Select all
Chart1[0].Delete(0, Chart1[0].Count);
- Attachments
-
- Strip Example.zip
- (6.36 KiB) Downloaded 687 times
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: Scrolling Axes Labels
Narcis,
Now you know why I always kept your email address. It looks like this absoultely solved my problem.
Thank you very much!!!
dave
Now you know why I always kept your email address. It looks like this absoultely solved my problem.
Thank you very much!!!
dave
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scrolling Axes Labels
Hi Dave,
Je je. You're very welcome!!
Je je. You're very welcome!!
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 |