Skip to content

Commit 4060e81

Browse files
committed
Removes overview charts but label distribution
1 parent 18ee0f6 commit 4060e81

File tree

10 files changed

+10
-784
lines changed

10 files changed

+10
-784
lines changed

src/components/projects/projectId/overview/ProjectOverview.tsx

Lines changed: 6 additions & 181 deletions
Large diffs are not rendered by default.

src/components/projects/projectId/overview/ProjectOverviewHeader.tsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import { selectIsManaged } from "@/src/reduxStore/states/general";
21
import { selectStaticSlices } from "@/src/reduxStore/states/pages/data-browser";
32
import { selectLabelingTasksAll, selectUsableAttributesNoFiltered } from "@/src/reduxStore/states/pages/settings";
43
import { selectOverviewFilters, setOverviewFilters, updateOverFilters } from "@/src/reduxStore/states/tmp";
54
import { ProjectOverviewFilters } from "@/src/types/components/projects/projectId/project-overview/project-overview";
65
import { LabelingTask } from "@/src/types/components/projects/projectId/settings/labeling-tasks";
7-
import { getDisplayGraphValueArray } from "@/src/util/components/projects/projectId/project-overview/project-overview-helper";
86
import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants";
97
import { DisplayGraphs } from "@/submodules/javascript-functions/enums/enums";
108
import KernDropdown from "@/submodules/react-components/components/KernDropdown";
@@ -20,47 +18,27 @@ export default function ProjectOverviewHeader() {
2018
const targetAttributes = useSelector(selectUsableAttributesNoFiltered);
2119
const dataSlices = useSelector(selectStaticSlices);
2220
const overviewFilters = useSelector(selectOverviewFilters);
23-
const isManaged = useSelector(selectIsManaged);
2421

2522
const [labelingTasksFiltered, setLabelingTasksFiltered] = useState<LabelingTask[]>([]);
26-
const [graphsValueArray, setGraphsValueArray] = useState<any>(getDisplayGraphValueArray());
2723

2824
useEffect(() => {
2925
if (!labelingTasks || !targetAttributes || !dataSlices || !targetAttributes[0] || !dataSlices[0]) return;
3026
const labelingTasksFinal = labelingTasks.find((labelingTask) => labelingTask.targetName === targetAttributes[0].name);
3127
const overviewFiltersNew: ProjectOverviewFilters = {
32-
graphType: graphsValueArray[0],
28+
graphType: { name: "Label Distribution", value: DisplayGraphs.LABEL_DISTRIBUTION },
3329
targetAttribute: targetAttributes[0],
3430
labelingTask: labelingTasksFinal,
3531
dataSlice: dataSlices[0],
3632
}
3733
dispatch(setOverviewFilters(overviewFiltersNew));
3834
setLabelingTasksFiltered(labelingTasks.filter((labelingTask) => labelingTask.targetName === targetAttributes[0].name));
39-
if (!isManaged) {
40-
setGraphsValueArray(graphsValueArray.filter((graph: any) => graph.value !== DisplayGraphs.INTER_ANNOTATOR));
41-
}
42-
}, [labelingTasks, targetAttributes, dataSlices, isManaged]);
35+
}, [labelingTasks, targetAttributes, dataSlices]);
4336

4437
return (
4538
<nav className="flex" aria-label="Breadcrumb">
4639
<ol role="list" className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-1 items-center">
47-
<li>
48-
<div className="flex flex-row items-center">
49-
<Tooltip placement="bottom" trigger="hover" color="invert" content={TOOLTIPS_DICT.PROJECT_OVERVIEW.VISUALIZATION} className="relative z-10 cursor-auto">
50-
<span className={`cursor-help mr-2 underline text-black-800 filtersUnderline`}>Visualizations</span>
51-
</Tooltip>
52-
<KernDropdown buttonName={overviewFilters?.graphType?.name} options={graphsValueArray} dropdownWidth="w-44"
53-
selectedOption={(option: any) => {
54-
dispatch(updateOverFilters('graphType', option));
55-
}} />
56-
</div>
57-
</li>
5840
<li>
5941
<div className="flex items-center">
60-
<svg className="flex-shrink-0 h-5 w-5 text-gray-300" xmlns="http://www.w3.org/2000/svg"
61-
fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
62-
<path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
63-
</svg>
6442
<Tooltip placement="bottom" trigger="hover" color="invert" content={TOOLTIPS_DICT.PROJECT_OVERVIEW.TARGET_TYPE} className="relative z-10 cursor-auto">
6543
<span className={`cursor-help mr-2 underline text-black-800 filtersUnderline`}>Target</span>
6644
</Tooltip>

src/components/projects/projectId/overview/charts/ConfidenceDistributionBarChart.tsx

Lines changed: 0 additions & 117 deletions
This file was deleted.

src/components/projects/projectId/overview/charts/ConfusionMatrixBarChart.tsx

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)