Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Added generic Boxplot creation
Browse files Browse the repository at this point in the history
  • Loading branch information
MeisterSeSe committed Jan 26, 2024
1 parent ac3cd10 commit c554958
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontendVue3/src/components/ChartsSideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const emit = defineEmits(['createChart'])
function generateChart(name){
emit('createChart', name);
}
const showMetrics = computed(() => {
if (hideMissing.value) {
return updateMetrics().filter((entry) => checkEntryIfValueSet(entry));
Expand Down Expand Up @@ -146,7 +147,6 @@ const updateAnalysis = () => {
return analysis.value.map((entry) => {
var obj = {};
obj["name"] = entry.name;
obj["value"] = getDisplayValue(entry);
return obj;
});
};
Expand Down
35 changes: 32 additions & 3 deletions frontendVue3/src/views/HistoryDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async function addWidget(chartdata, type, title) {
title: title,
id: widgets.value.length+1,
type: type,
data: generateChartData(chartdata, title)
data: generateChartData(chartdata,type, title)
};
widgetList.value.push(widget)
await nextTick();
Expand All @@ -599,8 +599,9 @@ function removeWidget(widget) {
grid.value.compact();
widgets.value.splice(index, 1);
}
function generateChartData(datakey, customLabel = 'Custom Label') {
return computed(() => {
function generateChartData(datakey, type, customLabel = 'Custom Label') {
if (type === "LineChart"){
return computed(() => {
return {
labels: labels.value,
datasets: [
Expand All @@ -616,6 +617,34 @@ function generateChartData(datakey, customLabel = 'Custom Label') {
],
};
});
}
else{
return computed(() => {
return {
labels: [family.value.label],
datasets: [
{
label: "NumberofFeatures",
backgroundColor: "rgba(242, 244, 255, 1)",
borderColor: "green",
borderWidth: 2,
outlierStyle: "circle",
outlierBackgroundColor: "#FFE2E2",
outlierBorderColor: "#6E1C1C",
outlierRadius: 2,
outlierBorderWidth: 2,
padding: 0,
itemRadius: 1,
itemBackgroundColor: "#FF8C3C",
data: [displayedDataList.value[datakey]]
},
],
};
})
}
}
const widgetList = ref([
{
Expand Down

0 comments on commit c554958

Please sign in to comment.