Skip to content

Commit ce88388

Browse files
committed
Handled multiple geographies
1 parent 278c649 commit ce88388

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/templates/signal_sets/signal_set_detail.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ <h5>Signal members</h5>
361361
function initGeographicValueSelect(mode, geographicType = null) {
362362
var maximumSelectionLength = 1;
363363
if (mode === 'epivis') {
364-
maximumSelectionLength = 1;
364+
maximumSelectionLength = 5;
365365
} else {
366366
maximumSelectionLength = 10;
367367
}
@@ -495,18 +495,21 @@ <h5>Signal members</h5>
495495
if (currentMode === 'epivis') {
496496
var epiVisUrl = "{{ epivis_url }}";
497497
var dataSets = [];
498+
var geographicValues = geographicValue.split(',');
498499
dataSignals.forEach((signal) => {
499-
dataSets.push({
500-
color: '#'+(Math.random() * 0xFFFFFF << 0).toString(16).padStart(6, '0'),
501-
title: "value",
502-
params: {
503-
_endpoint: '{{ signalset.endpoint }}',
504-
data_source: dataSource,
505-
signal: signal,
506-
time_type: timeType,
507-
geo_type: geographicType,
508-
geo_value: geographicValue
509-
}
500+
geographicValues.forEach((geographicValue) => {
501+
dataSets.push({
502+
color: '#'+(Math.random() * 0xFFFFFF << 0).toString(16).padStart(6, '0'),
503+
title: "value",
504+
params: {
505+
_endpoint: '{{ signalset.endpoint }}',
506+
data_source: dataSource,
507+
signal: signal,
508+
time_type: timeType,
509+
geo_type: geographicType,
510+
geo_value: geographicValue
511+
}
512+
});
510513
});
511514
});
512515

0 commit comments

Comments
 (0)