Polar Series - color each point
Posted: Wed Sep 09, 2009 11:21 am
TCHart 8.01 Delphi6
I have A Polar series on a chart, pen.visible set to false and want to draw a scatter type plot with many points, the points being drawn at (Radius,Angle) as expected with Polar chart, but I want to color the points individually according to a third variable. I've done similar with Tlineseries on charts, and with those I set the coloreverypoint to true then in the getpointerstyle event I use the series.valuecolor[valueindex] to set the color of each point. With the Polar series it seems all points take on the last color (the legend gets the correct colors). Even if I add 3 points to the series and hard code the colors as below, all three draw as claqua on thechart, but in legend they are colored blue/fuchsia/aqua. Is there something I'm missing please. thaks, Sean
with Polarseries do
begin
clear;
pointer.Pen.Visible:=false;
pen.Visible:=false;
addxy(-30,2000);
addxy(-60,1500);
addxy(-100,1000);
valuecolor[0]:=clblue;
valuecolor[1]:=clfuchsia;
valuecolor[2]:=claqua;
end;
I have A Polar series on a chart, pen.visible set to false and want to draw a scatter type plot with many points, the points being drawn at (Radius,Angle) as expected with Polar chart, but I want to color the points individually according to a third variable. I've done similar with Tlineseries on charts, and with those I set the coloreverypoint to true then in the getpointerstyle event I use the series.valuecolor[valueindex] to set the color of each point. With the Polar series it seems all points take on the last color (the legend gets the correct colors). Even if I add 3 points to the series and hard code the colors as below, all three draw as claqua on thechart, but in legend they are colored blue/fuchsia/aqua. Is there something I'm missing please. thaks, Sean
with Polarseries do
begin
clear;
pointer.Pen.Visible:=false;
pen.Visible:=false;
addxy(-30,2000);
addxy(-60,1500);
addxy(-100,1000);
valuecolor[0]:=clblue;
valuecolor[1]:=clfuchsia;
valuecolor[2]:=claqua;
end;