Skip to content

Commit

Permalink
[Platform]: Depmap graph changes (opentargets#471)
Browse files Browse the repository at this point in the history
* Adding the x-axis label

* added sentence case titles
  • Loading branch information
chinmehta authored Sep 17, 2024
1 parent bb2a64a commit 3df4138
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/sections/src/target/DepMap/DepmapPlot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { useMeasure } from "@uidotdev/usehooks";
import { Box } from "@mui/material";
import { grey } from "@mui/material/colors";
import { DataDownloader } from "ui";
import { sentenceCase } from "ui/src/utils/global";

const prepareData = (data = []) => {
const flatData = data.reduce((accumulator, currentValue) => {
currentValue.screens.forEach(dot => {
accumulator.push({ ...dot, tissueName: currentValue.tissueName });
accumulator.push({ ...dot, tissueName: sentenceCase(currentValue.tissueName) });
});
return accumulator;
}, []);
Expand Down Expand Up @@ -135,6 +136,10 @@ function DepmapPlot({ data, width }) {
fontSize: 12,
label: "Tissue name",
}),
Plot.axisX({
fontSize: 12,
label: "Gene Effect",
}),
Plot.crosshair(data, { x: "geneEffect", y: "tissueName" }),
],
});
Expand Down

0 comments on commit 3df4138

Please sign in to comment.