<cfchart.. how do I set currency to pounds?

Hi,

Can anyone tell me how I set the laberlformat of a cfchart to a pound sign, rather than dollar sign.

In the .cfc that the chart is in, I am setting the locale to "English(UK)", which is setting all other local specifics to pounds [DollarFormat()..etc], but the labels in the chart are still showing a dollar sign.

I would have though that cfchart would have picked up on the Locale, but seemingly not.  Also, I can't find anywhere in the CF documentation or online that mentions how to force it.

Many thanks in advance.
<cfset setCurrentLocal = SetLocale("English (UK)")>
 
 
<cfchart chartwidth="390" chartheight="250" showlegend="false"  format="png" labelformat="currency" title="Comparative costs.">
                
                           <cfchartseries type="Bar" serieslabel="Total Costs" seriescolor="0163a7">
                                <cfchartdata item="Current estimated cost" value="#currentTotalEstimatedCost#">       
                                <cfchartdata item="Estimated cost if 90% registrations online" value="#currentProfitIncrease#">       
                                <cfchartdata item="Estimated revised cost" value="#ProfitIncrease#">   
                           </cfchartseries>
 
                        </cfchart>

Open in new window

Jay1607Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MauseCommented:
Try this:

<cfset locale = CreateObject("java", "java.util.Locale")>
<cfset locale = locale.init("en", "UK")>
<cfset locale.setDefault(locale)>

instead of <cfset setCurrentLocal = SetLocale("English (UK)")>
0
Jay1607Author Commented:
Hi Mause, thanks for your reply.

I tried your suggestion.  It did set the locale and convert currency to pounds for CFML (e.g. DollarFormat()), however in the cfgraph, I am getting a strange char instead.

Good thing is that the format is being accessed at least (not just getting the $), but not giving us the pound sign.

Please see screen dump attached.

Any ideas?

Many Thanks.

Jason
cfgraphCurrency.gif
0
SidFishesCommented:
maybe try using dollarformat  in your chartdata item value?

if that doesn't work try using LSEuroCurrencyFormat

0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

MauseCommented:
I added a file called mystyle.xml. Put this in the same directory as your cfm file and add style="mystyle.xml" to your cfchart tag. In this file I set the labelFormat/pattern and local.

You can (if you want) make more changes to the style than the default style attributes cfchart give you.

There is a file called "webcharts.bat" in you "\WEB-INF\cfusion\charting" directory. If you run this it will open a charting program webcharts3D that CF uses.
<cfchart style="mystyle.xml" chartwidth="390" chartheight="250" showlegend="false"  format="png" labelformat="currency" title="Comparative costs.">
    <cfchartseries type="Bar" serieslabel="Total Costs" seriescolor="0163a7">
         <cfchartdata item="Current estimated cost" value="#currentTotalEstimatedCost#">       
         <cfchartdata item="Estimated cost if 90% registrations online" value="#currentProfitIncrease#">       
         <cfchartdata item="Estimated revised cost" value="#ProfitIncrease#">   
    </cfchartseries>
 </cfchart>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MauseCommented:
hhmmm file is missing

This is what is in the mystyle.xml file


<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false" isTransposed="false" seriesTitle="" decoration="None" font="Arial-11" foreground="black" isMultiline="false">
	<yAxis type="Scale" isVisible="true" isAbsolute="true" scaleMin="0" scaleMax="450" >
		<labelFormat style="Currency" pattern="#,##0.00" timezone="">
			<locale lang="en" country="GB" variant=""/>
		</labelFormat>
	</yAxis>
</frameChart>

Open in new window

0
Jay1607Author Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.