Перейти к основному содержимому

UNITS_scale_text

к сведению

Эта функция доступна только в PRO-версии.

Description

Определяет элементы, отображаемые на оси X

UNITS_scale_text: (key: string, label: string, unit: object, date: Date) => string;

Parameters

  • key - (required) string - идентификатор единицы
  • label - (required) string - метка для единицы
  • unit - (required) object - объект, представляющий единицу, включая 'key' и 'label'
  • date - (required) Date - дата, соответствующая колонке (полезно для просмотра с несколькими днями)

Returns

  • text - (string) - HTML-контент для отображения в scheduler

Example

scheduler.templates.unit_scale_text = function(key, label, unit, date) {
if (option.css) {
return "<span className='" + option.css + "'>" + label + "</span>";
} else {
return label;
}
};

Applicable views: Units view

Details

примечание

Этот template требует включения плагина units.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.