Skip to content

Commit 2504ff6

Browse files
committed
fix bug with dash line
1 parent 9787115 commit 2504ff6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ParallelCoordinates/src/js/main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ function complex_data_table(sample) {
573573
var samplenest = d3.nest()
574574
.key(d=>d.rack).sortKeys(collator.compare)
575575
.key(d=>d.compute).sortKeys(collator.compare)
576-
.sortValues((a,b)=>a.timestep-b.timestep)
576+
.sortValues((a,b)=>a.Time-b.Time)
577577
.entries(sample);
578578
d3.select("#compute-list").html('');
579579
var table = d3.select("#compute-list")
@@ -621,7 +621,7 @@ function complex_data_table(sample) {
621621
.style("background", function(d) { return color(selectedService==null?d.group:d[selectedService]) })
622622
.style("opacity",0.85);
623623
lit.append("span")
624-
.text(function(d) { return d3.timeFormat("%B %d %Y %H:%M")(d.timestep); });
624+
.text(function(d) { return d3.timeFormat("%B %d %Y %H:%M")(d.Time); });
625625

626626
return lir;
627627
}
@@ -734,6 +734,7 @@ function path(d, ctx, color) {
734734
function path(d, ctx, color) {
735735
if (color) ctx.strokeStyle = color;
736736
ctx.beginPath();
737+
ctx.setLineDash([]);
737738
var x0 = xscale(dimensions[0])-15,
738739
y0 = yscale[dimensions[0]](d[dimensions[0]]); // left edge
739740
ctx.moveTo(x0,y0);
@@ -742,13 +743,12 @@ function path(d, ctx, color) {
742743
var x = xscale(p),
743744
y = yscale[p](d[p]);
744745
if (y===undefined) {
746+
console.log(p)
745747
if (valid) {
746748
ctx.stroke();
747749
ctx.beginPath();
748750
ctx.moveTo(x0,y0);
749751
ctx.setLineDash([5, 15]);
750-
} else{
751-
752752
}
753753
valid = false;
754754
}else if (valid) {

ParallelCoordinates/src/js/readData.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function object2DataPrallel(ob){
185185
eachIn[sub] = com.value[s.key][i][sj]
186186
});
187187
});
188-
eachIn.timestep = new Date(d3.timeFormat("%B %d %Y %H:%M")(com.value['arrTime'][i]));
188+
eachIn.Time = new Date(d3.timeFormat("%B %d %Y %H:%M")(com.value['arrTime'][i]));
189189
eachIn.rack = "Rack "+rack;
190190
eachIn.compute = com.key;
191191
eachIn.group = "Rack "+rack;

0 commit comments

Comments
 (0)