Revision 55059
Added by Konstantina Galouni about 5 years ago
dataset.component.ts | ||
---|---|---|
29 | 29 |
public showAllDownloadFrom: boolean = false; |
30 | 30 |
public showAllPublishedIn: boolean = false; |
31 | 31 |
|
32 |
public thresholdDescription: number = 270; |
|
33 |
public showNumDescription: number = 270; |
|
34 |
|
|
32 | 35 |
// Metrics tab variables |
33 | 36 |
public metricsClicked: boolean; |
34 | 37 |
public viewsFrameUrl: string; |
... | ... | |
99 | 102 |
this.downloadsFrameUrl = this.properties.framesAPIURL+'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"'+this.datasetId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false'; |
100 | 103 |
/*this.downloadsFrameUrl = this.properties.framesAPIURL+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.datasetId+'", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'; |
101 | 104 |
*/ |
102 |
if (typeof document !== 'undefined') { |
|
103 |
this.element.nativeElement.scrollIntoView(); |
|
104 |
} |
|
105 |
this.scroll(); |
|
105 | 106 |
}); |
106 | 107 |
|
107 | 108 |
} |
... | ... | |
201 | 202 |
return Array.from(map.keys()); |
202 | 203 |
} |
203 | 204 |
|
205 |
public scroll() { |
|
206 |
if (typeof document !== 'undefined') { |
|
207 |
this.element.nativeElement.scrollIntoView(); |
|
208 |
} |
|
209 |
} |
|
210 |
|
|
204 | 211 |
private handleError(message: string, error) { |
205 | 212 |
console.error("Research Data Landing Page: "+message, error); |
206 | 213 |
} |
Also available in: Unified diff
[Trunk|Library]: In Landing Pages: cut description up to 270 characters and add 'view more/less' functionality.