ColorGrid Grid
ColorGrid Grid
Hi,
I have a colorGrid series - 85 columns X 60 rows. That's 5,100 values. If I add 5,100 values to the series, I get a nice little grid drawn over the top of my colored cells. My axis captions are appearing every 5 - 0, 5, 10 ... 85 etc. All working as I want.
What I want to next is clear the colors, but leave the grid there - so it appears empty, then add values one by one. If I call the series clear method, I lose the palette, and my grid lines are drawn every 5 - the same as my axis captions. How do I
a) Keep the palette visible when there are no values
b) Have the grid display in increments of 1.
Regards,
Rick
I have a colorGrid series - 85 columns X 60 rows. That's 5,100 values. If I add 5,100 values to the series, I get a nice little grid drawn over the top of my colored cells. My axis captions are appearing every 5 - 0, 5, 10 ... 85 etc. All working as I want.
What I want to next is clear the colors, but leave the grid there - so it appears empty, then add values one by one. If I call the series clear method, I lose the palette, and my grid lines are drawn every 5 - the same as my axis captions. How do I
a) Keep the palette visible when there are no values
b) Have the grid display in increments of 1.
Regards,
Rick
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rick,
Yes, you can set the axes desired increment as:
You can do:a) Keep the palette visible when there are no values
Code: Select all
for t:=0 to Series1.Count -1 do Series1.SetNull(t);
b) Have the grid display in increments of 1.
Yes, you can set the axes desired increment as:
Code: Select all
Chart1.BottomAxis.Increment:=1;
Chart1.LeftAxis.Increment:=1;
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 |
Hi Narcis,
Thanks for the reply. Interesting results.
1. If I call the clear method, before calling SetNull, I loose the palette (even adding the palette values again does not help).
2. If I don't call clear, and just call SetNull, it does leave the grid exactly as I want it - empty - palettle shows, and I have the grid every point, and the axis captions every 5. perfect. However....subsequent calls to draw values using AddXYZ() do nto show anything...the grid remains empty. Do I need to undo the nulls somehow?
Thnks,
Rick
Thanks for the reply. Interesting results.
1. If I call the clear method, before calling SetNull, I loose the palette (even adding the palette values again does not help).
2. If I don't call clear, and just call SetNull, it does leave the grid exactly as I want it - empty - palettle shows, and I have the grid every point, and the axis captions every 5. perfect. However....subsequent calls to draw values using AddXYZ() do nto show anything...the grid remains empty. Do I need to undo the nulls somehow?
Thnks,
Rick
More news:
Inthe previous message I wrote:
<<
2. If I don't call clear, and just call SetNull, it does leave the grid exactly as I want it - empty - palettle shows, and I have the grid every point, and the axis captions every 5. perfect. However....subsequent calls to draw values using AddXYZ() do nto show anything...the grid remains empty. Do I need to undo the nulls somehow?
>>
If smoothBitmap is on, everything works fine. I call SetNull for each point, the grid is empty. I then re-add points using AddXYZ, everthing works fine. If smoothbitmap is off, I see nothing...
Any ideas? Anyone want a sample project? Using 7.04.
Rick
Inthe previous message I wrote:
<<
2. If I don't call clear, and just call SetNull, it does leave the grid exactly as I want it - empty - palettle shows, and I have the grid every point, and the axis captions every 5. perfect. However....subsequent calls to draw values using AddXYZ() do nto show anything...the grid remains empty. Do I need to undo the nulls somehow?
>>
If smoothBitmap is on, everything works fine. I call SetNull for each point, the grid is empty. I then re-add points using AddXYZ, everthing works fine. If smoothbitmap is off, I see nothing...
Any ideas? Anyone want a sample project? Using 7.04.
Rick
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rick,
Yes, please post the example project we can run "as-is" at steema.public.attachments newsgroup available at news://www.steema.net.
Thanks in advance.
Yes, please post the example project we can run "as-is" at steema.public.attachments newsgroup available at news://www.steema.net.
Thanks in advance.
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 |
Hi,
Posted a zip file on the newsgroup as requested. I stripped it down to this:
procedure TForm1.Button1Click(Sender: TObject);
begin
series1.addXyz(0, 10, 0);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
series1.SetNull(0);
end;
Call Button1CLick, then Button2Click, then button1Click again. You see nothing.
Bit stuck now...
Regards,
Rick
Posted a zip file on the newsgroup as requested. I stripped it down to this:
procedure TForm1.Button1Click(Sender: TObject);
begin
series1.addXyz(0, 10, 0);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
series1.SetNull(0);
end;
Call Button1CLick, then Button2Click, then button1Click again. You see nothing.
Bit stuck now...
Regards,
Rick
Hi Rick,
yes, you're correct, it seems to be a problem when you set it as Null, it does not get the pallete colors. I've added it on our defect list so it can be reviewed for the next maintenance releases.
I think the best way to accomplish that is by using two ColorGrid Series, one which you will use to set the null values and desired increment ..., and then use the other Serie to add the colored points.
yes, you're correct, it seems to be a problem when you set it as Null, it does not get the pallete colors. I've added it on our defect list so it can be reviewed for the next maintenance releases.
I think the best way to accomplish that is by using two ColorGrid Series, one which you will use to set the null values and desired increment ..., and then use the other Serie to add the colored points.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi,
Thanks for the message. I'll play with a second series. One thing I have tried - and works - is to add an extra color to the palette - a value of -1 with white. To "clear" the grid, I then populate it with -1. This works fine, except I now see the -1 / White in the legend. Is there any way to not show a color in the legend?
Regards,
Rick
Thanks for the message. I'll play with a second series. One thing I have tried - and works - is to add an extra color to the palette - a value of -1 with white. To "clear" the grid, I then populate it with -1. This works fine, except I now see the -1 / White in the legend. Is there any way to not show a color in the legend?
Regards,
Rick
Hi Rick,
the only way I can think of (except of drawing your won legend on the panel using the Canvas techniques) is to use the OnGetLegendText :
And also set the Color to clNone intead of clWhite.
the only way I can think of (except of drawing your won legend on the panel using the Canvas techniques) is to use the OnGetLegendText :
Code: Select all
procedure TForm1.Chart1GetLegendText(Sender: TCustomAxisPanel;
LegendStyle: TLegendStyle; Index: Integer; var LegendText: String);
begin
if index = 0 then
legendtext :='';
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
To anyone interested
I solved the issue of "not drawing" the legend by using the onGetlegendPos event - if it's the one I don't want to see (always the last one in my case) - I set x and y to large negative values so they are not seen...
pep - your suggestion of using a clNone color, unfortuately, does not work - presumably because of the problems T-Chart has with nulls - and then making the value non null. I reported this already and it was confirmed as a bug.
Regards,
Rick
I solved the issue of "not drawing" the legend by using the onGetlegendPos event - if it's the one I don't want to see (always the last one in my case) - I set x and y to large negative values so they are not seen...
pep - your suggestion of using a clNone color, unfortuately, does not work - presumably because of the problems T-Chart has with nulls - and then making the value non null. I reported this already and it was confirmed as a bug.
Regards,
Rick