0

I added local names in locale and change xAxis.dateTimeLabelFormats.weeks. But when I navigate to short time period, it shows Week (not Неделя as expected)

enter image description here

On longer time period it shows right Week name (as Неделя) enter image description here

xAxis = {
    ...
    dateTimeLabelFormats: {
        hour: { list: ['%H:%M', '%H'] },
        day: { list: ['%A, %e. %B', '%a, %e. %b', '%E'] },
        week: { list: ['Неделя %W', 'Н%W', 'Н%W'] },
        month: { list: ['%B', '%b', '%o'] },
    },
}

highcharts version 9.3.3

How can I fix this bug?

Thanks for help!

Citizen_39895
  • 65
  • 2
  • 6

1 Answers1

1

This is the correct behavior that is caused by setting dateTimeLabelFormats only for one xAxis. In case of your requirements, you need to set theese options for both axis:

xAxis:[{
    dateTimeLabelFormats: {
            hour: {
                list: ['%H:%M', '%H']
            },
            day: {
                list: ['%A, %e. %B', '%a, %e. %b', '%E']
            },
            week: {
                list: ['Неделя %W', 'W%W']
            },
            month: {
                list: ['%B', '%b', '%o']
            }
        },
},{
    dateTimeLabelFormats: {
            hour: {
                list: ['%H:%M', '%H']
            },
            day: {
                list: ['%A, %e. %B', '%a, %e. %b', '%E']
            },
            week: {
                list: ['Неделя %W', 'W%W']
            },
            month: {
                list: ['%B', '%b', '%o']
            }
        },
}],

Demo: https://jsfiddle.net/BlackLabel/fwpusL5n/

magdalena
  • 2,657
  • 1
  • 7
  • 12