Skip to content

Commit

Permalink
box plot changed to per sample, unicode bug fix in the y-value
Browse files Browse the repository at this point in the history
  • Loading branch information
nilesh-tawari committed Oct 3, 2017
1 parent a13ffa5 commit 1c0e5ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions chronqc/chronqc_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ def main(args):
logger.info("For {0}: {1} data points will be written to html".format(chart_id, len(df_chart)))
elif chart['chart_type'] == 'time_series_with_percentage_of_samples_above_threshold':
threshold = chart["chart_properties"]["threshold"]
t = '% Samples per run with {0} ≥ {1}'.format(y, threshold)
y = '% {0} ≥ {1}'.format(y, threshold)
t = '% Samples per run with {0} {1}'.format(y, threshold)
y = '% {0} {1}'.format(y, threshold)
chart_title = chart["chart_properties"].get('chart_title', t)
y_label = chart["chart_properties"].get('y_label', y)
js_tmpl = string.Template(open(op.join(templates_dir, "percent_plot_threshold.txt")).read())
Expand All @@ -662,10 +662,10 @@ def main(args):
if win == '365D':
winf = "past 1 year {}s".format(info)
if per_sample == 'False':
t = '{0} (Mean per run with {1} rolling mean and &plusmn2 standard deviation)'.format(y, winf)
t = '{0} (Mean per run with {1} rolling mean and ±2 standard deviation)'.format(y, winf)
y = '{0} (Mean per run)'.format(y)
else:
t = '{0} (with {1} rolling mean and &plusmn2 standard deviation)'.format(y, winf)
t = '{0} (with {1} rolling mean and ±2 standard deviation)'.format(y, winf)
y = '{0}'.format(y)
chart_title = chart["chart_properties"].get('chart_title', t)
y_label = chart["chart_properties"].get('y_label', y)
Expand Down
2 changes: 0 additions & 2 deletions chronqc/templates/base_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,6 @@ <h1>Summary Table</h1>
}
}

console.log(dateobj)

function toggleAlert_server(){
jQuery("#ann_server_warn").toggleClass('in out');
document.getElementById('ann_server_warn').style.display = 'none';
Expand Down
10 changes: 5 additions & 5 deletions chronqc/templates/box_whisker_plot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
for (j = 0; j < $dataname.length; j++){
$dataname[j][0] = new Date($dataname[j][0])
}
for (j = 0; j < $runname.length; j++){
for (j = 0; j < $samplename.length; j++){
for (i = 0; i < obj.length; i++){
var ann = obj[i]
if(ann.Run == $runname[j][0]){
if(ann.Run == $samplename[j]){
$runname[j][1]=ann.Annotation
}else{}
}
Expand Down Expand Up @@ -51,8 +51,8 @@
run = $runname[row],
sample = $samplename[row];

text = "<b>Run ID: </b>".fontcolor("#000") + run[0]
+ "<br/><b>Sample ID: </b>".fontcolor("#000") + "<font size='-1.5'>" + sample + "</font>"
text = "<b>Sample ID: </b>".fontcolor("#000") + "<font size='-1.5'>" + sample + "</font>"
+ "<br><b>Run ID: </b>".fontcolor("#000") + run[0]
+ "<br><b>Month:</b> ".fontcolor("#000") + moment(d).format("MMMM")
+ "<br><b>1st Quantile:</b> ".fontcolor("#4DD8AD") + data[1]
+ "<br><b>3rd Quantile:</b> ".fontcolor("#A3586D") + data[2]
Expand Down Expand Up @@ -153,7 +153,7 @@
pointClickCallback: function(e, point) {
if($dataname[point.idx][6] == null)return;
else{
run = $runname[point.idx][0]
run = $samplename[point.idx]
date = $dataname[point.idx][0]
date = moment(date).format("DD-MM-YYYY")
//copyToClipboard(run)
Expand Down

0 comments on commit 1c0e5ce

Please sign in to comment.