Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added legend for single series charts and fixed file uploads #35

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading