Hello,
I've tried it and it doesn't go well. In this example, the second tick should be blue and Red leaves.
procedure TForm1.Button1Click(Sender: TObject);
var ylist: array [1..4] of Double;
begin
Chart1.Margins.Bottom := 20; // Margenes
Chart1.Margins.Left := 20;
Chart1.Margins.Right := 20;
Chart1.Margins.Top := 20;
Chart1OpenHighLowCloseSeries1.TickWidth := 5; // Ancho del tick
Chart1OpenHighLowCloseSeries1.ListSource.YCount := 4;
Chart1OpenHighLowCloseSeries1.LinePen.Color:=clBlue;
Chart1OpenHighLowCloseSeries1.LinePen.Width:=3;
Chart1OpenHighLowCloseSeries1.DownLinePen.Color:=clRed;
Chart1OpenHighLowCloseSeries1.DownLinePen.Width:=3;
ylist[1] := 10.9; // O
ylist[2] := 10.2; // C // O C H L
ylist[3] := 11; // H
ylist[4] := 9.9; // L
Chart1OpenHighLowCloseSeries1.AddXY(1, 9.9, ylist);
ylist[1] := 11;
ylist[2] := 10.9;
ylist[3] := 11.3;
ylist[4] := 10.4;
Chart1OpenHighLowCloseSeries1.AddXY(2, 10.4, ylist);
ylist[1] := 10.5;
ylist[2] := 10.7;
ylist[3] := 11.2;
ylist[4] := 10.3;
Chart1OpenHighLowCloseSeries1.AddXY(3, 10.3, ylist);
ylist[1] := 10.7;
ylist[2] := 10.4;
ylist[3] := 11.7;
ylist[4] := 10.2;
Chart1OpenHighLowCloseSeries1.AddXY(4, 10.2, ylist);
end;
Anyway, the ideal was that it could choose the color of the individual tick. Imagine I want that the ticks above average are blue and those who go down here to Red:
(Photo of my program in Delphi with TeeChart)
http://img233.imageshack.us/img233/3669/probamedia.jpgTo do this you would operate the fifth parameter of the AddXY function:
Chart1OpenHighLowCloseSeries1.AddXY(4, 10.2, ylist,'',
clRed);
or
Chart1OpenHighLowCloseSeries1.AddXY(4, 10.2, ylist,'',
clBlue);
With this we would have total control in the color of the tick
Best regards
---------------------------------------------------------------------------------------------
Spanish:
Ya lo he probado y no va bien. En este ejemplo, el segundo tick debería ser azul y sale rojo.
De todas formas, lo ideal era que se pudiera elegir el color del tick individual. Imagina que quiero que los ticks por encima de una media sean azules y los que van por abajo rojo como aquí:
(Foto de mi programa en Delphi con TeeChart)
http://img233.imageshack.us/img233/3669/probamedia.jpgPara ello tendría que funcionar el quinto parámetro de la función AddXY:
Con esto tendríamos control total en el color del tick
Un saludo