Need a special offer?Find out if your project fits.
+

Euro Symbol on PDF Export

Answered
Davide Marro asked on May 16, 2017

Hi,
i have this format in the report object :
{
"name": "valuta_euro",
"thousandsSeparator": ".",
"decimalSeparator": ",",
"decimalPlaces": 2,
"maxDecimalPlaces": -1,
"maxSymbols": 20,
"currencySymbol": "€",
"currencySymbolAlign": "left",
"nullValue": "0",
"infinityValue": "Infinity",
"divideByZeroValue": "Infinity",
"textAlign": "right",
"isPercent": false
}
 
On the grid, i can see this value correctly.
When i export to PDF the symbol € is showed as "€".
 
How i can correct this ?
 
Greetings

20 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster May 16, 2017

Hello Davide,
Thank you for your question. Could you please try it using the "€" sign instead of "€". It will look like the following:
{
"name": "valuta_euro",
"thousandsSeparator": ".",
"decimalSeparator": ",",
"decimalPlaces": 2,
"maxDecimalPlaces": -1,
"maxSymbols": 20,
"currencySymbol": "€",
"currencySymbolAlign": "left",
"nullValue": "0",
"infinityValue": "Infinity",
"divideByZeroValue": "Infinity",
"textAlign": "right",
"isPercent": false
}

Please let us know if everything works fine for you.
Best regards,
Dmytro.

Public
Davide Marro May 17, 2017

Yes,
I had already used it but the symbol does not appear correctly on the grid.
Greetings

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster May 18, 2017

Hi Davide, 

This issue will be resolved in the closest minor build 2.316 that will be available to download next Monday (May 22nd)

Best,
 Dmytro

Public
Davide Marro May 19, 2017

Thank you.
Greetings

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster May 22, 2017

Hello Davide,
I am glad to inform you that the minor release 2.316 is available for download now. 
You are welcome to update the component. Also, we recommend you to use the UTF-8 representation of the "€" sign which is "&#"+"8364;".
Kind regards,
Dmytro.

Public
Davide Marro May 23, 2017

Ok thanks for the assistance!
Now it works: D
Greetings

Public
Randolph Kepplinger January 17, 2020

I have the same problem with Stacked columns. I used
 

 
in the grid it displays correctly in the stacked colum chart it does not.

Public
Randolph Kepplinger January 17, 2020
Start your code here\&\#8364; because € does not work
Public
Randolph Kepplinger January 17, 2020

Is this still a bug in the charts or is there a standard solution for units/special characters?

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 20, 2020

Hi Randolph,
 
Thank you for writing to us.
 
If your data contains special characters such as "€", please make sure to use UTF-8 encoding. This can be achieved in two ways:
 

  1. Specify the encoding for your HTML page to UTF-8 using the content-type HTTP header or the corresponding meta tag:
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  2. If you are not able to change the content of your HTML file, you can embed Flexmonster Pivot in a separate JS file with specified UTF-8 encoding:
    <script src="yourfile.js" charset="UTF-8"></script>

 
After this, just set the "€" symbol as the value for the currencySymbol property and the currency symbol will be displayed correctly in the chart view as well.
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Public
Randolph Kepplinger January 20, 2020
the page itself does use utf-8, in the grid it is displayed correctly, but not in the chart.
<meta http-equiv=Content-Type content="text/html; charset=utf-8" />
Public
Randolph Kepplinger January 20, 2020

Hello Mykhailo,
 
please see above - I think this is not an issue of the encioding of the containing page.
 
kind regards
 
Randolph

Public
Randolph Kepplinger January 20, 2020

Do you have an online example where this is working, especially with the utf8 equivalent character?

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 20, 2020

Hi Randolph,
 
Thank you for your response.
 
Could you please let us know if the issue persists if you use the "€" symbol directly, instead of its HTML or UTF-8 code? It is generally advised to use symbols instead of their encoding to ensure proper performance.
 
We've prepared a small example for this on our JSFiddle: https://jsfiddle.net/flexmonster/f5p4kuhv/

Please note that JSFiddle uses UTF-8 encoding by default, so if you would like to test this locally while also controlling the meta encoding tag, feel free to check out the index.html file attached below.
 
In case this doesn't help resolve the issue, could you please provide us with a sample in order to help us reproduce it in our environment?
 
Looking forward to hearing from you.
 
Best regards,
Mykhailo

Attachments:
index.html

Public
Randolph Kepplinger January 20, 2020

Hello,
 
if you write
 

      currencySymbol: "€"

you can reproduce the problem.
Entering € does not work due to the problems described above.
 
kind regards
 
Randolph
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 22, 2020

Hi Randolph,
 
So far, we haven't managed to reproduce the issue on our side.
 
What we did was add the meta tag to specify the UTF-8 encoding and set the currency symbol explicitly (currencySymbol: "€"), as you can see in the example we've sent you earlier. With such configurations, everything is working well on our side and no issues occur. Please see the attached screenshots for the demonstration.
 
Could you please let us know if you think there are some details in your case we're missing which would help us understand the situation better?
 
Thank you in advance and looking forward to your reply.
 
Best regards,
Mykhailo

Public
Randolph Kepplinger January 23, 2020

Hello,
 
you can easily reproduce that by changing the € symbol in your jsfiddle example to the utf8 encoding using & # 8364; instead. or & euro ;
 
kind regards
 
Randolph

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 24, 2020

Hi Randolph,
 
The issue with inserting the symbol in Flexmonster charts as an HTML Entity (&#8364) is that while the pivot table grid is built with HTML, the charts are represented in the SVG format, which doesn't support HTML entities within its <svg> element.
 
Therefore, symbols defined as HTML entities will not be displayed correctly in the chart view, while also being shown normally in the grid.
 
For this reason we recommend using the actual symbol instead of its HTML representation.
 
Please let us know if you have any other questions we can help you with.
 
Best regards,
Mykhailo

Public
Randolph Kepplinger January 24, 2020

Hello,
as said before, the actual system is not working, and as the discussion in this thread implies, I am not the only person with such problems.
svg also supports unicode so it would be convenient to have an independent unicode representation that can be used. (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/unicode)
I am pretty sure it is generally very usefull to be able to enter unicode characters (just think about chinese or other chars) in the initalisation and have them work in pivot grid as well as chart.
obviously the chart can process it, so the grid should as well, if you want to support unicode.
 
kind regards
 
Randolph

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 27, 2020

Hi Randolph,
 
Thank you for sharing your thoughts on this.
 
We understand that such an approach of parsing special symbols might be more desirable in some situations. However, due to our current roadmap and technical specificities, it won’t be possible for us to focus on this feature in the nearest future.
 
That is why our usual suggestion in such cases is to use the character directly rather than the encoding in order to make the charts compatible with the grid in terms of special symbols.
 
Thank you for your understanding.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer