Home Forums FlexGanttFX Custom ChronoUnitDatelineModel

Viewing 1 reply thread
  • Author
    Posts
    • Sebastien
      Participant
      Post count: 2
      #14140 |

      Good Day,

      I am writing this message because I want to create my own custom ChronoUnitDatelineModel.
      I would like to display a custom date when zooming.
      For exemple i would like to not display the day but just the yyyy-mm-dd format. I don’t want moday to be displayed.

      How can I override the on in flexGantt?
      Where do I put it ?
      How is it going to be load?

      Have a nice day.

    • Dirk Lemmermann
      Keymaster
      Post count: 80
      #14141 |

      First of all: the basic docs for this model can be found here: https://flexgantt.atlassian.net/wiki/spaces/FFXMAN/pages/491800/3.6.1+Dateline+Model

      So you can copy the default model from there and customise it in a way that you like.

      Then you have to call gantt.getTimeline().getDateline().setModel(new MyCustomModel()).

      That’s all.

      Please be advised that it is important that the model has many resolutions as otherwise zooming will not work nicely. The zoom is based on the MPP property (millis per pixel) and the dateline tries to find the best matching resolution for a given mpp value. The more options are available the easier it is to find a good one (good = making good use of the available space).

      Dirk

Viewing 1 reply thread
  • You must be logged in to reply to this topic.