简体   繁体   中英

Angular Gantt chart with days and dates

I do not know angular js & i am using angular gantt chart from here https://github.com/angular-gantt/angular-gantt & this chart shows dates but not days(Su, Mo,Tu.. etc). Changing the scale is not helping. So what can i do to show days in angular gantt chart.

If i need to make changes in the code please let me know.

Thanks in advance.

This is very similar to this post if not the same.

However, to summarize what was stated there and what I have found by experience, you want to use the headers-formats attribute in combination with the headers attribute on the gantt directive.

var options = {
  headers: ['month', 'day'],
  headersFormats: {
    month: 'MMM',
    day: 'dd'
  } 
}

That should do what you want it to do. The scale just changes the increments of the columns ('days', 'weeks', 'months', etc...).

For more information, see the documentation for angular-gantt and more specifically the documentation for the headers-formats attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM