diff --git a/docs/reference.md b/docs/reference.md index bbe182bf0..2acd60658 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -368,16 +368,11 @@ For more information on these functions and an overview of how they differ, see: ## Legends -Gridviz offers different types of legends that are suited to different cartographic styles, namely: +Gridviz offers several types of legends that are suited to different cartographic styles. -- [Color legend](#color-legend) -- [Color discrete legend](#color-discrete-legend) -- [Color category legend](#color-category-legend) -- [Orientation legend](#Orientation-legend) -- [Size legend](#size-legend) -- [Width legend](#Width-legend) +The legend elements are added within a default HTML element. To define where the legend elements should be added, see [this example](https://eurostat.github.io/gridviz/examples/legends/external_legend.html) ([code](https://github.com/eurostat/gridviz/blob/master/examples/legends/external_legend.html)). -You can style each legend by using the 'D3-like' style() function after constructing your legend, like so: +Each legend can be customised using the 'D3-like' *style()* function after constructing the legend, like so: ```javascript new gridviz.SizeLegend({ @@ -388,8 +383,6 @@ new gridviz.SizeLegend({ }).style('padding', '0px 5px') ``` -The legend elements are added within a default HTML element. To define where the legend elements should be added, see [this example](https://eurostat.github.io/gridviz/examples/legends/external_legend.html) ([code](https://github.com/eurostat/gridviz/blob/master/examples/legends/external_legend.html)). - ### Color legend ![](img/legends/color_legend.png) diff --git a/src/TODO.txt b/src/TODO.txt index d33e52b85..18d1894f7 100644 --- a/src/TODO.txt +++ b/src/TODO.txt @@ -11,6 +11,7 @@ population.csv files: make 2021 ones legends: add scale.invert everywhere ? make parameter both a function and a static value - check how it is done in d3 bug un fullscreen button. On fullscreen exit. +geojson integrate scale and color-scale: colors scale should be based on size scale, with [0,1] color scale as range ? extract modules ?