Hi. I have a chart with a point series. Problem is that many of the points
are equal and therefore I cannot relate the points to the legend.
In other words I have no idea where the item in the legend is plotted on the
graph. Is there any way of showing all of the points on the graph or maybe
colour equal points the same instead of colouring them differently because the different colours appear in the legend separately but on the chart the coloured points are hidden underneath others with the same value
Please help. Also, how can I attach a screenshot of this?
TA!
--------------------------------------------------------------------------------
[/img]
Equal points on a graph overlap.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cura,
You can use the series GetPointerStyle event doing something like:
You can use the series GetPointerStyle event doing something like:
Code: Select all
function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
ValueIndex: Integer): TSeriesPointerStyle;
var
YVal: Double;
begin
YVal:=Sender.YValues[ValueIndex];
With (Sender as TPointSeries).Pointer do
case Trunc(YVal) of
0..32:
begin
Size:=2;
Color:=clRed;
end;
33..65:
begin
Size:=4;
Color:=clBlue;
end;
66..99:
begin
Size:=6;
Color:=clYellow;
end;
end;
result:=psRectangle;
end;
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 |
End user - have no access to the source code
I am trying to do this by using the chart settings at runtime.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cura,
This is at run-time. Another thing you could do is something like the snippet below. However, if you meant design-time instead of run-time, then I'm afraid it is not possible.
This is at run-time. Another thing you could do is something like the snippet below. However, if you meant design-time instead of run-time, then I'm afraid it is not possible.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
val: double;
i: Integer;
begin
Series1.ColorEachPoint:=true;
for i:=0 to 10 do
begin
val:=random(100);
if val > 50 then
Series1.Add(val,'',clRed)
else
Series1.Add(val,'',clBlue);
end;
end;
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cura,
Ok, however, at least, you could do the same as the 2nd code snippet I posted. If this can not be done with Report Builder then you'll have to ask Digital Metaphors (RB manufacturers) as they implemented the Report Builder wrapper for TeeChart.
Ok, however, at least, you could do the same as the 2nd code snippet I posted. If this can not be done with Report Builder then you'll have to ask Digital Metaphors (RB manufacturers) as they implemented the Report Builder wrapper for TeeChart.
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 |