diff --git a/index.html b/index.html index e75e892..f7efa02 100644 --- a/index.html +++ b/index.html @@ -402,6 +402,99 @@

Using external data, adding tooltips, styling boundaries

+
+

Using external data, adding tooltips, styling boundaries

+

This example loads in an external HexJSON file, loads in some data, and then colours the hexes depending on the data. To work out the colours we'll make a little helper function ColourScale.

+

This example also styles the lines defined in the HexJSON by calling this.updateBoundaries(fn) with a function, fn, that has the line ID and line properties as input parameters. This allows us some flexibility in how different lines are styled.

+
+ +
+
+
Cartogram showing UK constituencies coloured by the number of signatures they received on House of Commons petitions during 2017-2019. Data from The House of Commons Library. Layout by Open Innovations and contributors.
+
+ +
+
+

London 1895

@@ -460,8 +553,6 @@

London 1895