Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated scripts and a few code changes to show charts and stats in pubad #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pubad/static/pubad/js/co_genes_lolipop_plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var loli_plot = function(data, target) {
var y = d3.scaleBand()
.rangeRound([ 0, 450 ])
.domain(data.map(function(d) { return d.gene_name; }))
.padding(1);
.paddingInner(1);
svg_loli.append("g")
.attr("class", "loli-y-axis")
.attr("font-size", "15")
Expand Down Expand Up @@ -84,6 +84,4 @@ svg_loli.append("g").append("text")
.style("font-size", "20px")
.attr("transform","translate(300,500)")
.text("Occurrence Count");


}
2 changes: 1 addition & 1 deletion pubad/static/pubad/js/horizontal_barchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function horizontalBarChart (CountData, TargetDiv, TitleName, CurrGene) {

var y = d3.scaleBand()
.rangeRound([350, 0])
.padding(0.1);
.paddingInner(0.1);

var x = d3.scaleLinear()
.rangeRound([0, 800]);
Expand Down
4 changes: 2 additions & 2 deletions pubad/static/pubad/js/pub_barbhart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var PubBarchart = function(CountData, TargetDiv, TitleName, CurrGene, kwMin, kwM

var tooltip = d3.select("body").append("div").attr("class", "toolTip");

var x = d3.scaleBand().rangeRound([0, 900]).padding(0.3),
var x = d3.scaleBand().rangeRound([0, 900]).paddingInner(0.3),
y = d3.scaleLinear().rangeRound([330, 0]);


Expand Down Expand Up @@ -126,7 +126,7 @@ var PubBarchartCTD = function(CountData, TargetDiv, TitleName, CurrID, kwMin, kw

var tooltip = d3.select("body").append("div").attr("class", "toolTip");

var x = d3.scaleBand().rangeRound([0, 900]).padding(0.3),
var x = d3.scaleBand().rangeRound([0, 900]).paddingInner(0.3),
y = d3.scaleLinear().rangeRound([330, 0]);


Expand Down
53 changes: 53 additions & 0 deletions pubad/static/pubad/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.flexFont {
font-size: 0.8em;
}

.th-theme-bg {
background-color: #d0a47c;
color: white;
}

.toolTip {
position: absolute;
display: none;
min-width: 30px;
height: auto;
background: white;
border: 0px;
padding: 5px;
text-align: center;
opacity: 0.9;
}

.title-theme-bg {
background-color: #d0a47c;
color: white;
}

.horizontalbar:hover {
fill: #c99969;
}

.horizontalbar-y-axis {
font-size: 17px;
}

.horizontalbar-x-axis {
font-size: 15px;
}

.tab-pane {
height: 450px;
}

.tab-pane-ctd {
height: 430px;
}

.loli-y-axis {
font-size: 18px;
}

.app-title {
color: #404040;
}
2 changes: 1 addition & 1 deletion pubad/templates/pubad/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{% block scripts %}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>

Expand Down
Loading