score:0
ok here you go, takes the 2 arguments specified in the comments, and assumes a reasonable version of js is running.
function getticks(starttime, count) {
let ticks = [],
date = starttime;
for (let x = 0; x < count; x++) {
let hours = date.gethours().tostring(),
mins = date.getminutes().tostring(),
seconds = date.getseconds().tostring();
date = new date(date.gettime() + 60000);
ticks.push(`${hours.padstart(2, '0')}:${mins.padstart(2, '0')}:${seconds.padstart(2, '0')}`);
}
return ticks;
}
Source: stackoverflow.com
Related Query
- How to parse time 'HH:MM:SS' and display steps on xAxis every minute in Chart.js
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- How can I datalabels and Sum display in the same time on a stacked bar
- How to get chart from data points (arrays) with inconsistent time intervals and chart.js?
- how to display multiple sum with chart js and laravel?
- How to plot chart from external JSON and format X-AXIS to show time using Chart.JS?
- How to set the xAxes min and max values of time cartesian chart in Chart.js
- how can i use chart.js to create a chart that has one time series line and one linear line on it at the same time?
- How to take a set of Date objects and display the frequency based on time of day using ChartJS
- Chart.js How to sum the values in a pie chart and display them in the header
- How to start the chart from specific time and offest hour and then show the data on chart from target datetime in chartjs
- Chart.js how to show line chart without displaying the labels on xaxis and yaxis
- How remove duplicates xAxis labels and show all values on chart
- How do i have a single Chart.vue component instead of different chart components and then display charts from it by changing id of the API
- How to open a new Tab with javascript and display some chart
- How to adding data in loop and display chart dynamically like in live (chart.js & typescript & angular)?
- Laravel - How to Display both count and percentage (%) in chartjs pie chart
- How to prevent first/last bars from being cut off in a chart with time scale
- How to save Chart JS charts as image without black background using blobs and filesaver?
- How to display Line Chart dataset point labels with Chart.js?
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to display value of only one datapoint in line chart
- Problem for display a chart with Chart.js and Angular
- How to use PrimeNg Chart of Width and Height?
- How to display inline values in a stacked bar chart with Chart.js?
- How to display data labels outside in pie chart with lines in ionic
- Category scale on Y-axis and time on x-axis in bubble chart in Chartjs
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How to feed hour and minute data into chartJS
- How to display the labels in doughnut chart using ng2 charts?
More Query from same tag
- How to set a global chart.js tooltip label callback
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- Access data arrays from c# method inside JavaScript inside .cshtml file
- Chartjs initial animation want to change from left to right (default it is bottom to top)
- Chart.js Doughnut Chart Rendering Wrong
- JavaScript Error - Uncaught SyntaxError: Unexpected token {
- Dynamically set data on Angular-chart.js
- How to chart detected activities on the hour using Chart.js
- Reloading ChartJs Image
- ChartJS changing graphs based upon Drop Down selection
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Error on Chart.js with Electron - Failed to create chart: can't acquire context from the given item
- Building Chart.js master - generated .js gives errors
- Ajax automatically placing double quotes around variable data returned in success call
- How to use radial CanvasGradients with Chart.js's doughnut chart?
- Error: Failed to create chart: can't acquire context from the given item
- Angular-Chart-JS - Line chart with different fill colors according to points' range
- How to offset x and y axis grid points and labels using chart.js?
- i want display chart based on selected charts using chartJS
- Chartjs stacked bar single max value
- Chartjs v2 xAxes label overlap with scaleLabel
- Doughnut chart adjusting problem in chart.js
- Where is radar.js?
- Angular / ng2-charts: Fetching json data in chart object showing: Cannot read property 'length' of undefined
- Chart.js loading data colors from PHP
- Two pie charts in one flexbox container
- How can I add background color of length bars in chart (chartJS)?
- How to show tick marks and labels with grid line for the specific one on the X axis with Chart.js?
- Chart.js misreading arrays for labels and axes
- How to specify hover color angular-chart.js