Forum > TAChart

Problems with TAChart

(1/1)

SamWhiskey86:
Hello,

for my PhD-Project I'm using Simulations in Lazarus with the TAChart-component.But I just have encountered a problem. Some days ago freepascal was updated (btw. I am using ubuntu 8.10) and when I tried to compile my project, the TAChart was broken in any strange sense. So I removed lazarus and Freepascal and installed it manually -> same problem. Now I've installed a daily snapshot of lazarus (0.9.27) and fpc (2.2.5) and it looks quite good, but now two of the commands used for the initialization of pointer series are not known by the compiler anymore... Here is the code for the initialization of one series:


--- Code: ---gradserie:=TSerie.Create(Form1.GradChart);
gradserie.ShowLines:=False;
gradserie.ShowPoints:=True;
gradserie.Pointer.Style:=psCircle;
gradserie.Pointer.VertSize:=1;
gradserie.Pointer.HorizSize:=1;
gradserie.Title:='gradient';
gradserie.SeriesColor:=clBlack;
gradserie.Name:='gradserie';
Form1.GradChart.AddSerie(gradserie);

--- End code ---

And the error message:


--- Quote ---/usr/lib/lazarus/components/tachart/tachartutils.pas(266,20) Warning: Symbol "Handle" is deprecated
/usr/lib/lazarus/components/tachart/tagraph.pas(196,31) Hint: Parameter "DC" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(183,25) Hint: Parameter "Button" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(183,47) Hint: Parameter "Shift" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(184,25) Hint: Parameter "Shift" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(185,23) Hint: Parameter "Button" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(185,45) Hint: Parameter "Shift" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(65,7) Hint: Parameter "ADistFunc" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(65,40) Hint: Parameter "APoint" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(66,11) Hint: Parameter "AIndex" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(66,32) Hint: Parameter "AImg" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(66,50) Hint: Parameter "AValue" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(59,29) Hint: Parameter "ACanvas" not used
/usr/lib/lazarus/components/tachart/tagraph.pas(59,51) Hint: Parameter "AMargins" not used
/usr/lib/lazarus/components/tachart/taseries.pas(151,36) Hint: Parameter "AValue" not used
"Compiling package TAChartLazarusPkg 1.0" beendet
env_grad_src.pas(479,36) Error: Identifier not found "psCircle"
env_grad_src.pas(485,19) Error: identifier idents no member "AddSerie"

--- End quote ---

Do you have any idea, what could be the problem in here? I also tried the development version of lazarus on win xp, but that didn't help either... As my research depends on that program, it is quite important to me to find a solution, as quick as possible and as dirty as necessary ;-)

I thank you very very much in advance,
Best regards,
Sam

Ask:
This problem is caused by backwards-incompatible changes introduced by me during the recent TAChart rewrite. I felt that since TAChart has few users, it would be better to help them upgrade then to introduce compatibility wrappers that would pollute the code.

You should:
1) add 'TAChartUtils' unit to the 'uses' clause.
2) rename 'AddSerie' function to 'AddSeries'

Alternatively, you can now add series and set their properties at design-time by
double-clicking on the chart component. This way you will not need to create the
series manually in your code.

Navigation

[0] Message Index

Go to full version