Open VidyaCK opened 7 years ago
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create-line-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list=PLG6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
When I execute the data.php file it is displaying like this.What goes wrong here.
On Mon, Oct 23, 2017 at 7:48 PM, Yusuf Shakeel notifications@github.com wrote:
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create- line-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list= PLG6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yusufshakeel/chartjs/issues/5#issuecomment-338673849, or mute the thread https://github.com/notifications/unsubscribe-auth/Aff4OPt9mZSZZ9HPOJbcOSjIrJbPZt6rks5svKAYgaJpZM4QCzC6 .
Sir,How to solve this? I am not getting where it went wrong?
On Tue, Oct 24, 2017 at 10:30 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
When I execute the data.php file it is displaying like this.What goes wrong here.
On Mon, Oct 23, 2017 at 7:48 PM, Yusuf Shakeel notifications@github.com wrote:
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create-li ne-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list=PLG 6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yusufshakeel/chartjs/issues/5#issuecomment-338673849, or mute the thread https://github.com/notifications/unsubscribe-auth/Aff4OPt9mZSZZ9HPOJbcOSjIrJbPZt6rks5svKAYgaJpZM4QCzC6 .
In data.php file, in " $result = $mysqli->query($query);" line it is giving undefined variable.
On Tue, Oct 24, 2017 at 10:58 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Sir,How to solve this? I am not getting where it went wrong?
On Tue, Oct 24, 2017 at 10:30 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
When I execute the data.php file it is displaying like this.What goes wrong here.
On Mon, Oct 23, 2017 at 7:48 PM, Yusuf Shakeel notifications@github.com wrote:
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create-li ne-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list=PLG 6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yusufshakeel/chartjs/issues/5#issuecomment-338673849, or mute the thread https://github.com/notifications/unsubscribe-auth/Aff4OPt9mZSZZ9HPOJbcOSjIrJbPZt6rks5svKAYgaJpZM4QCzC6 .
It worked. Problem solved.
On Tue, Oct 24, 2017 at 11:33 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
In data.php file, in " $result = $mysqli->query($query);" line it is giving undefined variable.
On Tue, Oct 24, 2017 at 10:58 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Sir,How to solve this? I am not getting where it went wrong?
On Tue, Oct 24, 2017 at 10:30 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
When I execute the data.php file it is displaying like this.What goes wrong here.
On Mon, Oct 23, 2017 at 7:48 PM, Yusuf Shakeel <notifications@github.com
wrote:
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create-li ne-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list=PLG 6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yusufshakeel/chartjs/issues/5#issuecomment-338673849, or mute the thread https://github.com/notifications/unsubscribe-auth/Aff4OPt9mZSZZ9HPOJbcOSjIrJbPZt6rks5svKAYgaJpZM4QCzC6 .
Thank you so much sir for for help. It is working fine.
On Tue, Oct 24, 2017 at 12:10 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
It worked. Problem solved.
On Tue, Oct 24, 2017 at 11:33 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
In data.php file, in " $result = $mysqli->query($query);" line it is giving undefined variable.
On Tue, Oct 24, 2017 at 10:58 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Sir,How to solve this? I am not getting where it went wrong?
On Tue, Oct 24, 2017 at 10:30 AM, Vidya kabber <vidya.merahkee@gmail.com
wrote:
When I execute the data.php file it is displaying like this.What goes wrong here.
On Mon, Oct 23, 2017 at 7:48 PM, Yusuf Shakeel < notifications@github.com> wrote:
this repo is using older version of chartjs (v1.x) kindly check the new repo chartjs2 hope this helps code https://www.dyclassroom.com/chartjs/chartjs-how-to-create-li ne-graph-using-data-from-mysql-mariadb-table-and-php github repo https://github.com/yusufshakeel/chartjs2 tutorial video https://www.youtube.com/watch?v=nsnbv3wtW3g&index=5&list=PLG 6ePePp5vvZLVjT5mgyxBpkbNBpuAwq9
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yusufshakeel/chartjs/issues/5#issuecomment-338673849, or mute the thread https://github.com/notifications/unsubscribe-auth/Aff4OPt9mZSZZ9HPOJbcOSjIrJbPZt6rks5svKAYgaJpZM4QCzC6 .
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
I am not getting where it went wrong?
On Wed, Oct 25, 2017 at 2:05 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
Here I have score to no_tc.
On Wed, Oct 25, 2017 at 2:10 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
I am not getting where it went wrong?
On Wed, Oct 25, 2017 at 2:05 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
what is data in that? I didn't get that.
On Wed, Oct 25, 2017 at 4:09 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Here I have score to no_tc.
On Wed, Oct 25, 2017 at 2:10 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
I am not getting where it went wrong?
On Wed, Oct 25, 2017 at 2:05 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber vidya.merahkee@gmail.com wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber <vidya.merahkee@gmail.com
wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
Replay me, sir.
On Wed, Oct 25, 2017 at 4:18 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
what is data in that? I didn't get that.
On Wed, Oct 25, 2017 at 4:09 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Here I have score to no_tc.
On Wed, Oct 25, 2017 at 2:10 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
I am not getting where it went wrong?
On Wed, Oct 25, 2017 at 2:05 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber <vidya.merahkee@gmail.com
wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber < vidya.merahkee@gmail.com> wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
It is working fine. Thank you sir.
On Wed, Oct 25, 2017 at 7:35 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Replay me, sir.
On Wed, Oct 25, 2017 at 4:18 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
what is data in that? I didn't get that.
On Wed, Oct 25, 2017 at 4:09 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
Here I have score to no_tc.
On Wed, Oct 25, 2017 at 2:10 PM, Vidya kabber vidya.merahkee@gmail.com wrote:
I am not getting where it went wrong?
On Wed, Oct 25, 2017 at 2:05 PM, Vidya kabber <vidya.merahkee@gmail.com
wrote:
Can you reply me soon?
On Wed, Oct 25, 2017 at 9:54 AM, Vidya kabber < vidya.merahkee@gmail.com> wrote:
Reply me.
On Tue, Oct 24, 2017 at 7:43 PM, Vidya kabber < vidya.merahkee@gmail.com> wrote:
Can you help me to solve this. Sir, I have created other database. It is same as example database. Below I have pasted that below,
[image: Inline image 1]
When I open the line-dp-php.html through browser, it display as below,
[image: Inline image 2] In line-dp-php.js I have made these changes,
$(document).ready(function() {
/**
- call the data.php file to fetch the result from db table. */ $.ajax({ url : "http://localhost:81/chartjs3/api/data.php", type : "GET", success : function(data){ console.log(data);
var score = { pass : [], fail : [] };
var len = data.length;
for (var i = 0; i < len; i++) { if (data[i].result == "pass") { score.pass.push(data[i].score); } else if (data[i].result == "fail") { score.fail.push(data[i].score); } }
//get canvas var ctx = $("#line-chartcanvas");
var data = { labels : ["ver1", "ver2", "ver3", "ver4", "ver5"], datasets : [ { label : "pass testcase", data : score.pass, backgroundColor : "green", borderColor : "lightgreen", fill : false, lineTension : 0, pointRadius : 5 }, { label : "fail testcase", data : score.fail, backgroundColor : "red", borderColor : "lightred", fill : false, lineTension : 0, pointRadius : 5 } ] };
var options = { title : { display : true, position : "top", text : "Line Graph", fontSize : 18, fontColor : "#111" }, legend : { display : true, position : "bottom" } };
var chart = new Chart( ctx, { type : "line", data : data, options : options } );
}, error : function(data) { console.log(data); } });
});
For bar graph how to take the values from database.
I am a beginner to php. I am not getting how to display it. Can you help me solve this.