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

Support for binary/boolean boxes? #91

Open
onejgordon opened this issue Aug 29, 2023 · 1 comment
Open

Support for binary/boolean boxes? #91

onejgordon opened this issue Aug 29, 2023 · 1 comment

Comments

@onejgordon
Copy link

I'm trying to visualize binary data based on the completed status of tasks, in which each box is either gray (no matching task present on that day, or matching task but not completed), or colored (matching completed task on day). None of the intensity and intensity range configurations I've tried so far give me the effect sought.

I've tried:

defaultEntryIntensity: 1,  
intensityScaleStart: 1,   
intensityScaleEnd: 100,

With entry intensity in {1, 100}.

defaultEntryIntensity: 0,  
intensityScaleStart: 0,   
intensityScaleEnd: 100,

With entry intensity in {0, 100}.

defaultEntryIntensity: 0,  
intensityScaleStart: 0,   
intensityScaleEnd: 1,

With entry intensity in {0, 1}.

These result in 3 intensity levels visible in the grid, where missing, not completed, and completed appear differently. I expected defaultEntryIntensity to govern the color for missing entries, but this doesn't seem to be the case.

I assume I'm missing a simpler configuration that achieves this.

@GoogilyBoogily
Copy link

Hey @onejgordon

I was able to get it working when I manually defined a color array in the calendarData parameter. Here's my code:

const calendarData = {
	colors: {
		completedOrNot: ["#ff0000", "#00ff00"]
	},
	defaultEntryIntensity: 0,
	intensityScaleStart: 0,
	intensityScaleEnd: 1,
	entries: []
};

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