Skip to content

Instantly share code, notes, and snippets.

@aipi
Created November 27, 2017 01:40
Show Gist options
  • Save aipi/96e3d8d5a2b250b56da2b273d1a09bc5 to your computer and use it in GitHub Desktop.
Save aipi/96e3d8d5a2b250b56da2b273d1a09bc5 to your computer and use it in GitHub Desktop.
function visit_top_10_order_estimated_visits(){
var ctx = document.getElementById("visit_top_10_order_estimated_visits");
var names_top_10_order_estimated_visits = JSON.parse('{{ names_top_10_order_estimated_visits|safe }}');
var visits_top_10_order_estimated_visits = JSON.parse('{{ visits_top_10_order_estimated_visits|safe }}');
var visit_top_10_order_estimated_visits = new Chart(ctx, {
type: 'bar',
data: {
labels: names_top_10_order_estimated_visits,
datasets: [{
data: visits_top_10_order_estimated_visits,
backgroundColor: background_color,
borderColor: border_color,
borderWidth: 1
}]
},
options: options_settings
});
}
visit_top_10_order_estimated_visits()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment