Jump to content

dodgeitorelse3

Members
  • Posts

    266
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by dodgeitorelse3

  1. A web server typically uses port 80 so what do you get without the :5500 in address?
  2. missing closing square bracket at end of Json Format
  3. in Firefox Developer menu bar choose Tools/Web Developer or right click on an element on web page and choose inspect element
  4. My apologies. I didn't see the commented out lines.
  5. You have a button with type= button as well as type= submit and name of remove and at sane time you have an input with type=submit and name=remove.
  6. What does title.php look like?
  7. pg_connect from manual https://www.php.net/manual/en/function.pg-connect.php
  8. Have you tried to echo query to verify what it is using for login credentials?
  9. I think you are going to want to run your if/else statement on your results instead of in your query.
  10. Also with chart.js all arrays used for chart must have exact same number of items in each array.
  11. is the filename from files table stored with file extension?
  12. check your semi colons ( ; )
  13. Show what you have tried so far please
  14. OP is most likely after rows 11 through 20 (after last 10)
  15. @OP, you have a comma before name in your query
  16. var labelsdb = <?php echo json_encode($labelsdb); ?>; //array from database for dates and times var datadb = <?php echo json_encode($datadb); ?>; // array from database for number of players var datadon = <?php echo json_encode($datadon); ?>; // array from database for number of players var datadoff = <?php echo json_encode($datadoff); ?>; // array from database for number of players var ctx = document.getElementById("myChart"); // points to canvas ctx.style.backgroundColor = "#2F3136"; //canvas background color var myChart = new Chart(ctx, { type: 'line', data: { labels: labelsdb, datasets: [{ label: 'Players', yAxisID: 'A', backgroundColor: '#593A45', // color for active players bars in graph borderWidth: 1, // border for active players bars in graph borderColor: '#F45E7F', steppedLine: true, //true keeps even line horizontal until change, false displays curved line data: datadb }, { label: 'Online', yAxisID: 'B', backgroundColor: '#808080', // color for active players bars in graph borderWidth: 1, // border for active players bars in graph borderColor: '#CECECE', steppedLine: true, //true keeps even line horizontal until change, false displays curved line data: datadon }] }, options: { responsive: true, //whether graph is responsive when zoom in or out maintainAspectRatio: false, scales: { xAxes: [{ scaleLabel: { display: true, fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14 }, ticks: { autoSkip: false, maxTicksLimit: 24, maxRotation: 45, //rotate text for hours at bottom of graph minRotation: 45, //rotate text for hours at bottom of graph fontColor: '#FFFFFF', // color of hours at bottom of graph major: { enabled: true, // <-- This is the key line fontStyle: 'bold', //You can also style these values differently fontSize: 14 //You can also style these values differently } }, type: 'time', //to show time at bottom of graph time: { unit: 'hour', displayFormats: { hour: 'hA', //example displays 9AM or 6PM stepSize: 1 //1 for each hour to display at bottom of graph, 2 to show every 2 hrs. } }, display: true, gridLines: { display: true, // display vertical gridline color: '#686868', //color of vertical gridlines zeroLineColor: '#686868' //colors first vertical grid line } }], yAxes: [{ id: 'A', type: 'linear', position: 'left', ticks: { fontColor: '#FFFFFF', // color of numbers at left side of graph for number of players stepSize: 1 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines }, scaleLabel: { display: true, //display label at left vertical side of graph labelString: 'Players', //text to be displayed at left vertical side of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, } }, { id: 'B', type: 'linear', position: 'right', ticks: { max: 1, min: 0, stepSize: 1, fontColor: '#808080', fontStyle: 'bold', fontSize: 14 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines }, scaleLabel: { display: true, labelString: 'Online', fontColor: '#808080', fontStyle: 'bold', fontSize: 14 } }] } } }); Solved!!
  17. I have this code. The players works and scales to the left side 0-23 but online scales to left side 0-23 instead of right side 0-1. What am I doing wrong? //arrays used in javascript //$labelsdb = array('2018-12-20 00:11', '2018-12-20 00:37', '2018-12-20 00:43', '2018-12-20 03:15', '2018-12-20 03:42', '2018-12-20 03:56', '2018-12-20 04:17', '2018-12-20 04:33', '2018-12-20 07:23', '2018-12-20 10:00', '2018-12-20 12:23', '2018-12-20 14:00', '2018-12-20 18:42', '2018-12-20 19:17', '2018-12-20 23:53'); //$datadb = array(2,12,2,7,23,5,8,2,0,4,0,8,1,0,3); //$datadon = array(1,0,1,1,1,1,1,0,1,1,0,1,1,0,1); //$datadoff = array(0,1,0,0,0,0,0,1,0,0,1,0,0,1,0); var labelsdb = <?php echo json_encode($labelsdb); ?>; //array from database for dates and times var datadb = <?php echo json_encode($datadb); ?>; // array from database for number of players var datadon = <?php echo json_encode($datadon); ?>; // array from database for number of players var datadoff = <?php echo json_encode($datadoff); ?>; // array from database for number of players var todays_date = "20Dec2018"; // todays date //var ctx = document.getElementById("myChart").getContext('2d'); // points to canvas var ctx = document.getElementById("myChart"); // points to canvas ctx.style.backgroundColor = "#2F3136"; //canvas background color var myChart = new Chart(ctx, { type: 'line', data: { labels: labelsdb, //data from database for dates and times datasets: [{ backgroundColor: '#593A45', // color for active players bars in graph label: 'Players', // label for legend yAxisId: 'y-axis-players', data: datadb, //data from database for number of players borderWidth: 1, // border for active players bars in graph borderColor: '#F45E7F', steppedLine: true, //true keeps even line horizontal until change, false displays curved line }, { yAxisId: 'y-axis-online', backgroundColor: '#E5E5E5', // color for active players bars in graph label: 'Online', // label for legend data: datadon, //data from database for number of players borderWidth: 1, // border for active players bars in graph borderColor: '#CECECE', steppedLine: true, //true keeps even line horizontal until change, false displays curved line },] }, options: { responsive: true, //wheteher graph is responsive when zoom in or out maintainAspectRatio: false, legend: { labels: { fontColor: '#FFFFFF' // color of legend label } }, scales: { xAxes: [{ scaleLabel: { display: true, //labelString: updated, //displays date at very bottom of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, }, ticks: { autoSkip: false, maxTicksLimit: 24, maxRotation: 45, //rotate text for hours at bottom of graph minRotation: 45, //rotate text for hours at bottom of graph fontColor: '#FFFFFF', // color of hours at bottom of graph major: { enabled: true, // <-- This is the key line fontStyle: 'bold', //You can also style these values differently fontSize: 14 //You can also style these values differently } }, type: 'time', //to show time at bottom of graph time: { unit: 'hour', displayFormats: { hour: 'hA', //example displays 9AM or 6PM stepSize: 1 //1 for each hour to display at bottom of graph, 2 to show every 2 hrs. } }, display: true, gridLines: { display: true, // display vertical gridline color: '#686868', //color of vertical gridlines zeroLineColor: '#686868' //colors first vertical grid line } }], yAxes: [{ scaleLabel: { display: true, //display label at left vertical side of graph labelString: 'Players', //text to be displayed at left vertical side of graph fontColor: '#FFFFFF', fontStyle: 'bold', fontSize: 14, position: 'left', id: 'y-axis-players', }, ticks: { fontColor: '#FFFFFF', // color of numbers at left side of graph for number of players stepSize: 1 // 1 is to display 0, 1, 2, 3 or 2 will display 0, 2, 4, 6 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines } },{ scaleLabel: { display: true, labelString: 'Online', fontColor: '#E5E5E5', fontStyle: 'bold', fontSize: 14 }, position: 'right', id: 'y-axis-online', //type: 'linear', ticks: { min: 0, beginAtZero: true, stepSize: 1, max: 1, fontColor: '#E5E5E5', fontStyle: 'bold', fontSize: 14 }, ticks: { fontColor: '#FFFFFF', // color of numbers at right side of graph for online stepSize: 1 }, gridLines: { display: true, //display horizontal gridlines color: "#686868" //color of horizontal gridlines } }], } } });
  18. Assuming you ran a query to get $result your first option has no value set. The second option should have the echo inside quotes just like your submit does.
  19. Did you bother to test the 2 suggestions?
  20. are you saying that you want to track all included pages or required pages in tracking as well?
  21. How does the section near top to define variables work? Wouldn't that make $username be the value of $confirm_password?
  22. Very very hard to see the returned array
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.