import {HttpClient, HttpHeaders} from '@angular/common/http'; import {Injectable} from '@angular/core'; import {environment} from '../../../../../../environments/environment'; import {Observable} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class ChartWizard { constructor(private _http: HttpClient) { } getChartData(reportId: string){ return this._http.get(environment.baseUrl + 'raptor.htm?action=chart.json&c_master=' + reportId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } saveChartData(chartJson: any, action: any) { return this._http.post(environment.baseUrl + 'save_chart?action=' + action, chartJson, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } getReportTypeData(reportId: string): Observable { return this._http.get(environment.baseUrl + 'report/wizard/retrieve_def_tab_wise_data/' + reportId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } }