From 036351b7a8e09d60cde5b93de1317c7391090769 Mon Sep 17 00:00:00 2001 From: almossawi Date: Mon, 30 Mar 2015 10:56:57 -0700 Subject: [PATCH] Last bit of cleanup --- examples/charts/updating.htm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/examples/charts/updating.htm b/examples/charts/updating.htm index e8399441..948e00d2 100644 --- a/examples/charts/updating.htm +++ b/examples/charts/updating.htm @@ -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; @@ -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; } @@ -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' @@ -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; @@ -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; } \ No newline at end of file