Skip to content

Commit 3319c66

Browse files
authored
Merge pull request #17 from dyushen/beta-tweaks
move chart files, make tweaks to some styling and labels
2 parents fbbfdae + 646d1ea commit 3319c66

File tree

6 files changed

+32
-31
lines changed

6 files changed

+32
-31
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
</div>
5757

5858
<div id="compare">
59-
<div id="compare-chart-a" class="box image-pane dp-1 compare-chart">
60-
<!--<div class="view-title">Chart 1</div>-->
59+
<div id="compare-chart-c" class="box image-pane dp-1 compare-chart">
60+
<!--<div class="view-title">Chart III</div>-->
6161
<svg width="0" height="0"></svg>
6262
</div>
6363
<div
@@ -79,8 +79,8 @@
7979
</div>
8080
<svg width="0" height="0"></svg>
8181
</div>
82-
<div id="compare-chart-c" class="box image-pane dp-1 compare-chart">
83-
<!--<div class="view-title">Chart III</div>-->
82+
<div id="compare-chart-a" class="box image-pane dp-1 compare-chart">
83+
<!--<div class="view-title">Chart 1</div>-->
8484
<svg width="0" height="0"></svg>
8585
</div>
8686
</div>
@@ -233,7 +233,7 @@
233233
/>
234234
</filter>
235235
<filter id="blur">
236-
<feGaussianBlur in="SourceGraphic" stdDeviation="3" />
236+
<feGaussianBlur in="SourceGraphic" stdDeviation="1.8" />
237237
</filter>
238238
</defs>
239239
</svg>

src/controllers/ComparisonController.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { FeatureModel } from "../models/FeatureModel.js";
55
import { MouseView } from "../views/MouseView.js";
66
import { TimelineView } from "../views/comparison/TimelineView.js";
77

8-
import { ChartA } from "../views/comparison/ChartA.js";
9-
import { ChartB } from "../views/comparison/ChartB.js";
10-
import { ChartC } from "../views/comparison/ChartC.js";
8+
import { DifferenceChart } from "../views/comparison/DifferenceChart.js";
9+
import { ViolinChart } from "../views/comparison/ViolinChart.js";
10+
import { SlopeChart } from "../views/comparison/SlopeChart.js";
1111

1212
export class ComparisonController {
1313
topExperiment = null;
@@ -25,14 +25,15 @@ export class ComparisonController {
2525
onChange: this.onTimeChange.bind(this),
2626
});
2727

28-
// these names can change once we know exactly what they are
29-
this.chartA = new ChartA({
28+
this.diffChart = new DifferenceChart({
3029
container: d3.select("#compare #compare-chart-a"),
3130
});
32-
this.chartB = new ChartB({
31+
32+
this.violinChart = new ViolinChart({
3333
container: d3.select("#compare #compare-chart-b"),
3434
});
35-
this.chartC = new ChartC({
35+
36+
this.slopeChart = new SlopeChart({
3637
container: d3.select("#compare #compare-chart-c"),
3738
});
3839
}
@@ -48,9 +49,9 @@ export class ComparisonController {
4849
const data = new FeatureModel({ name });
4950

5051
this.timeline.setTopData({ data });
51-
this.chartA.setTopData({ data });
52-
this.chartB.setTopData({ data, name });
53-
this.chartC.setTopData({ data });
52+
this.diffChart.setTopData({ data });
53+
this.violinChart.setTopData({ data, name });
54+
this.slopeChart.setTopData({ data });
5455
}
5556

5657
setBotExperiment({ name }) {
@@ -64,9 +65,9 @@ export class ComparisonController {
6465
const data = new FeatureModel({ name });
6566

6667
this.timeline.setBotData({ data });
67-
this.chartA.setBotData({ data });
68-
this.chartB.setBotData({ data, name });
69-
this.chartC.setBotData({ data });
68+
this.diffChart.setBotData({ data });
69+
this.violinChart.setBotData({ data, name });
70+
this.slopeChart.setBotData({ data });
7071
}
7172

7273
onTimeChange({ top, bot }) {

src/views/comparison/ChartA.js renamed to src/views/comparison/DifferenceChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const MARGINS = {
88
right: 10,
99
};
1010

11-
export class ChartA {
11+
export class DifferenceChart {
1212
topData = null;
1313
botData = null;
1414

@@ -30,7 +30,7 @@ export class ChartA {
3030
.attr("y", MARGINS.top - 6)
3131
.attr("font-size", 16)
3232
.attr("font-weight", 300)
33-
.text("Experiments Difference Over Time");
33+
.text("Feature Area Difference Over Time");
3434

3535
this.svg
3636
.append("text")

src/views/comparison/ChartC.js renamed to src/views/comparison/SlopeChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const MARGINS = {
77
right: 45,
88
};
99

10-
export class ChartC {
10+
export class SlopeChart {
1111
topData = null;
1212
botData = null;
1313

@@ -29,7 +29,7 @@ export class ChartC {
2929
.attr("y", 24)
3030
.attr("font-size", 16)
3131
.attr("font-weight", 300)
32-
.text("Experiments Trend Comparison");
32+
.text("Area Change Start-to-End");
3333

3434
const xlength = 0.5 * (this.width - 2 * MARGINS.left - 2 * MARGINS.right);
3535

src/views/comparison/ChartB.js renamed to src/views/comparison/ViolinChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const MARGINS = {
77
bottom: 25,
88
right: 45,
99
};
10-
export class ChartB {
10+
export class ViolinChart {
1111
topData = null;
1212
botData = null;
1313

@@ -29,7 +29,7 @@ export class ChartB {
2929
.attr("y", MARGINS.top - 28)
3030
.attr("font-size", 16)
3131
.attr("font-weight", 300)
32-
.text("Experiments Overall Comparison");
32+
.text("Feature Area Distribution");
3333

3434
const xScale_length = 0.3 * (this.width - MARGINS.left - MARGINS.right);
3535
const gap = 0.1 * (this.width - MARGINS.left - MARGINS.right);

src/views/experiment/ImageView.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ export class ImageView {
7979
const center = centers[id];
8080
const points = paths[id];
8181

82-
g.selectAll("circle")
83-
.data([null])
84-
.join("circle")
85-
.attr("cx", center[0])
86-
.attr("cy", center[1])
87-
.attr("r", 2)
88-
.attr("fill", "white");
82+
// g.selectAll("circle")
83+
// .data([null])
84+
// .join("circle")
85+
// .attr("cx", center[0])
86+
// .attr("cy", center[1])
87+
// .attr("r", 2)
88+
// .attr("fill", "white");
8989

9090
g.selectAll("path")
9191
.data([null])

0 commit comments

Comments
 (0)