Skip to content

Commit

Permalink
versioning, small fixes, lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDaniel committed Dec 6, 2023
1 parent 007e93c commit 14f3af8
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /app

COPY . .

RUN npm ci && npm run build --prod
RUN npm install && npm run build --prod

FROM nginx:alpine
COPY --from=builder app/dist/* /usr/share/nginx/html
Expand Down
67 changes: 45 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/chart.js": "^2.9.40",
"angular-bootstrap-md": "^9.3.1",
"animate.css": "^4.1.0",
"chart.js": "^4.4.1",
"chart.js": "^2.9.3",
"deep-equal": "^2.0.3",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,66 @@
import { Component, OnChanges, OnInit, ViewChild, Input } from '@angular/core';
import { Chart } from 'chart.js';



@Component({
selector: 'app-histogram-plot',
templateUrl: './histogram-plot.component.html',
styleUrls: ['./histogram-plot.component.scss']
styleUrls: ['./histogram-plot.component.scss'],
})
export class HistogramPlotComponent implements OnChanges {

@ViewChild('plot', { static: true }) plotDiv;

@Input() counts: { [props: string]: number } | null = null;

constructor() { }
constructor() {}

ngOnChanges(): void {

const labels = Object.keys(this.counts);

const countsData = [];
labels.forEach(label => countsData.push(this.counts[label]));
labels.forEach((label) => countsData.push(this.counts[label]));

console.log(labels, countsData);

const data = {
labels: labels,//Object.keys(this.counts),
labels, // Object.keys(this.counts),
datasets: [
{
label: 'Counts',
data: countsData,// Object.values(this.counts),
backgroundColor: "#3f51b5"
data: countsData, // Object.values(this.counts),
backgroundColor: '#3f51b5',
},
]
],
};

const config = {
type: 'bar',
data: data,
data,
options: {
scales: {
yAxes: [{
yAxes: [
{
ticks: {
beginAtZero: true,
min: 0,
}
}]
}
beginAtZero: true,
min: 0,
},
},
],
},
},
}
};

const div: HTMLDivElement = this.plotDiv.nativeElement;
div.innerHTML = "";
const canvas = document.createElement("canvas");
canvas.setAttribute("height", "50px");
canvas.setAttribute("width", "50px");
div.innerHTML = '';
const canvas = document.createElement('canvas');
canvas.setAttribute('height', '50px');
canvas.setAttribute('width', '50px');
canvas.width = 500;
canvas.height = 300;
const context = canvas.getContext('2d');
context.scale(0.5, 0.5);
//chartcontext.scale(50, 50);
// chartcontext.scale(50, 50);
div.appendChild(canvas);

new Chart(context, config);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
<input [(ngModel)]="jobName" name="jobName" placeholder="PlanQK-Job" />
<p class="description"> Input your Deployment ID from the response in Step 1:</p>
<input [(ngModel)]="deploymentID" name="deploymentID" placeholder=3 />
<p class="description">Choose the platform where the Job should be running {{selectedPlatform}} and
{{selectedDevice}}:</p>
<p class="description">Choose the platform where the Job should be running:</p>
<div class="radio-group">
<label>
<input type="radio" [(ngModel)]="selectedPlatform" name="platform" value="IBM"
Expand Down

0 comments on commit 14f3af8

Please sign in to comment.