Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaffuri committed Jan 8, 2024
1 parent 22398d3 commit 019eac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 3 additions & 10 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
Expand Down

0 comments on commit 019eac0

Please sign in to comment.