You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- new option `noDataColor`: fill color to use for features with null/nodata attribute values. In polygon, point-color and line-color modes. (default: '#606060'). Also appears in legend as a separate class/category. Currently, null/nodata features are not assigned a distinctive symbol when in point-size and line-width modes.
- new option `noDataIgnore`: if true, features with null attribute values are not shown on the map. This also means the legend will not have a nodata classs (default: false)
- new option `nodata` in `legendTemplate`: you can now customize the nodata text in Legend
- modified classification code to filter out null attribute values when generating classes
- more thorough check for non-existing attribute field vs. null as attribute value (with more concise error messages)
- legend data rows (symbol + key) now have a css class (`legendDataRow`), set in leaflet-dataclassification.css, resulting in a cleaner legend-generation code
- updated examples (`combined.html` dataset: density value for North Dakota has been nulled to showcase nodata handling; all show an info panel about the plugin; overriding Chrome's built-in CSS rules to avoid focus rectangle on clicking polygons on a Leaflet map)
- updated documentation
- updated main screenshot
- `colorRamp <string>`: color ramp to use for symbology. Based on ColorBrewer2 color ramps (https://colorbrewer2.org/), included in Chroma.js. Custom colors (`colorCustom`) override this. (default: 'PuRd')
109
113
- `colorCustom <array<string>>`: custom color ramp defined as an array, colors in formats supported by Chroma.js, with opacity support. A minimum of two colors are required. If defined, custom colors override `colorRamp`. Example: ['rgba(210,255,178,1)', '#fec44fff', 'f95f0eff']. Examples for yellow in different color formats: 'ffff00', '#ff0', 'yellow', '#ffff0055', 'rgba(255,255,0,0.35)', 'hsla(58,100%,50%,0.6)', chroma('yellow').alpha(0.5). For more formats, see: https://gka.github.io/chroma.js/. For an interactive color palette helper, see: https://gka.github.io/palettes/.
114
+
- `noDataColor <string>`: fill color to use for features with null/nodata attribute values. In polygon, point-color and line-color modes. (default: '#606060')
115
+
- `noDataIgnore <boolean>`: if true, features with null attribute values are not shown on the map. This also means the legend will not have a nodata classs (default: false)
110
116
- `reverseColorRamp <boolean>`: if true, reverses the chosen color ramp, both in symbology on map and legend colors. Useful when you found a great looking colorramp (green to red), but would prefer reversed colors to match visual implications about colors: green implies positive, red implies negative phenomena. (default: false)
111
117
- `middlePointValue <number>`: adjust boundary value of middle classes (only when classifying into even classes). Useful for symmetric classification of diverging data around 0. Only use a value within the range of the two middle classes.
112
118
- `classRounding <integer>`: class boundary value rounding. When positive numbers are used for this option, class boundary values are rounded to x decimals, zero will round to whole numbers, while negative numbers will round values to the nearest 10, 100, 1000, etc. Example: with a setting of "1", a value of 254777.253 will get rounded up to 254777.3, with "0" it will be 254777, with "-2" it will become 254800. (default: null - no rounding happens, values are used as-is)
- `highest <string>`: template for the upper end of classes, "highest value and above" (default: '{low} <')
118
124
- `middle <string>`: template for rows in the middle, "low to high" (default: '{low} – {high}')
119
125
- `lowest <string>`: template for the lower end of classes, "lowest value and below" (default: '< {high}')
126
+
- `nodata <string>`: text to show for null/nodata class (default: 'No data')
120
127
- `unitModifier <object>`: modifies the final class boundary values in order to multiply/divide them by a number. Useful for example when a dataset attribute is in metres, but kilometres would fit the legend better (786000 metres shown as 786 km). Purely visual, only affects legend. Happens after classRounding.
121
128
- `action <string>`: ['divide'|'multiply'] action to take on the number specified by `by`. Required for `unitModifier`.
122
129
- `by <number>`: a number to divide/multiply class boundary values with. Required for `unitModifier`.
0 commit comments