Skip to content

Commit

Permalink
added legend for single series charts and fixed file uploads (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
fyo21103 authored Sep 23, 2024
1 parent 135a327 commit 1054b85
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aas-web-ui/src/components/AppNavigation/UploadAAS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
let path = this.uploadURL;
var headers = new Headers();
var formData = new FormData();
formData.append('file', this.aasFile[0]);
formData.append('file', this.aasFile);
// Send Request to upload the file
this.postRequest(path, formData, headers, context, disableMessage).then((response: any) => {
if (response.success) {
Expand Down
2 changes: 1 addition & 1 deletion aas-web-ui/src/components/SubmodelElements/Blob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
// console.log("Upload File: ", this.newFile);
// check if a file is selected
if (this.newFile.length == 0) return;
let file = this.newFile[0];
let file = this.newFile;
let contentType = file.type;
// decode the file to base64
let reader = new FileReader();
Expand Down
5 changes: 2 additions & 3 deletions aas-web-ui/src/components/SubmodelElements/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
// console.log("Upload File: ", this.newFile);
// check if a file is selected
if (this.newFile.length == 0) return;
// let mimeType = this.newFile[0].type;
let context =
'uploading ' +
this.fileObject.modelType +
Expand All @@ -206,10 +205,10 @@
this.fileObject.idShort +
'"';
let disableMessage = false;
let path = this.SelectedNode.path + '/attachment?fileName=' + this.newFile[0].name;
let path = this.SelectedNode.path + '/attachment?fileName=' + this.newFile.name;
var headers = new Headers();
var formData = new FormData();
formData.append('file', this.newFile[0]);
formData.append('file', this.newFile);
// Send Request to upload the file
this.putRequest(path, formData, headers, context, disableMessage).then((response: any) => {
// TODO: Add success response handling including updating the File SubmodelElement -> mimeType (+ value)
Expand Down
4 changes: 4 additions & 0 deletions aas-web-ui/src/components/Widgets/AreaChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
height: 350,
background: '#ffffff00',
},
legend: {
show: true,
showForSingleSeries: true,
},
dataLabels: {
enabled: false,
},
Expand Down
5 changes: 5 additions & 0 deletions aas-web-ui/src/components/Widgets/LineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
height: 350,
background: '#ffffff00',
},
legend: {
show: true,
showForSingleSeries: true,
},
dataLabels: {
enabled: false,
},
Expand Down Expand Up @@ -158,6 +162,7 @@
// console.log('initializeSeries: ', this.chartData, this.timeVariable, this.yVariables);
// Prepare new series values
let newSeries = this.prepareSeriesValues(this.chartData, this.yVariables);
console.log('newSeries: ', newSeries);
// prepare the tooltip for the y-axis
let tooltip_y = this.prepareYValueTooltip(this.chartData, this.yVariables);
// prepare the legend for the series
Expand Down
4 changes: 4 additions & 0 deletions aas-web-ui/src/components/Widgets/ScatterChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
height: 350,
background: '#ffffff00',
},
legend: {
show: true,
showForSingleSeries: true,
},
dataLabels: {
enabled: false,
},
Expand Down

0 comments on commit 1054b85

Please sign in to comment.