Skip to content

Instantly share code, notes, and snippets.

@palistha01
palistha01 / urls.py
Created January 10, 2019 08:27
I want to show dynamic data in barchart by using morris.js and django. I'm able to show data and total number of repetition of same data in bar chart but unable to show the same data in range. Example: if i want to show total number of houses having area 1000-2000sqm, 2000-3000 and son on y-axis and area of houses in sqm in x-axis ,i'm unable to…
{% load static %}
<html>
<head>
<meta charset=utf-8/>
<title>Analysis Report</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
@palistha01
palistha01 / urls.py
Created January 10, 2019 08:27
I want to show dynamic data in barchart by using morris.js and django. I'm able to show data and total number of repetition of same data in bar chart but unable to show the same data in range. Example: if i want to show total number of houses having area 1000-2000sqm, 2000-3000 and son on y-axis and area of houses in sqm in x-axis ,i'm unable to…
{% load static %}
<html>
<head>
<meta charset=utf-8/>
<title>Analysis Report</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
@palistha01
palistha01 / json data
Last active January 3, 2019 15:19
Displaying dynamic data in barcharts.
(52) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
0: {ward_no: "9"}
1: {ward_no: "11"}
2: {ward_no: "5"}
3: {ward_no: "12"}
4: {ward_no: "1"}
5: {ward_no: "10"}
6: {ward_no: "11"}
7: {ward_no: "12"}
8: {ward_no: "14"}
@palistha01
palistha01 / report.html
Created January 2, 2019 15:38
Displaying dynamic data in google barchart using django and jquery
function load_monthwise_ward(year, title) {
var temp_title = title + ' ' + year + '';
console.log(temp_title);
$.ajax({
url: '{% url "ward" %}',
type: "GET",
data: {
"_token": "{% csrf_token %}"
},
dataType: "json",