• Resolved poetaster

    (@poetaster)


    Hej, I’m poking around to see if I can provide a patch myself, but perhaps you have an answer:

    How do we subsitute period for comma in number formats (the Germans use . instead of , to display thousands, etc).

    Thanks and regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter poetaster

    (@poetaster)

    Ok, I’ve solved the is the wrong way:

    easy charts (includes/js/d3.js)

    2834   var d3_locale_enUS = d3.locale({
    2835     decimal: ".",
    2836     thousands: ",",
    2837     grouping: [ 3 ],
    2838     currency: [ "$", "" ],
    2839     dateTime: "%a %b %e %X %Y",
    2840     date: "%m/%d/%Y",
    2841     time: "%H:%M:%S",
    2842     periods: [ "AM", "PM" ],
    2843     days: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
    2844     shortDays: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
    2845     months: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
    2846     shortMonths: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]
    2847   });
    2848   var d3_locale_deDE = d3.locale({
    2849     decimal: ",",
    2850     thousands: ".",
    2851     grouping: [ 3 ],
    2852     currency: [ "€", "" ],
    2853     dateTime: "%A, der %e. %B %Y, %X",
    2854     date: "%d.%m.%Y",
    2855     time: "%H:%M:%S",
    2856     periods: [ "AM", "PM" ],
    2857     days: [ "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag" ],
    2858     shortDays: [ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa" ],
    2859     months: ["Januar", "Februar", "M?rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
    2860     shortMonths: [ "Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez" ]
    2861   });
    2862   d3.format = d3_locale_deDE.numberFormat;
    Plugin Author Kiran Potphode

    (@kiranpotphode)

    Hi @poetaster,

    This plugin is based on an open source library known as d3js.
    The functionality provided by the plugin is a subset of possible usage of the library.

    The best place to submit such patches would be https://github.com/d3/d3.

    Thanks for your interest in helping out with your efforts.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Localized numerical formatting (. for ,)’ is closed to new replies.