Highcharts DateTime Localization

后端 未结 6 766
伪装坚强ぢ
伪装坚强ぢ 2021-01-31 14:38

Can someone point me to how I can localize the date-related Strings which are hardcoded in the HighCharts js-file. For instance, instead of the default \'Feb\' date label in the

6条回答
  •  余生分开走
    2021-01-31 15:33

    To localize weekdays, Highcharts.setOptions should be called before chart creation and contain the new weekday names:

    Highcharts.setOptions({
        lang: {
            weekdays: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi']
    } });
    

    Note that the array should start with the name for Sunday not Monday (the first day of the work week).

    Example on jsFiddle

    enter image description here

提交回复
热议问题