Page 1 of 1

Marks format

Posted: Thu Jan 10, 2019 10:18 pm
by 20083691
Is there any way to format the mark's number, qty of decimals and locale (to get client locale in case of web app)?

Thank you in advance

Re: Marks format

Posted: Mon Jan 14, 2019 8:07 am
by Christopher
Hello,

yes, you can use the Series.ValueFormat property, e.g.

Code: Select all

		private void InitializeChart()
		{
			Bar bar = new Bar(tChart1.Chart);

			bar.FillSampleValues();
			bar.ValueFormat = "0.00";
		}

Re: Marks format

Posted: Tue Jan 15, 2019 2:55 pm
by 20083691
Hi,
with you example i can set decimal qty, but what locale it takes?
Can I set the locale of the control or must I change the culture Info of the thread? (I need to set the client Culture Info in a webforms aplication to show numbers).

Thank you

Re: Marks format

Posted: Tue Jan 15, 2019 3:19 pm
by Christopher
Hermes wrote:
Tue Jan 15, 2019 2:55 pm
with you example i can set decimal qty, but what locale it takes?
Can I set the locale of the control or must I change the culture Info of the thread? (I need to set the client Culture Info in a webforms aplication to show numbers).
TeeChart is a standard .NET control, and as such I believe the only way is to change the locale of the thread. I don't think it is possible to change the locale of only a single .NET control.

Re: Marks format

Posted: Tue Jan 15, 2019 6:55 pm
by 20083691
Hi,
Regardless the .NET controls in general, assuming that on the server I have Spanish and a web client connects with English locale (request.UserLanguages [0] ), if I change the locale of the thread where I am creating the chart, will it be shown with the numerical format of English?

Regards

Re: Marks format

Posted: Wed Jan 16, 2019 11:13 am
by Christopher
Hello,
Hermes wrote:
Tue Jan 15, 2019 6:55 pm
if I change the locale of the thread where I am creating the chart, will it be shown with the numerical format of English?
Yes, I believe it will.