Page 1 of 1

One More FMX vs VCL Chart Help

Posted: Thu Aug 31, 2017 7:30 pm
by 16881567

I am stuck on the labels with the pie and also on the legend. Below are two screen grabs - one from the VCL version which shows it as I need to show it. The other is from the FMX version that is incorrect. I can't see any difference in the properties between the two versions. FMX just does things differently and I am not able to figure this out.

In the VCL version, you'll note that the legend shows a range of dollars donated, which is correct. It also shows another number in the legend, which represents the total dollars given from that range.

In the FMX version, I cannot seem to find how to get the pie chart's labels to show as $ (dollars), and the amounts on the legend also don't show as dollars. I've searched the help files but don't see how to set the marks for currency. Any help appreciated.


Re: One More FMX vs VCL Chart Help

Posted: Thu Aug 31, 2017 7:34 pm
by 16881567
Oops - sorry, I uploaded the wrong file. Here's the correct FMX file that shows the labels without the dollar signs that I referenced above.


Re: One More FMX vs VCL Chart Help

Posted: Fri Sep 01, 2017 7:48 am
by yeray

TeeChart converts the values to strings using the series ValueFormat, which is by default '#,##0.###'. You can add the '$' before it and it will do what you want. Ie:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
  Series1.AddPie(561, '$1.00 to $25.00');
  Series1.AddPie(909.5, '$26.00 to $50.00');
  Series1.AddPie(365, '$51.00 to $100.00');
  Series1.AddPie(3545, '$101.00 to $1,000.00');
  Series1.AddPie(2500, '$1,001.00 to $10,000.00');

Project1_2017-09-01_09-48-10.png (27.41 KiB) Viewed 3836 times