Tell me please how to redner date on chart?On x axis id like to show date in format "m-d".
Tell me please hot to make it. Unfortunately my graph shows date like "Y-m-d h-i-s" in attachment.
axes: [{
type: 'numeric',
position: 'left',
grid: true
},
{
type: 'time',
position: 'bottom',
visibleRange: [0, 1],
}
],
series: [{
type: 'line',
highlight: true,
xField: 'date',
yField: ['count'],
title: ['Настройка из ЛК штук'],
// Отображение подсказки при наводке на график
tooltip: {
trackMouse: true,
renderer: function(tip, item) {
// Определяем день и месяц для их корректного отображения в tip
var date = new Date(item.get('date'));
var day = date.getDate();
// Прибавляем к месяцу 1 , т.к getMonth почемуто возвращает на месяц меньше
var month = date.getMonth() + 1;
tip.setTitle('Количество: ' + item.get('count') + ' шт.');
tip.update('Дата: ' + day + "." + month);
}
}
}]