Hi There
How can we set the number to be displayed properly according to our national standards?
We use dot as thousand separator and comma as decimal pointer (10.510,75)
(Editing in settings "format:number:defaultPattern" obviously cannot produce the correct format)
This is a raw and hardcode solution on Kibana 5.4 that worked for me:
open the file src/ui/public/stringify/types/_numeral.js
find in the file the conversion function:
Numeral.prototype._convert = function (val) {
if (val === -Infinity) return '-∞';
if (val === +Infinity) return '+∞';
if (typeof val !== 'number') {
val = parseFloat(val);
}
Numeral.prototype._convert = function (val) {
if (val === -Infinity) return '-∞';
if (val === +Infinity) return '+∞';
if (typeof val !== 'number') {
val = parseFloat(val);
}
if (isNaN(val)) return '';
return numeral.set(val).format(this.param('pattern')).replace(",","t").replace(".",",").replace("t",".");
};
-to apply these changes delete whole content of optimize/bundles directory then restart the Kibana (bundles will be regenerated by kibana at startup)
Again this is a hack solution I hope the globalization feature will be available soon in Kibana...
Hi Paolo
Thanks for the hack. It only replaces the first comma in case of more commas, so we just reworked it a little to this which replaces all occurences.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.