Skip to content
Permalink
Browse files

integrated new version of splitiscope renamed carve

  • Loading branch information...
rbkreisberg authored and hrovira committed May 14, 2013
1 parent 8d8ff9a commit 9145048333341c43df39bb1c88e68043eadd79a9
Showing with 246 additions and 215 deletions.
  1. +9 −9 app/views/scatterplot_view.js
  2. +6 −4 app/views/templates/scatterplot.hbs
  3. +231 −202 vendor/js/{splitiscope.js → carve.js}
@@ -86,10 +86,10 @@ module.exports = Backbone.View.extend({
});
this.$el.find(".cancer-selector-scatterplot").find(".toggle-active").hover(function (e) {
if ($(e.target).parent().hasClass("active")) {
_this.splitiscope.highlight($(e.target).data("id")).render();
_this.carve.highlight($(e.target).data("id")).render();
}
}, function(e) {
_this.splitiscope.highlight("").render();
_this.carve.highlight("").render();
});
},

@@ -206,22 +206,22 @@ module.exports = Backbone.View.extend({
},

initGraph: function () {
if (this.splitiscope) return;
if (this.carve) return;

console.log("initGraph:splitiscope init");

var _this = this;

this.splitiscope = Splitiscope({
this.carve = carve({
"radius": 8,
"margin": {
"top": 10, "left": 10, "bottom": 30, "right": 40
}
})(_.first(this.$el.find(".scatterplot-container")));
this.splitiscope.colorFn(function (categoryValue) {
this.carve.colorFn(function (categoryValue) {
return _this.colorsByTumorType[categoryValue.toUpperCase()];
});
this.splitiscope.colorBy({
this.carve.colorBy({
"label": "cancer",
"list": _.keys(this.colorsByTumorType),
"colors": _.values(this.colorsByTumorType)
@@ -233,7 +233,7 @@ module.exports = Backbone.View.extend({
var data_array = this.selectedFeatureData();

var _this = this;
this.splitiscope.axes({
this.carve.axes({
"attr": {
"x": this.selected_features["x"],
"y": this.selected_features["y"]
@@ -243,8 +243,8 @@ module.exports = Backbone.View.extend({
"y": this.getFeatureAxisLabel("y")
}
});
this.splitiscope.data(data_array).render();
this.splitiscope.on("partitioncomplete", function (partition) {
this.carve.data(data_array).render();
this.carve.on("partitioncomplete", function (partition) {
var sample_ids = [];
_.each(partition, function (part, key) {
var part_samples = _.compact(_.map(data_array, function (item) {
@@ -17,19 +17,21 @@
visibility: hidden;
}
.y.axis path, .y.axis line {
stroke: #aaa;
.y.axis path, .y.axis line{
stroke:#aaa;
}
.x.axis path, .x.axis line {
stroke: none;
stroke:none;
}
.axis_label, .ticks {
font-size: 16px;
font-size:16px;
}
.data_totals {
font-size: 20px;
font-weight: 400;
shape-rendering: crispEdges;
}

0 comments on commit 9145048

Please sign in to comment.
You can’t perform that action at this time.