ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  about addCustomAggregateLabel!
Posted by Ji-hyeon Choi on Jul-29-2024 16:41
Attachments:
AddCustomAggregateLabel() was used to indicate cumulative data labels, and hard coding is performed to indicate data labels for each layer as well. So, formatting is applied to cumulative labels, but hard-coded data labels are not. Is there a way to apply it?
Or is there a way to get the string value back with the formatting applied?
formatting.PNG

  Re: about addCustomAggregateLabel!
Posted by Ji-hyeon Choi on Jul-29-2024 16:43
Attachments:
this is code
code.PNG

  Re: about addCustomAggregateLabel!
Posted by Peter Kwan on Jul-29-2024 18:13
Hi Ji-hyeon Choi,

By "format", are you referrring to the numeric format, like some labels are displayed as "12,000", while another label is displayed as "12000" (no thousand comma separator)?

In your code, I find a line:

    szTemp.append(String.valueOf((int)data));

If the above is the line that adds the data labels, you can use BaseChart.formatValue to format the value to have thousand separator.

https://www.advsofteng.com/doc/cdjava.htm#BaseChart.formatValue.htm

It is like:

   szTemp.append(myChart.formatValue((int)data, "{value|,}"));


Best Regards
Peter Kwan