Skip to content

Commit

Permalink
improving chart-meta-service.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhuka committed Jun 24, 2015
1 parent 2446a1c commit b2a5a3e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/scripts/services/chart-meta-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ angular.module('apacheZeppelinGsocApp').service('ChartMetaService', function() {
ChartTemplateURL:null,
ChartType:null,
ChartDataSetName:null,
ChartDataSetPath:null
ChartDataSetPath:null,
ChartData: null
};

//getters
Expand All @@ -37,10 +38,14 @@ angular.module('apacheZeppelinGsocApp').service('ChartMetaService', function() {
return MetaModel.ChartDataSetName ;
};

this.getChartDataSetPath = function() {
this.getChartDataSetPath = function() {
return MetaModel.ChartDataSetPath ;
};

this.getChartData = function() {
return MetaModel.ChartData ;
};

//setters
this.setChartLib = function(ChartLib) {
MetaModel.ChartLib = ChartLib ;
Expand All @@ -57,6 +62,7 @@ angular.module('apacheZeppelinGsocApp').service('ChartMetaService', function() {
this.setChartDataSetName = function(ChartDataSetName) {
MetaModel.ChartDataSetName = ChartDataSetName ;
MetaModel.ChartDataSetPath = 'data/' + ChartDataSetName + '.csv';
MetaModel.ChartData = d3.csv(MetaModel.ChartDataSetPath);
};

//looking for UI model logic
Expand Down

0 comments on commit b2a5a3e

Please sign in to comment.