Skip to content

Commit

Permalink
Totem clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
adrixp committed Nov 16, 2019
1 parent 5e14cb8 commit dd21062
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@ function generateTotemSlice(properties, entity_id_list, dataPoints_path) {
entity.addEventListener('click', function () {
let entity_list = entity_id_list.split(',');
for(let id of entity_list){
let el = document.querySelector('#' + id).components.charts;
let oldDataPoints = el.data.dataPoints;
el.data.dataPoints = dataPoints_path;
el.update({dataPoints: oldDataPoints});
let myChart = document.getElementById(id);
let data = myChart.getAttribute("charts");
data.dataPoints = dataPoints_path;
myChart.setAttribute('charts', data);
}
});
return entity;
Expand Down

0 comments on commit dd21062

Please sign in to comment.