@@ -296,15 +295,13 @@ export const AtacBarPlot: React.FC<{ plottitle?: string, byct?: boolean, study:
)}
+ {/* Why is the styling being done like this, not readable. Why is there also styling above in CellTypeLegends? */}
-
- );
+
+ );
+}
+
+//This should eventually be redone. It feels wrong to style the tooltip this way
+const CellTypesLegends = ({ title, plottitle, children }: { title: string; plottitle?: string; children: React.ReactNode }) => {
+ return (
+
+
{title}
+ {children}
+
+
+ );
}
+
+/**
+ * @todo this file needs to be typed. Also the manual css injection with
-
-
-
- )
-}
+ const linearScale = scaleLinear({
+ domain: [minValue, maxValue],
+ range: ["#ffcd00", "#ff0000"],
+ });
+ let uniqcelltypes = [...new Set([...props.data].sort((a, b) => {
+ if (!experimentInfo[a.name]?.order) console.log(a.name) //some experiments returned in gene expression umap are not in experiment list?
+ return experimentInfo[a.name]?.order - experimentInfo[b.name]?.order
+ }).map(c => getCellDisplayName(c.celltype as any)))]
+ let ordinalColorScale = uniqcelltypes && scaleOrdinal({
+ domain: uniqcelltypes,
+ //Duplicates?
+ range: uniqcelltypes.map((c) => getCellColor(c as CellName)),
+ })
+ const legendGlyphSize = 15;
+ return (
+
+
+ {tooltipOpen && tooltipData && (
+
+
+
Celltype: {getCellDisplayName(tooltipData.celltype as CellQueryValue, true)}