Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekday labels style don't take any effect #207

Open
shivamka1 opened this issue Mar 26, 2024 · 1 comment
Open

Weekday labels style don't take any effect #207

shivamka1 opened this issue Mar 26, 2024 · 1 comment

Comments

@shivamka1
Copy link

I was trying to add some space between weekday lables and the graph but it doesn't seem to take any effect!

.react-calendar-heatmap-weekday-labels {
  margin-right: 5px !important;
  padding-right: 5px !important;
}

The only thing that seems to work is:

const weekdayLabels = document.getElementsByClassName('react-calendar-heatmap-weekday-labels');
  console.log(weekdayLabels);
  for (var elem of weekdayLabels) {
    elem.setAttribute('transform', 'translate(7, 14)');
  }

Please explain!

@felixmosh
Copy link

This because all elements are SVG, (even the text), this means that margin-* won't affect it...
You second method is the way to go :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants