Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Major gridlines and week display behaviour #1405

@marcortw

Description

@marcortw

I'm working on something which preferably displays data on week level rather than day/exact planning level. I have the following defined in my timeline:

[...]
format: {
            minorLabels: {
                millisecond: 'w',
                second: 'w',
                minute: 'w',
                hour: 'w',
                weekday: 'w',
                day: 'w',
                month: 'w',
                year: 'w'
            },
            majorLabels: {
                millisecond: 'MMM-YY',
                second: 'MMM-YY',
                minute: 'MMM-YY',
                hour: 'MMM-YY',
                weekday: 'MMM-YY',
                day: 'MMM-YY',
                month: 'MMM-YY',
                year: 'MMM-YY'
            }
        },

timeAxis: {scale: 'weekday', step: 7},
[...]

I also have a snap function which snaps new elements to the beginning of the week (which is Sunday in my case). This results in the following picture:

gridlines_and_weeks

As I see it, the vertical grid lines seem to be influenced by the beginning of the month, i.e. a new major grid line is calculated at every first of the month, and as it seems, influence the grid lines of that respective month. Take December as an example: I assume that because I defined step to be 7 and the major grid line at each month's beginning can't be ignored, a major grid line is drawn at the 1st + 7 = 8th of December which is a Tuesday. Is my assumption/understanding of the behavior correct?

What I'd like to have is a major grid line starting with every start of the week, ignoring the new grid line at every first day of the month. Incidentally, this year's November is a good example how i'd like to have it: the major grid lines neatly align with the position of my Sunday-snapped items.

Is there a possibility to change this behavior, for example to turn off the major grid line at the 1st of each month?

Best regards
Marco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions