Fix invalid graph errors + no data errors
This commit is contained in:
parent
83fa5449b8
commit
6168c8e1e2
5 changed files with 34 additions and 27 deletions
|
@ -109,8 +109,10 @@ export class GraphWidget implements OnInit {
|
|||
if ( !( this.dataType in DataType ) ) {
|
||||
console.warn('Unknown DataType for graph \'' + this.graphName + '\' - defaulting to number');
|
||||
}
|
||||
this.graphService.getGraph(this.graphName)
|
||||
.subscribe( result => this.setData(result.graph) );
|
||||
if (localStorage.getItem('usertype') === 'organisation') {
|
||||
this.graphService.getGraph(this.graphName)
|
||||
.subscribe( result => this.setData(result.graph) );
|
||||
}
|
||||
}
|
||||
|
||||
private setData(data: any) {
|
||||
|
|
Reference in a new issue