Skip to content

Commit

Permalink
Last bit of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
almossawi committed Mar 30, 2015
1 parent dc61404 commit 036351b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions examples/charts/updating.htm
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@
split_by_params.y_accessor = new_y_accessor;

// change button state
$(this).addClass('active')
.siblings()
.removeClass('active');
$(this).addClass('active').siblings().removeClass('active');

// update data
delete split_by_params.xax_format;
Expand All @@ -88,12 +86,11 @@
});

function modify_time_period(data, past_n_days) {
var data_spliced = MG.clone(data);
if (past_n_days !== '') {
return data_spliced.slice(past_n_days * -1);
return MG.clone(data).slice(past_n_days * -1);
}

return data_spliced;
return data;
}</code></pre>

</div>
Expand Down Expand Up @@ -122,6 +119,7 @@
right: 40,
show_secondary_x_label: false,
xax_count: 4,
transition_on_update: false,
target: '#modify_time_period',
x_accessor: 'date',
y_accessor: 'beta'
Expand All @@ -143,9 +141,7 @@
split_by_params.y_accessor = new_y_accessor;

// change button state
$(this).addClass('active')
.siblings()
.removeClass('active');
$(this).addClass('active').siblings().removeClass('active');

// update data
delete split_by_params.xax_format;
Expand All @@ -165,11 +161,10 @@
});

function modify_time_period(data, past_n_days) {
var data_spliced = MG.clone(data);
if (past_n_days !== '') {
return data_spliced.slice(past_n_days * -1);
return MG.clone(data).slice(past_n_days * -1);
}

return data_spliced;
return data;
}
</script>

0 comments on commit 036351b

Please sign in to comment.