Jump to content

Financial Charts


omglookeyhere

Recommended Posts

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.

Link to comment
Share on other sites

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. :D:D

Link to comment
Share on other sites

  • 2 weeks later...

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>	

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...