Page 1 of 1

AxisValueFormat not working as expected

Posted: Wed Sep 23, 2015 11:54 am
by 16558331
Hi
I got another strange thing with the AxisValueFormat (and possibly others) not working as expected:
1.png
1.png (36.11 KiB) Viewed 7567 times
The screen-shot show Delphi with a form ("Auswertung") and the LeftAxis - valus and its "Values Formt:"

On the left there is a little tool (Form2) compiled an running to show some numbers with a certain format mask using Delphis FormatFloat - funktion.

As you can see, there are two totally different results. While the Delphi function seems to work as expected AxisValueFormat does some weird possibly mixing format specifiers and local format settings?

Re: AxisValueFormat not working as expected

Posted: Fri Sep 25, 2015 1:51 pm
by yeray
Hello,

I've prepared a simple example project to reproduce this and it seems to work fine form me here.
Here is how it looks:
ValueFormat.png
ValueFormat.png (20.82 KiB) Viewed 7539 times
Could you please modify the project so we can reproduce the problem here?
TestValueFormat.zip
(1.97 KiB) Downloaded 608 times
Thanks in advance.

Re: AxisValueFormat not working as expected

Posted: Mon Sep 28, 2015 10:43 am
by 16558331
Hi,
thats real strange. Your example is working on my side as well, so I just did a copy and paste of my TChart. As it seems mine isn't working while yours continue to behave well...

Maybe you are able to reproduce that on your side too?

Re: AxisValueFormat not working as expected

Posted: Wed Sep 30, 2015 11:37 am
by yeray
Hello,

I see the new chart in the project but you aren't modifying the axes AxisValuesFormat when the button is clicked.
Adding this it works fine for me here:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
//...

  MyFilterChart.Axes.Left.AxisValuesFormat:=Edit1.Text;
  MyFilterChart.Axes.Bottom.AxisValuesFormat:=Edit1.Text;

  MyFilterChart.Repaint;
end;
formatfloat.png
formatfloat.png (30.69 KiB) Viewed 7459 times