create icons for plot types

This commit is contained in:
2019-10-10 12:00:41 +02:00
parent 69968b7682
commit 7ca7b80255
16 changed files with 1713 additions and 17 deletions

View File

@@ -10,14 +10,19 @@ export class PlotService {
plotTypes: Array<PlotType>;
tagFields: Observable<TagField>;
tagFields: Array<TagField>;
constructor(private http: HttpClient) {
this.plotTypes = new Array<PlotType>();
this.plotTypes.push(new PlotType("Scatter"));
this.plotTypes.push(new PlotType("Cumulative Distribution"));
this.plotTypes.push(new PlotType("Parallel Requests"));
this.plotTypes.push(new PlotType("Parallel Requests"));
this.plotTypes.push(new PlotType("Scatter", "scatter-chart"));
this.plotTypes.push(new PlotType("Heatmap", "heatmap"));
this.plotTypes.push(new PlotType("Cumulative Distribution", "cumulative-distribution-chart"));
this.plotTypes.push(new PlotType("Quantile-Quantile", "quantile-quantile"));
this.plotTypes.push(new PlotType("Parallel Requests", "parallel-requests-chart"));
this.plotTypes.push(new PlotType("Violin", "violin-chart"));
this.plotTypes.push(new PlotType("Strip", "strip-chart"));
this.plotTypes.push(new PlotType("Pie", "pie-chart"));
this.plotTypes.push(new PlotType("Bar", "bar-chart"));
this.tagFields = new Array<TagField>();
@@ -32,12 +37,14 @@ export class PlotService {
return this.plotTypes;
}
getTagFields(): Observable<TagField> {
getTagFields(): Array<TagField> {
const that = this;
this.http.get('//localhost:8080/fields').subscribe(data => {
data.forEach(function(name) {
that.tagFields.push(new TagField(name));
});
this.http.get('//'+window.location.hostname+':8080/fields').subscribe(data => {
if (data instanceof Array){
data.forEach(function(name) {
that.tagFields.push(new TagField(name));
});
}
});
return this.tagFields;
}
@@ -46,9 +53,11 @@ export class PlotService {
export class PlotType {
name: string;
icon: string
constructor(name: string) {
constructor(name: string, icon: string) {
this.name = name;
this.icon = icon;
}
}