Skip to content

Commit

Permalink
JS bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 10, 2016
1 parent c9d4217 commit fc038a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion panoramix/static/widgets/viz_sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function viz_sankey(slice) {

var path = sankey.link();

d3.json(slice.data.json_endpoint, function(error, json) {
d3.json(slice.jsonEndpoint(), function(error, json) {
if (error != null){
slice.error(error.responseText);
return '';
Expand Down
6 changes: 3 additions & 3 deletions panoramix/static/widgets/viz_sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Modified from http://bl.ocks.org/kerryrodden/7090426

function viz_sunburst(slice) {
var container = d3.select(slice.selector);
var width = slice.container.width();
var height = slice.container.height() - 25;
var render = function() {
// Breadcrumb dimensions: width, height, spacing, width of tip/tail.
var b = {
Expand All @@ -13,8 +15,6 @@ function viz_sunburst(slice) {

// Total size of all segments; we set this later, after loading the data.
var totalSize = 0;
var width = slice.container.width();
var height = slice.container.height() - 25;
var radius = Math.min(width, height) / 2;

var vis = container.append("svg:svg")
Expand All @@ -37,7 +37,7 @@ function viz_sunburst(slice) {
.outerRadius(function(d) { return Math.sqrt(d.y + d.dy); });

var ext;
d3.json(slice.data.json_endpoint, function(error, json){
d3.json(slice.jsonEndpoint(), function(error, json){

if (error != null){
slice.error(error.responseText);
Expand Down
2 changes: 1 addition & 1 deletion panoramix/static/widgets/viz_world_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function viz_world_map(slice) {
var container = slice.container;
var div = d3.select(slice.selector);

d3.json(slice.data.json_endpoint, function(error, json){
d3.json(slice.jsonEndpoint(), function(error, json){

if (error != null){
slice.error(error.responseText);
Expand Down

0 comments on commit fc038a6

Please sign in to comment.