Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define a human readable label #99

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/L.Control.Heightgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -4953,7 +4953,7 @@ var schemeSet3 = colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9b
this._categories[y] = {
info: {
id: y,
text: data[y].properties.summary
text: data[y].properties.label || data[y].properties.summary
},
distances: [],
attributes: [],
Expand Down
2 changes: 1 addition & 1 deletion dist/L.Control.Heightgraph.min.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions example/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,8 @@ const geojson1 = [{
"properties": {
"Creator": "OpenRouteService.org",
"records": 10,
"summary": "surface"
"summary": "surface",
"label": "Surface"
}
}, {
"type": "FeatureCollection",
Expand Down Expand Up @@ -3118,7 +3119,8 @@ const geojson1 = [{
"properties": {
"Creator": "OpenRouteService.org",
"records": 42,
"summary": "waytypes"
"summary": "waytypes",
"label": "Waytypes"
}
}, {
"type": "FeatureCollection",
Expand Down Expand Up @@ -4734,7 +4736,8 @@ const geojson1 = [{
"properties": {
"Creator": "OpenRouteService.org",
"records": 31,
"summary": "steepness"
"summary": "steepness",
"label": "Steepness"
}
}, {
"type": "FeatureCollection",
Expand Down Expand Up @@ -6405,6 +6408,7 @@ const geojson1 = [{
"properties": {
"Creator": "OpenRouteService.org",
"records": 36,
"summary": "suitability"
"summary": "suitability",
"label": "Suitability"
}
}];
2 changes: 1 addition & 1 deletion src/L.Control.Heightgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ import {
this._categories[y] = {
info : {
id: y,
text: data[y].properties.summary
text: data[y].properties.label || data[y].properties.summary
},
distances: [],
attributes: [],
Expand Down