Skip to content

Commit e73c84a

Browse files
committed
directional arrows on plot
1 parent c67b155 commit e73c84a

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

src/portals/SysBio/components/BulkVolcanoPlot.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,30 @@ export default Vue.component("bulk-volcano-plot", {
174174
tempObj.value['y'] = v[this.yAxisField];
175175
176176
sumstat.push(tempObj);
177-
})
177+
});
178+
179+
this.svg.append("g")
180+
.attr("id", "axisLabelsGroup")
181+
.attr("transform", "translate(0,0)");
182+
183+
this.svg.select("#axisLabelsGroup")
184+
.style("font-family", "Arial").style("font-size", 12)
185+
.style("text-anchor", "middle")
186+
187+
let amp = this.$store.state.selectedAMP;
188+
let upregulatedIn = amp.split("vs")[0];
189+
this.svg.select("#axisLabelsGroup")
190+
.append("text")
191+
.attr("x", margin.left + 50)
192+
.attr("y", (height + margin.bottom))
193+
.text(`← down-regulated in ${upregulatedIn}`);
194+
195+
this.svg.select("#axisLabelsGroup")
196+
.append("text")
197+
.attr("x", margin.left + width)
198+
.attr("y", (height + margin.bottom))
199+
.attr("text-anchor", "end")
200+
.text(`up-regulated in ${upregulatedIn}`)
178201
179202
//render axis labels
180203
this.svg.append("text")

0 commit comments

Comments
 (0)