mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Cleanup and prep-work for new charts (will be a new feature).
This commit is contained in:
		| @@ -2,12 +2,10 @@ $(function () { | ||||
|     if ($('#accountTable').length == 1) { | ||||
|         drawDatatable(); | ||||
|     } | ||||
|     //if ($('#accountTransactionsTable').length == 1) { | ||||
|     //    drawTransactionsForAccount(); | ||||
|     //} | ||||
|     if ($('#transactionByAccountTable').length == 1) { | ||||
|         renderTransactionsFromURL(URL, container); | ||||
|     if ($('#overviewChart').length == 1) { | ||||
|         drawOverviewChart(); | ||||
|     } | ||||
|  | ||||
| }); | ||||
|  | ||||
| function drawDatatable() { | ||||
| @@ -62,11 +60,11 @@ function drawDatatable() { | ||||
| } | ||||
|  | ||||
|  | ||||
| function drawTransactionsForAccount() { | ||||
| function drawOverviewChart() { | ||||
|     $.getJSON('chart/home/account/' + accountID).success(function (data) { | ||||
|         var options = { | ||||
|             chart: { | ||||
|                 renderTo: 'accountTransactionsTable', | ||||
|                 renderTo: 'overviewChart', | ||||
|                 type: 'spline' | ||||
|             }, | ||||
|  | ||||
| @@ -128,84 +126,6 @@ function drawTransactionsForAccount() { | ||||
|                 enabled: false | ||||
|             } | ||||
|         }; | ||||
|         $('#accountTransactionsTable').highcharts(options); | ||||
|         $('#overviewChart').highcharts(options); | ||||
|     }); | ||||
| } | ||||
|  | ||||
| //$(function () { | ||||
| //if($('#chart').length == 1) { | ||||
| //    /** | ||||
| //     * get data from controller for home charts: | ||||
| //     */ | ||||
| //    $.getJSON('chart/home/account/' + accountID).success(function (data) { | ||||
| //        var options = { | ||||
| //            chart: { | ||||
| //                renderTo: 'chart', | ||||
| //                type: 'spline' | ||||
| //            }, | ||||
| // | ||||
| //            series: data.series, | ||||
| //            title: { | ||||
| //                text: null | ||||
| //            }, | ||||
| //            yAxis: { | ||||
| //                allowDecimals: false, | ||||
| //                labels: { | ||||
| //                    formatter: function () { | ||||
| //                        if(this.value >= 1000 || this.value <= -1000) { | ||||
| //                            return '\u20AC ' + (this.value / 1000) + 'k'; | ||||
| //                        } | ||||
| //                        return '\u20AC ' + this.value; | ||||
| // | ||||
| //                    } | ||||
| //                }, | ||||
| //                title: {text: null} | ||||
| //            }, | ||||
| //            xAxis: { | ||||
| //                type: 'datetime', | ||||
| //                dateTimeLabelFormats: { | ||||
| //                    day: '%e %b', | ||||
| //                    week: '%e %b' | ||||
| //                }, | ||||
| //                title: { | ||||
| //                    text: null | ||||
| //                } | ||||
| //            }, | ||||
| //            legend: {enabled:false}, | ||||
| //            tooltip: { | ||||
| //                formatter: function () { | ||||
| //                    return this.series.name + ': \u20AC ' + Highcharts.numberFormat(this.y,2); | ||||
| //                } | ||||
| //            }, | ||||
| //            plotOptions: { | ||||
| //                line: { | ||||
| //                    shadow: true | ||||
| //                }, | ||||
| //                series: { | ||||
| //                    cursor: 'pointer', | ||||
| //                    negativeColor: '#FF0000', | ||||
| //                    threshold: 0, | ||||
| //                    lineWidth: 1, | ||||
| //                    marker: { | ||||
| //                        radius: 0 | ||||
| //                    }, | ||||
| //                    point: { | ||||
| //                        events: { | ||||
| //                            click: function (e) { | ||||
| //                                alert('click!'); | ||||
| //                            } | ||||
| //                        } | ||||
| //                    } | ||||
| //                } | ||||
| //            }, | ||||
| //            credits: { | ||||
| //                enabled: false | ||||
| //            } | ||||
| //        }; | ||||
| //        $('#chart').highcharts(options); | ||||
| //    }); | ||||
| //} | ||||
| // | ||||
| // | ||||
| // | ||||
| //}); | ||||
		Reference in New Issue
	
	Block a user