[openspending-dev] Help to input the icons on WDMMG

Володимир Харченко vx2005 at ukr.net
Wed Feb 6 18:01:21 UTC 2013




Helo Friedrich!!! Sorry for my English! May have a hard time
understanding. I have my own set of openspending.org/sumy13_v_col But I
decided to set http://openspending.org/nigeriabudg13 I want to learn
here. This is a simple standard set. I understand that the "from" - the
highest level, "to" - the lowest level. All turns out well:
http://imageshost.ru/photo/66429/id2786574.html But how to make different
colors and icons for different level "from", and then "to"? On the
Internet there are not examples in which import data is to openspending.
"Uganda " there
is(https://github.com/okfn/bubbletree/tree/master/demos/uganda , but
there is taxonomy. I do not have .. Help. Change to my file that is wrong
... here Welcome Friedrich!!! Sorry for my English! May have a hard time
understanding. I have my own set of openspending.org/sumy13_v_col But I
decided to set http://openspending.org/nigeriabudg13 I want to learn
here. This is a simple standard set. I understand that the "from" - the
highest level, "to" - the lowest level. All turns out well:
http://imageshost.ru/photo/66429/id2786574.html But how to make different
colors and icons for different level "from", and then "to"? On the
Internet there are not examples in which import data is to openspending.
"Uganda " there
is(https://github.com/okfn/bubbletree/tree/master/demos/uganda , but
there is taxonomy. I do not have .. Help. Change to my file that is wrong
... here: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta charset="UTF-8"/> <title>Uganda Budget</title> <script
type="text/javascript" src="../../lib/jquery-1.5.2.min.js"></script>
<script type="text/javascript"
src="../../lib/jquery.history.js"></script> <script
type="text/javascript" src="../../lib/jquery.tooltip.min.js"></script>
<script type="text/javascript" src="../../lib/raphael.js"></script>
<script type="text/javascript" src="../../lib/vis4.js"></script> <script
type="text/javascript" src="../../lib/Tween.js"></script> <script
type="text/javascript" src="../../build/bubbletree.js"></script> <script
type="text/javascript"
src="http://assets.openspending.org/openspendingjs/master/lib/aggregator.js"></script>
<link rel="stylesheet" type="text/css" href="../../build/bubbletree.css"
/> <style type="text/css"> #header { width: 300px; } </style> <script
type="text/javascript"> $(function() { var $tooltip = $('<div
class="tooltip">Tooltip</div>'); $('.bubble-chart').append($tooltip);
$tooltip.hide(); var getTooltip = function() { return
this.getAttribute('tooltip'); }; var initTooltip = function(node,
domnode) { domnode.setAttribute('tooltip', node.label+'  <br
/><big><b>'+node.famount+'</b></big>');
vis4.log(domnode.getAttribute('tooltip')); $(domnode).tooltip({ delay:
200, bodyHandler: getTooltip }); }; new OpenSpending.Aggregator({ apiUrl:
'http://openspending.org/api', dataset: 'nigeriabudg13', drilldowns:
['from', 'to'], //cuts: ['year:2005', 'spending_type:Disbursement'], //
localApiCache: 'aggregate.json', rootNodeLabel: '2013 Budget Proposal
(Nigeria)', breakdown: 'to', callback: function(data) { new BubbleTree({
data: data, container: '.bubbletree', //tooltipCallback: tooltip,
bubbleType: ['icon'], initTooltip: initTooltip, maxNodesPerLevel: 12,
bubbleStyles: { 'id': {  'root': { color: '#FF0000', icon: 'money.svg'}//
yes }, 'name': {  'DEBT SERVICE': {color: '#1A439A', icon: 'money.svg'
},// not 'STATUTORY TRANSFERS': {color: '#A1218D', icon: 'money.svg' },//
not 'CAPITAL SUPPLEMENTATION': {color: '#1A439A', icon: 'money.svg'}//
not } } }); } }); });
</script> </head> <body> <div id="header"><a class="title">Nigeria in
Uganda</a> <div class="subtitle"></div></div> <div
class="bubbletree-wrapper"> <div class="bubbletree"></div> </div> </body>
</html>

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20130206/2ac5db08/attachment.html>


More information about the openspending-dev mailing list