-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
32 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,57 @@ | ||
'use strict'; | ||
|
||
/** | ||
* @ngdoc function | ||
* @name apacheZeppelinGsocApp.ChartMetaService | ||
* @description | ||
* # ChartMetaService will be using Handle Basic Chart Meta Details. | ||
* | ||
*/ | ||
|
||
|
||
angular.module('apacheZeppelinGsocApp').service('ChartMetaService', function() { | ||
|
||
/*Chart Meta Data Service*/ | ||
var MetaModel = { | ||
ChartLib:null, | ||
ChartTemplateURL:null, | ||
ChartType:null, | ||
ChartDataSetName:null, | ||
ChartDataSetPath:null, | ||
ChartLib: null, | ||
ChartTemplateURL: null, | ||
ChartType: null, | ||
ChartDataSetName: null, | ||
ChartDataSetPath: null, | ||
ChartData: null | ||
}; | ||
|
||
//getters | ||
this.getChartLib = function() { | ||
return MetaModel.ChartLib ; | ||
return MetaModel.ChartLib; | ||
}; | ||
|
||
this.getChartType = function() { | ||
return MetaModel.ChartType ; | ||
return MetaModel.ChartType; | ||
}; | ||
|
||
this.getChartTemplateURL = function() { | ||
return MetaModel.ChartTemplateURL ; | ||
return MetaModel.ChartTemplateURL; | ||
}; | ||
|
||
this.getChartDataSetName = function() { | ||
return MetaModel.ChartDataSetName ; | ||
return MetaModel.ChartDataSetName; | ||
}; | ||
|
||
this.getChartDataSetPath = function() { | ||
return MetaModel.ChartDataSetPath ; | ||
return MetaModel.ChartDataSetPath; | ||
}; | ||
|
||
this.getChartData = function() { | ||
return MetaModel.ChartData ; | ||
return MetaModel.ChartData; | ||
}; | ||
|
||
//setters | ||
this.setChartLib = function(ChartLib) { | ||
MetaModel.ChartLib = ChartLib ; | ||
MetaModel.ChartLib = ChartLib; | ||
}; | ||
|
||
this.setChartType = function(ChartType) { | ||
MetaModel.ChartType = ChartType ; | ||
MetaModel.ChartType = ChartType; | ||
}; | ||
|
||
this.setChartTemplateURL = function(ChartTemplateURL) { | ||
MetaModel.ChartTemplateURL = ChartTemplateURL; | ||
}; | ||
|
||
this.setChartDataSetName = function(ChartDataSetName) { | ||
MetaModel.ChartDataSetName = ChartDataSetName ; | ||
MetaModel.ChartDataSetName = ChartDataSetName; | ||
MetaModel.ChartDataSetPath = 'data/' + ChartDataSetName + '.csv'; | ||
MetaModel.ChartData = d3.csv(MetaModel.ChartDataSetPath); | ||
}; | ||
|
||
//looking for UI model logic | ||
this.isMetaCompleted = function() { | ||
return MetaModel.ChartType !== null ; | ||
return MetaModel.ChartType !== null; | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters