Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
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
4 changes: 2 additions & 2 deletions dist/data_formatter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/data_formatter.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/partials/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ <h5 class="section-heading">Map Data Options</h5>
<label class="gf-form-label width-12">Table Label Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.tableLabel" ng-change="ctrl.refresh()" ng-model-onblur />
</div>
<div class="gf-form" ng-show="ctrl.panel.locationData === 'table'">
<label class="gf-form-label width-12">Geohash Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.tableGeohash" ng-change="ctrl.refresh()" ng-model-onblur />
</div>
<div class="gf-form" ng-show="ctrl.panel.locationData === 'geohash'">
<label class="gf-form-label width-12">ES Metric Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.esMetric" ng-change="ctrl.refresh()" ng-model-onblur />
Expand Down
3 changes: 2 additions & 1 deletion dist/worldmap_ctrl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/worldmap_ctrl.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/data_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ export default class DataFormatter {
let lowestValue = Number.MAX_VALUE;

tableData[0].forEach((datapoint) => {
if (!datapoint.geohash) {
if (!datapoint[this.ctrl.panel.tableGeohash]) {
return;
}

const encodedGeohash = datapoint.geohash;
const encodedGeohash = datapoint[this.ctrl.panel.tableGeohash];
const decodedGeohash = decodeGeoHash(encodedGeohash);

const dataValue = {
Expand Down
4 changes: 4 additions & 0 deletions src/partials/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ <h5 class="section-heading">Map Data Options</h5>
<label class="gf-form-label width-12">Table Label Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.tableLabel" ng-change="ctrl.refresh()" ng-model-onblur />
</div>
<div class="gf-form" ng-show="ctrl.panel.locationData === 'table'">
<label class="gf-form-label width-12">Geohash Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.tableGeohash" ng-change="ctrl.refresh()" ng-model-onblur />
</div>
<div class="gf-form" ng-show="ctrl.panel.locationData === 'geohash'">
<label class="gf-form-label width-12">ES Metric Field</label>
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.esMetric" ng-change="ctrl.refresh()" ng-model-onblur />
Expand Down
3 changes: 2 additions & 1 deletion src/worldmap_ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const panelDefaults = {
decimals: 0,
hideEmpty: false,
hideZero: false,
stickyLabels: false
stickyLabels: false,
tableGeohash: 'geohash'
};

const mapCenters = {
Expand Down