From de6e40394f63a35f1fcb58f9ef72d011f91f8c7d Mon Sep 17 00:00:00 2001
From: IshaGupta18 <ishagupta1828@gmail.com>
Date: Tue, 4 Jun 2019 15:08:59 +0530
Subject: [PATCH] slider progress

---
 examples/upload_file.html |  2 +-
 src/parsing.js            | 27 ++++++++++++++-------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/examples/upload_file.html b/examples/upload_file.html
index c6056a7..955d5ae 100644
--- a/examples/upload_file.html
+++ b/examples/upload_file.html
@@ -4,7 +4,7 @@
 	<title>Simple Data Grapher</title>
 	
 	<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
-	<script src="https://gitcdn.link/cdn/schme16/Chart.js-RangeSlider/677a7eb6c295772606d300697eaf552245e7f171/dist/RangeSlider-all.min.js"></script>
+	<script src="https://gitcdn.link/cdn/schme16/Chart.js-RangeSlider/2dc49a0980ca04ca2690bc5f1c9e3644e4207b5a/dist/RangeSlider-all.min.js"></script>
 	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
 	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
 	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
diff --git a/src/parsing.js b/src/parsing.js
index 23230bb..6b56e99 100644
--- a/src/parsing.js
+++ b/src/parsing.js
@@ -149,6 +149,19 @@ function determineConfig(hash,length,type){
 	config['data']=data;
 	return config;
 }
+function plotIt(configuration,graphType,ctx){
+	new RangeSliderChart({
+
+		'chartData': configuration['data'], //The same data you give to Chart.js
+		'chartOpts': configuration['options'], //Your Chart.js options
+		'chartType': graphType, //Which Chart.js chart you want (eg. Lie, Bar, Pie, etc.)
+		'chartCTX': ctx, //your canvas context
+
+		'class': 'my-chart-ranger', //Specifies a custom class you want applied to your sliders
+
+		'initial': [3, 400] //Which data points to start the sliders on
+	})
+}
 function plotGraph(hash,length,type,ci,flag){
 	if (flag){
 	console.log("at plotGraph");
@@ -163,20 +176,8 @@ function plotGraph(hash,length,type,ci,flag){
 	var configuration=determineConfig(hash,length,type);
 	var graphType=determineType(type);
 	console.log(configuration);
-	// new Chart(ctx, configuration);
-	
-	// saveAsImage();
-	new RangeSliderChart({
-
-		chartData: configuration['data'], //The same data you give to Chart.js
-		chartOpts: configuration['options'], //Your Chart.js options
-		chartType: graphType, //Which Chart.js chart you want (eg. Lie, Bar, Pie, etc.)
-		chartCTX: ctx, //your canvas context
+	window.setTimeout(plotIt(configuration,graphType,ctx),2000);
 
-		class: 'my-chart-ranger', //Specifies a custom class you want applied to your sliders
-
-		initial: [1200, 7500] //Which data points to start the sliders on
-	})
 	$('.carousel').carousel(2);
 }
 function afterSampleData(completeData,headers,ci,flag){