JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Charts & Data Viz › Axes format function › Reply To: Axes format function
July 18, 2022 at 8:48 am
#103380
svetoslav_borislavov
Participant
Hi,
The format function accepts the value. You can modify it as you want and then return it.
Here is an example of formatting the date in the area Range Line Demo to hh:mm
https://codepen.io/svetoslavb04/pen/oNqBRXe
formatFunction: (value) => {
const hours = value.getHours().toString().padStart(2, 0);
const minutes = value.getMinutes().toString().padStart(2, 0);
return hours + ':' + minutes;
}
Should you need any further assistance, please do not hesitate to contact us.
Best Regards,
Svetoslav Borislavov
Smart UI Team
https://www.htmlelements.com/
- This reply was modified 2 years, 2 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 2 months ago by svetoslav_borislavov.