Merge branch 'staging-fixes' of https://github.com/frappe/erpnext into analytics-fix
diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.js b/erpnext/buying/report/purchase_analytics/purchase_analytics.js
index 297ec51..139c4b7 100644
--- a/erpnext/buying/report/purchase_analytics/purchase_analytics.js
+++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.js
@@ -68,12 +68,6 @@
 		}
 
 	],
-	"formatter": function(value, row, column, data) {
-		if(!value){
-			value = 0
-		}
-		return value;
-	},
 	get_datatable_options(options) {
 		return Object.assign(options, {
 			checkboxColumn: true,
@@ -110,19 +104,19 @@
 						labels: raw_data.labels,
 						datasets: new_datasets
 					}
-					
+
 					setTimeout(() => {
 						frappe.query_report.chart.update(new_data)
-					},200)
-					
-					
+					},500)
+
+
 					setTimeout(() => {
 						frappe.query_report.chart.draw(true);
-					}, 800)
+					}, 1000)
 
 					frappe.query_report.raw_chart_data = new_data;
 				},
 			}
-		})
-	},
+		});
+	}
 }
diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.js b/erpnext/manufacturing/report/production_analytics/production_analytics.js
index b7b8f05..99f9b12 100644
--- a/erpnext/manufacturing/report/production_analytics/production_analytics.js
+++ b/erpnext/manufacturing/report/production_analytics/production_analytics.js
@@ -39,8 +39,5 @@
 			default: "Monthly",
 			reqd: 1
 		}
-	],
-	"formatter": function(value, row, column, data) {
-		return value;
-	}
+	]
 }
diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js
index 7dc7c75..ac3ebfe 100644
--- a/erpnext/selling/report/sales_analytics/sales_analytics.js
+++ b/erpnext/selling/report/sales_analytics/sales_analytics.js
@@ -106,12 +106,12 @@
 
 					setTimeout(() => {
 						frappe.query_report.chart.update(new_data)
-					},200)
+					}, 500)
 
 
 					setTimeout(() => {
 						frappe.query_report.chart.draw(true);
-					}, 800)
+					}, 1000)
 
 					frappe.query_report.raw_chart_data = new_data;
 				},
diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py
index 8d99a9b..07ad839 100644
--- a/erpnext/selling/report/sales_analytics/sales_analytics.py
+++ b/erpnext/selling/report/sales_analytics/sales_analytics.py
@@ -212,11 +212,11 @@
 
 	def get_period(self, posting_date):
 		if self.filters.range == 'Weekly':
-			period = "Week " + str(posting_date.isocalendar()[1])
+			period = "Week " + str(posting_date.isocalendar()[1]) + " " + str(posting_date.year)
 		elif self.filters.range == 'Monthly':
-			period = self.months[posting_date.month - 1]
+			period = str(self.months[posting_date.month - 1]) + " " + str(posting_date.year)
 		elif self.filters.range == 'Quarterly':
-			period = "Quarter " + str(((posting_date.month-1)//3)+1)
+			period = "Quarter " + str(((posting_date.month-1)//3)+1) +" " + str(posting_date.year)
 		else:
 			year = get_fiscal_year(posting_date, company=self.filters.company)
 			period = str(year[2])
@@ -277,11 +277,14 @@
 	def get_chart_data(self):
 		length = len(self.columns)
 		labels = [d.get("label") for d in self.columns[2:length-1]]
+		entry = {
+			'name':self.data[0].get('entity_name')
+		}
+		print("##########")
 		self.chart = {
 			"data": {
 				'labels': labels,
-				'datasets':[
-				]
+				'datasets':[]
 			},
 			"type": "line"
 		}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.js b/erpnext/stock/report/stock_analytics/stock_analytics.js
index bebc84e..12e4350 100644
--- a/erpnext/stock/report/stock_analytics/stock_analytics.js
+++ b/erpnext/stock/report/stock_analytics/stock_analytics.js
@@ -71,17 +71,6 @@
 			reqd: 1
 		}
 	],
-	"formatter": function(value, row, column, data) {
-		if(!value && (column.fieldname == 'brand' || column.fieldname == 'uom')){
-			value = ""
-		}
-
-		if(Number(value)){
-			value = value.toFixed(2)
-		}
-
-		return value;
-	},
 	get_datatable_options(options) {
 		return Object.assign(options, {
 			checkboxColumn: true,
@@ -120,16 +109,16 @@
 
 					setTimeout(() => {
 						frappe.query_report.chart.update(new_data)
-					},200)
+					},500)
 
 
 					setTimeout(() => {
 						frappe.query_report.chart.draw(true);
-					}, 800)
+					}, 1000)
 
 					frappe.query_report.raw_chart_data = new_data;
 				},
 			}
-		})
-	},
+		});
+	}
 }
diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.py b/erpnext/stock/report/stock_analytics/stock_analytics.py
index dad8be1..54eefdf 100644
--- a/erpnext/stock/report/stock_analytics/stock_analytics.py
+++ b/erpnext/stock/report/stock_analytics/stock_analytics.py
@@ -99,11 +99,11 @@
 	months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
 
 	if filters.range == 'Weekly':
-		period = "Week " + str(posting_date.isocalendar()[1])
+		period = "Week " + str(posting_date.isocalendar()[1]) + " " + str(posting_date.year)
 	elif filters.range == 'Monthly':
-		period = months[posting_date.month - 1]
+		period = str(months[posting_date.month - 1]) + " " + str(posting_date.year)
 	elif filters.range == 'Quarterly':
-		period = "Quarter " + str(((posting_date.month-1)//3)+1)
+		period = "Quarter " + str(((posting_date.month-1)//3)+1) +" " + str(posting_date.year)
 	else:
 		year = get_fiscal_year(posting_date, company=filters.company)
 		period = str(year[2])