Skip to content

Commit

Permalink
slider progress
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaGupta18 committed Jun 4, 2019
1 parent 8fc7fef commit de6e403
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/upload_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
27 changes: 14 additions & 13 deletions src/parsing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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){
Expand Down

0 comments on commit de6e403

Please sign in to comment.