e6a7bf56cb908154fcc899a3d95a672b01b32858
[portal/sdk.git] /
1 import {HttpClient, HttpHeaders} from '@angular/common/http';
2 import {Injectable} from '@angular/core';
3 import {environment} from '../../../../../../environments/environment';
4 import {Observable} from 'rxjs';
5
6 @Injectable({
7     providedIn: 'root'
8 })
9 export class ChartWizard {
10     constructor(private _http: HttpClient) { }
11
12
13     getChartData(reportId: string){
14         return this._http.get(environment.baseUrl + 'raptor.htm?action=chart.json&c_master=' + reportId,
15             { headers: new HttpHeaders({'Content-Type': 'application/json'})});
16     }
17
18     saveChartData(chartJson: any) {
19         return this._http.post(environment.baseUrl + 'save_chart', chartJson,
20             { headers: new HttpHeaders({'Content-Type': 'application/json'})});
21     }
22
23     getReportTypeData(reportId: string): Observable<any> {
24         return this._http.get(environment.baseUrl + 'report/wizard/retrieve_def_tab_wise_data/' + reportId,
25             { headers: new HttpHeaders({'Content-Type': 'application/json'})});
26     }
27 }