kevinsqi / react-calendar-heatmap

An svg calendar heatmap inspired by github's contribution graph
http://www.kevinqi.com/react-calendar-heatmap/
MIT License
1.23k stars 156 forks source link

Limit of weekday labels #165

Open nikfedotoff opened 3 years ago

nikfedotoff commented 3 years ago

Is it possible to display all 7 weekday labels?

aditodkar commented 1 year ago

I am facing same problem:

<CalendarHeatmap
        startDate={shiftDate(today, -30)}
        endDate={today}
        values={randomValues}
        classForValue={(value) => {
          if (!value) {
            return "color-empty";
          }
          return `color-github-${value.count}`;
        }}
        tooltipDataAttrs={(value) => {
          return {
            "data-tip": `${value.date.toISOString().slice(0, 10)} has count: ${
              value.count
            }`
          };
        }}
        weekdayLabels={[
          "Sunday",
          "Monday",
          "Tuesday",
          "wed",
          "Thursday",
          "Friday",
          "Sat"
        ]}
        onClick={(value) =>
          alert(`Clicked on value with count: ${value.count}`)
        }
      />

Even after passing weekdayLabels prop it does not render all the 7 weekday labels