diff --git a/index.html b/index.html index e709b88..1a3c8b2 100644 --- a/index.html +++ b/index.html @@ -120,6 +120,7 @@

svelte-heatmap

startDate: moment().subtract(5, 'months').toDate(), endDate: moment().toDate(), view: 'monthly', + displayLegend: false, }, target: document.querySelector('#monthly'), }); diff --git a/src/SvelteHeatmap.svelte b/src/SvelteHeatmap.svelte index 23d19d8..1b48963 100644 --- a/src/SvelteHeatmap.svelte +++ b/src/SvelteHeatmap.svelte @@ -53,6 +53,16 @@ {/each} {/if} + {#if displayLegend} + + {/if} \ No newline at end of file diff --git a/src/views/Legend.svelte b/src/views/Legend.svelte new file mode 100644 index 0000000..21c470b --- /dev/null +++ b/src/views/Legend.svelte @@ -0,0 +1,42 @@ + + {#each colors as color, index} + + {/each} + + Less + + + More + + + + \ No newline at end of file