Hi. I get the wrong formatting in my pie chart when I use special characters. In my script datasource I have tried with u “m³”, but it is displayed as Âm³. What can I do?
I see the str()
function where you are generating rows. That reverses the effect of the u’’ syntax.
You can try using the unicode()
builtin instead of str()
, or simply avoid that type coercion for known types.
I erased str() and added Alias1 = u"{0}".format(data[‘AliasColumn1’]) and now its working!!.
Thx alot for helping me!!!
I have another problem with the Report - Bar Chart component. It can display special characters like “åäö”, but not m³…
Reporting isn’t scripting. It doesn’t use the u’’ prefixes at all, and I don’t think it needs them.
The source dataset comes from a script.
Ah, I see. That is probably a problem with the font. Not all fonts implement all characters.
I think reporting is mangling the data keys, in some misguided attempt at sanitization.
Unfortunately I’m not sure if there’s a good fix. You could probably apply correctly encoded names in configureChart
, but how would you know the correct name(s) to reapply outside of hardcoding things?