Skip to content

Commit

Permalink
deprecate threshold in favour of thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
joewdavies committed Dec 18, 2024
1 parent a80ae04 commit 9617470
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build/eurostatmap.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/eurostatmap.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions examples/world.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<body style="margin: 0">
<svg id="map"></svg>
<script src="https://unpkg.com/eurostat-map"></script>
<script src="../build/eurostatmap.js"></script>
<!-- <script src="https://unpkg.com/eurostat-map"></script> -->
<script>
let data = {
JM: 70,
Expand Down Expand Up @@ -279,8 +280,8 @@
.seaFillStyle('#E6FFFF')
.labelling(true)
.labelsToShow(['seas'])
.classifMethod('threshold')
.threshold([10, 20, 30, 40, 50, 60, 70])
.classificationMethod('threshold')
.thresholds([10, 20, 30, 40, 50, 60, 70])
.colors(['#174060', '#1C627C', '#288AA1', '#2CAFC4', '#FDBEB0', '#F3767E', '#CE3658', '#94003A'])

map.statData().setData(data)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eurostat-map",
"version": "4.0.5",
"version": "4.0.6",
"description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
"keywords": [
"eurostat",
Expand Down
1 change: 1 addition & 0 deletions src/core/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const defineDeprecatedFunctions = (out) => {
out.pixSize = (v) => (console.warn('map.pixelSize() is now deprecated. Please use the z property in map.position({x,y,z}) instead.'), out.position_.z = v, out);
out.tooltipText = (v) => (console.warn('map.tooltipText() is now deprecated. Please use map.tooltip(config.textFunction) instead. See API reference for details.'), out.tooltip_.textFunction = v, out);
out.classifMethod = (v) => (console.warn('map.classifMethod() is now DEPRECATED. please use map.classificationMethod() instead.'), out.classificationMethod_ = v,out);
out.threshold = (v) => (console.warn('map.threshold() is now DEPRECATED. please use map.thresholds() instead.'), out.thresholds_ = v,out);
out.clnb = (v) => (console.warn('map.clnb() is now DEPRECATED. please use map.numberOfClasses() instead.'), out.numberOfClasses_ = v,out);
out.nutsLvl = (v) => (console.warn('map.nutsLvl() is now DEPRECATED. please use map.nutsLevel() instead.'), out.nutsLevel_ = v,out);
out.lg = (v) => (console.warn('map.lg() is now DEPRECATED. please use map.language() instead.'), out.language_ = v,out);
Expand Down

0 comments on commit 9617470

Please sign in to comment.