Skip to content

Commit

Permalink
Resolve bug due to incorrect name reference. (#3143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmarx committed Dec 18, 2018
1 parent 1bb09be commit d0cb1cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions refinery/ui/source/js/home/ctrls/data-set-chart-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
var service = chartDataService;
var vm = this;
vm.selectedAttribute = { select: {
name: 'Filetype', solr_name: 'filetype_Characteristics_generic_s'
name: 'Technology', solr_name: 'technology_Characteristics_generic_s'
} };
vm.attributes = service.attributeNames;
vm.updateAttribute = updateAttribute;
Expand All @@ -33,7 +33,7 @@
function refreshDataSetChart () {
chartDataService.getDataSets().then(function () {
vm.attributes = service.attributeNames;
var field = 'filetype_Characteristics_generic_s';
var field = vm.selectedAttribute.select.solr_name;
// initialized in the directive link
vm.homeChart.data.datasets[0].data = service.attributeFields[field].countsArray;
vm.homeChart.data.labels = service.attributeFields[field].fieldsArray;
Expand All @@ -47,8 +47,8 @@
* @memberOf refineryHome.dataSetChartCtrl
**/
function updateAttribute (attribute) {
vm.homeChart.data.datasets[0].data = service.attributes[attribute.solrName].countsArray;
vm.homeChart.data.labels = service.attributes[attribute.solrName].fieldsArray;
vm.homeChart.data.datasets[0].data = service.attributeFields[attribute.solrName].countsArray;
vm.homeChart.data.labels = service.attributeFields[attribute.solrName].fieldsArray;
vm.homeChart.update();
}

Expand Down

0 comments on commit d0cb1cf

Please sign in to comment.