We know
Code: Select all
Series->XLabel[i] = "Test"
but is there a property like
Code: Select all
Series->XLabel->Color[i]
Thanks in advance.
Code: Select all
Series->XLabel[i] = "Test"
Code: Select all
Series->XLabel->Color[i]
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
ColorEachPoint:=true;
FillSampleValues(5);
Labels[0]:='Apples';
Labels[1]:='Bananas';
Labels[2]:='Lemons';
Labels[3]:='Oranges';
Labels[4]:='Pears';
Marks.Item[1].Color:=clRed;
end;
Chart1.Draw;
Chart1.Axes.Bottom.Items.Automatic:=false;
Chart1.Axes.Bottom.Items[3].Format.Font.Color:=RGB(255,128,0);
end;
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Code: Select all
Series1->Marks->Visible = true;
// Add 5 points to Series
int xpoints[5] = {10, 20, 30, 40, 50};
int y = 100;
for (int i = 0; i < 5; i++)
{
Series1->AddXY(xpoints[i], y, IntToStr(i + 1));
}
// How to access some point by x value, not the valueindex.
//
//Just like Series1->MarksXValue->Item[10]->Text->Text = "";
// which works same with the code below.
Series1->Marks->Item[0]->Text->Text = "";
Code: Select all
XValueToFind:=10;
valueIndex:=-1;
found:=false;
repeat
Inc(valueIndex);
if (valueIndex<Series1.Count) and (Series1.XValues[valueIndex]=XValueToFind) then
found:=true;
until (found=true) or (valueIndex=Pred(Count));
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |