Skip to content

Commit 1c6ad1b

Browse files
committed
update
1 parent b501da5 commit 1c6ad1b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

miniChalenge2_2020_ViolinMatrix/src/js/main.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ function update({nestData,nestByLabel,nestByPerson,summary}){
104104
let svg_ = d3.select('#violinMatrix_svg')
105105
.attr("width", graphicopt.width)
106106
.attr("height", graphicopt.height)
107-
.style('overflow','visible');
108107
let svg = svg_
109108
.select("g.content");
110109
let isfirst = false;
@@ -122,7 +121,8 @@ function update({nestData,nestByLabel,nestByPerson,summary}){
122121
const func = isFreeze;
123122
isFreeze = false;
124123
func();
125-
}});
124+
}})
125+
.style('clip-path','url(#rectHolder)');
126126
isfirst = true;
127127
}
128128

@@ -183,9 +183,20 @@ function update({nestData,nestByLabel,nestByPerson,summary}){
183183
axis = svg_.append('g')
184184
.attr('class','axis')
185185
// .attr('transform',`translate(${graphicopt.margin.left},${graphicopt.margin.top})`);
186+
axis
187+
.append('rect')
188+
.attr('fill','white')
189+
.attr('y',graphicopt.heightG())
190+
.attr('width',graphicopt.width)
191+
.attr('height',graphicopt.margin.bottom);
186192
axis.append('g')
187193
.attr('class','Xaxis')
188-
.attr('transform',`translate(0,${graphicopt.heightG()})`);;
194+
.attr('transform',`translate(0,${graphicopt.heightG()})`);
195+
axis
196+
.append('rect')
197+
.attr('fill','white')
198+
.attr('width',graphicopt.margin.left)
199+
.attr('height',graphicopt.height);
189200
axis.append('g')
190201
.attr('class','Yaxis');
191202
}
@@ -196,6 +207,7 @@ function update({nestData,nestByLabel,nestByPerson,summary}){
196207
gX.call(d3.axisBottom(x));
197208
gY = axis.select('g.Yaxis').attr('transform',`translate(${graphicopt.margin.left},0)`);
198209
gY.call(d3.axisLeft(y));
210+
199211
if (isfirst)
200212
svg.call(graphicopt.zoom.transform, d3.zoomIdentity);
201213
function zoomed(){

miniChalenge2_2020_ViolinMatrix/src/style/graph.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.violin.total .violin path{
55
fill: steelblue !important;
66
}
7+

0 commit comments

Comments
 (0)