omglookeyhere Posted September 17, 2019 Report Share Posted September 17, 2019 So, since Google browser is doing away with Flash in some very near future. Is there a way to take Flash charts and convert them to another source where every browser is able to display them? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
LeonardIGO4036 Posted September 17, 2019 Report Share Posted September 17, 2019 14 minutes ago, omglookeyhere said: So, since Google browser is doing away with Flash in some very near future. Is there a way to take Flash charts and convert them to another source where every browser is able to display them? Thanks in advance. Very much possible. Have you heard of Charts.js? I *guess* Nabeel is using that on phpvms7 Take a look here > https://www.chartjs.org/samples/latest/charts/line/basic.html It's very advanced as well as a very easy library to work with. Let me see if I can make a patch for the VA finance module. Regards. Quote Link to comment Share on other sites More sharing options...
Moderators shakamonkey88 Posted September 17, 2019 Moderators Report Share Posted September 17, 2019 I'd recommend using highcharts. It works very well with phpvms installs and is easy to implement in place of the flash charts. See here as an example on a PIREP page: Quote Link to comment Share on other sites More sharing options...
omglookeyhere Posted September 18, 2019 Author Report Share Posted September 18, 2019 10 hours ago, LeonardIGO4036 said: Very much possible. Have you heard of Charts.js? I *guess* Nabeel is using that on phpvms7 Take a look here > https://www.chartjs.org/samples/latest/charts/line/basic.html It's very advanced as well as a very easy library to work with. Let me see if I can make a patch for the VA finance module. Regards. I have version 5.5 is it still going to work? Anyone have any ideas where I can get some tutorials to learn it? Would love to see charts in action. Quote Link to comment Share on other sites More sharing options...
omglookeyhere Posted October 2, 2019 Author Report Share Posted October 2, 2019 So, I have figured out how to work charts.js. But i am still confused on how to extract data from Finances page and insert it into the charts. I mean I could manually insert every month, but I have to believe that there is better ways to do it. Any ideas? http://prntscr.com/pe1evg this is the chart i am trying to make with this example code provided by charts.js <script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0/dist/Chart.min.js"></script> <canvas id="myChart" width="400" height="400"></canvas> <script> var ctx = document.getElementById('myChart').getContext('2d'); var myLineChart = new Chart(ctx, { type: 'line', data: { labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'], datasets: [{ label: '# of Votes', data: [12, 19, 3, 5, 2, 3], backgroundColor: [ 'rgba(255, 99, 132, 0.2)', 'rgba(54, 162, 235, 0.2)', 'rgba(255, 206, 86, 0.2)', 'rgba(75, 192, 192, 0.2)', 'rgba(153, 102, 255, 0.2)', 'rgba(255, 159, 64, 0.2)' ], borderColor: [ 'rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)' ], borderWidth: 1 }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero: true } }] } } }); </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.