Richardsl / heatmap-calendar-obsidian

An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Apache License 2.0
645 stars 103 forks source link

Outdated readme #10

Closed metruzanca closed 2 years ago

metruzanca commented 2 years ago

Currently the readme has:

colors: {   // optional, defaults to green
  blue:        ["#8cb9ff","#69a3ff","#428bff","#1872ff","#0058e2"], // this first entry is considered default
//...
},

But these values aren't optional. If you take colors object out you get a render error.

Intensity is also not optional. This also throws a render error if its missing. With the values 1-5 not actually changing anything.

metruzanca commented 2 years ago

Actually after some trial and error. It I just needed to also remove the intensity and color from the push from the example. My bad.

Though, intensity does seem to still be required to at least show the item.

Richardsl commented 2 years ago

yes it seems your right, ill fix it in the next version. Thanks for letting me know

metruzanca commented 2 years ago

@Richardsl could we also get some more information on how "intensity" works? In the example you're feeding it stuff like e.g. "25 minutes" which doesn't line up with the comment "optional, what color intensity to use for entry, will autoscale. Default 4 (1-5)". I also couldn't get the color to change when passing it an intensity.

Richardsl commented 2 years ago

You need at least 2 entries with different intensities in order for the intensity to change, or else it will default to intensity 4 aka the second most intense color in you colors array.

added following paragraph to readme:

Intensity:

The "Intensity" means which intensity of color to use, for instance from light-green to dark-green.
The plugin currently supports five intensities, and they will be distributed between the highest and lowest number you pass to "intensity".
e.g if the number range 0-100 is used, numbers between 1-20 would map to the ligthest color, 40-60 would map to mid intensity color, and 80-100 would map to max intensity.

Dataview's time variables are supported without any conversion, as they return milliseconds på default.
e.g [time:: 1 hours, 35 minutes] => intensity: page.time

metruzanca commented 2 years ago

Dataview's time variables are supported without any conversion, as they return milliseconds på default. e.g [time:: 1 hours, 35 minutes] => intensity: page.time

Oh thats convenient, I didn't know that about dataviewjs. Very useful. Thanks so much for clarifying this!