Project

General

Profile

« Previous | Next » 

Revision 58912

Working on the new version of the oso - started incorporating charts and created a treemap highcharts component

View differences:

country-page.component.ts
30 30
  topProjectsByDatasetsGraphURL: SafeResourceUrl;
31 31
  topProjectsBySoftwareGraphURL: SafeResourceUrl;
32 32

  
33
  overviewData: OverviewData;
34
  countryData: CountryOverview;
35

  
36

  
37 33
  constructor(private dataService: DataService,
38 34
              private dataHandlerService: DataHandlerService,
39 35
              private route: ActivatedRoute,
......
43 39

  
44 40
    window.scroll(0, 0);
45 41

  
46
    this.countryCode = this.route.snapshot.paramMap.get('countryCode');
42
    this.route.params.subscribe(params => {
47 43

  
48
    this.dataService.getCountryPageOverviewData(this.countryCode).subscribe(
49
      rawData => {
50
        this.countryPageOverviewData = this.dataHandlerService.convertRawDataToCountryPageOverviewData(rawData);
51
        if (this.countryPageOverviewData && this.countryPageOverviewData.name) {
52
          this.linkToCountryInOpenAIRE = 'https://www.openaire.eu/item/' + this.countryPageOverviewData.name.replace(' ', '-');
53
          this.createChartURLs();
44
      this.countryCode = params['countryCode'];
45

  
46
      this.dataService.getCountryPageOverviewData(this.countryCode).subscribe(
47
        rawData => {
48
          this.countryPageOverviewData = this.dataHandlerService.convertRawDataToCountryPageOverviewData(rawData);
49
          if (this.countryPageOverviewData && this.countryPageOverviewData.name) {
50
            this.linkToCountryInOpenAIRE = 'https://www.openaire.eu/item/' + this.countryPageOverviewData.name.replace(' ', '-');
51
            this.createChartURLs();
52
          }
53
        }, error => {
54
          console.log(error);
54 55
        }
55
      }, error => {
56
        console.log(error);
57
      }
58
    );
59
    // this.linkToCountryInOpenAIRE = 'https://www.openaire.eu/item/' + this.countryName.replace(' ', '-');
56
      );
57
    });
60 58

  
61
    // this.dataService.getCountryData(this.countryName).subscribe(
62
    //   overviewData => {
63
    //     this.overviewData = overviewData;
64
    //     this.countryData = this.overviewData.countries.filter(x => x.country === this.countryName)[0];
65
    //   },
66
    //   error => {
67
    //     console.log(error);
68
    //   }
69
    // );
70 59

  
71 60

  
72

  
73 61
  }
74 62

  
75 63
  createChartURLs() {

Also available in: Unified diff