[reportlab-users] French formatting of decimal for chart labelaxis

Stevens, Ian IStevens at globeandmail.com
Fri Aug 1 15:58:50 EDT 2008


Thanks. I didn't use locales as they are not properly set up on the server from which I'm running Reportlab. Howver, I just realised that labelTextFormat also accepts a function so I will be using that to my advantage.

Ian.


> -----Original Message-----

> From: reportlab-users-bounces at reportlab.com

> [mailto:reportlab-users-bounces at reportlab.com] On Behalf Of

> Harald Armin Massa

> Sent: Friday, August 01, 2008 2:27 PM

> To: Support list for users of Reportlab software

> Subject: Re: [reportlab-users] French formatting of decimal

> for chart labelaxis

>

> Ian,

>

> If you have floating point numbers, you can use locale from

> the python standard lib.

>

> If you are using Decimals from decimal.Decimal, the most

> effective way is to use pybabel. I tried to avoid another

> dependencie, but everything else takes even more time. So: be

> as wise as I am now, not as I was before, and use pybabel

> from the start :)

>

> Harald

>

> On Fri, Aug 1, 2008 at 19:54, Stevens, Ian

> <IStevens at globeandmail.com> wrote:

> > Hi everyone. I have a plot, specifying the label format as

> a percent

> > for the yValueAxis like so:

> >

> > plot.yValueAxis.labelTextFormat = '%1.1f%%'

> >

> > That's fine for English decimals, eg. 3.5%, but now there's a

> > requirement for French decimal format, eg. 3,5%. How would

> I acheive

> > this using the labelTextFormat property?

> >

> > thanks,

> > Ian.

> >

> > _______________________________________________

> > reportlab-users mailing list

> > reportlab-users at reportlab.com

> > http://two.pairlist.net/mailman/listinfo/reportlab-users

> >

> >

>

>

>

> --

> GHUM Harald Massa

> persuadere et programmare

> Harald Armin Massa

> Spielberger Straße 49

> 70435 Stuttgart

> 0173/9409607

> no fx, no carrier pigeon

> -

> EuroPython 2009 will take place in Birmingham - Stay tuned!

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>



More information about the reportlab-users mailing list