Page 1 of 1

Assets

Posted: Mon Feb 03, 2014 5:23 pm
by Nikolay
New GRM will be described on wiki
https://sourceforge.net/p/moneymanagere ... 20Manager/
assetsGRM.gif

Re: Assets

Posted: Fri Feb 07, 2014 12:27 am
by Nikolay
More advances js
https://github.com/Regaddi/Chart.js/tree/tooltips
assets_gt.png
SQL

Code: Select all

SELECT
'' as COLOR,
assettype,
total(value) as VALUE
FROM ASSETS_V1 
group by assettype
order by value desc;
Lua script:

Code: Select all

local total = 1;
local count = 0;
local data = "";
local colors = {"#FBD4B4", "#E5B8B7", "#B6DDE8", "#B8CCE4", "#F0EDCE", "#DEE3E7", "#99FF99"};

function handle_record(record)
	total = total + record:get('VALUE');
    count = count +1;
    data = data .. '{value: ' .. record:get('VALUE') .. ', color:"' .. colors[count] .. '", label : "' .. record:get('ASSETTYPE') ..'", labelColor : "black", labelFontSize : "12", labelAlign : "center"},\n';
    record:set('COLOR', colors[count]);
end

function complete(result)
	result:set('ASSET_TOTAL', total);
	result:set('ASSET_DATA', data);
end
Template:

Code: Select all

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>MoneyManagerEx - Report</title>
    <SCRIPT><TMPL_INCLUDE NAME="Chart.js"></SCRIPT>
</head>
<h3><TMPL_VAR REPORTNAME></h3>
<TMPL_VAR TODAY><hr>
<table cellspacing='1' width='90%'>
<tr><td><table cellspacing='1' >

<tr><td><canvas id="reportChart" width="300" height="300"></canvas></td></tr>

    <tr bgcolor='#4f81bd'>
        <th ><font color="white">ASSETTYPE</font></th>
        <th><font color="white">VALUE</font></th>
    </tr>
    <TMPL_LOOP NAME=CONTENTS>
        <tr bgcolor='<TMPL_VAR "COLOR">'>
        <td><TMPL_VAR "ASSETTYPE"></td>
        <td nowrap align='right'><TMPL_VAR "VALUE"></td>
        </tr>
    </TMPL_LOOP>
    <tr><td colspan=2><table border='1' width='100%'></table></td></tr>
        <tr>
        <td>Total:</td>
        <td nowrap align='right'><TMPL_VAR "ASSET_TOTAL"></td>
        </tr>
</td><td></td></tr></table></table>

<TMPL_LOOP ERRORS>
    <hr>
    <TMPL_VAR ERROR>
</TMPL_LOOP>

<script type="text/javascript">
   	var data = [
<TMPL_VAR "ASSET_DATA">
];
   	
   	var options = {
   	// animation : false,
   	animationEasing: 'easeOutQuint'
   	};
   
  // Get the context of the canvas element we want to select
  var ctx = document.getElementById("reportChart").getContext("2d");
  var reportChart = new Chart(ctx).Pie(data, options);
</script>

Re: Assets

Posted: Sun Feb 09, 2014 5:06 pm
by Nikolay
Report container


http://msdn.microsoft.com/en-us/library ... _emulation

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"mmex.exe"=dword:00002af9

Re: Assets

Posted: Wed Feb 19, 2014 4:46 am
by Nikolay
updated. only for svn >= 6145