Documente Academic
Documente Profesional
Documente Cultură
and Dashboards
Mark Bernstein
Tinderbox™ is a trademark of Eastgate Systems, Inc. All other trademarks herein are used illustratively and are
the property of their respective owners.
The story and example expense account data used here is a work of fiction. All persons, places, and institutions
mentioned therein are imaginary, and any resemblance to actual places, institutions, or persons alive or dead, is
entirely coincidental.
1
Table of Contents
Things Change
This tutorial was originally written for Tinderbox 6.3. New versions of
Tinderbox appear frequently, and the version you’re using is probably newer.
Nearly 100 official Tinderbox versions have already been released to
customers, and updates arrive frequently.
Details of the sample document may have changed since the screen shots in
this tutorial were captured, and as a result some of the results will differ
numerically from those illustrated here.
4
Some details discussed here may vary from the version of the program you
are using. Don’t worry too much: the underlying principles and concepts still
apply. If you’re stuck, feel free to ask on the Tinderbox Forum, or email
Eastgate.
The Problem
In this tutorial, we’ll explore and analyze some expenses incurred during a
fictional business trip. The sample data and analytical tools can be found in a
Tinderbox document you can download from:
http://www.eastgate.com/download/ActionsAndDashboards.dmg
In this tutorial, we explore some ways we can use Tinderbox to automate,
analyze, and visualize this rather mundane information. Realistically, you
would be unlikely to want to invest this much care in such mundane and
manageable data, but the same techniques can be applied to your own,
subtler problems.
Suspend your disbelief: If you’re confronting problems that don’t seem
analogous to those described here, Tinderbox might still be able to help.
5
Again, ask in the Tinderbox forum, where lots of Tinderbox users welcome
such questions, or email Eastgate.
Other Resources
Other places to find information about Tinderbox include:
Tinderbox Help, a detailed manual found in the Help menu.
Mark Bernstein’s book The Tinderbox Way discusses the core ideas that underlie
Tinderbox. It is available as an eBook from Eastgate.
6
1 All the people, places, and institutions mentioned here are fictitious, or are used fictitiously.
7
Over the course of the following weeks, Nakamura visits a number of cities
across Europe and North Africa, meeting with TK personnel, contractors,
vendors, government officials, heads of charitable foundations and other
stakeholders in order to understand the causes for these problems.
The first, leftmost tab in the example Tinderbox document is simply a list of
expenses incurred during this trip.
8
This list contains three kinds of notes. Each type of note has its own
prototype and appearance:
1. City notes are containers for each major stop in Nakamura’s trip. Their
titles are bold.
2. Summary notes briefly outline each day’s business, both for mandatory
record-keeping and to provide context to the Account Department when
they come to authorize reimbursement. Their titles use the Sketchnote
font.
3. Expense notes describe one expenditure, explaining who was paid, how
the payment was made, and occasionally providing additional detail for
the benefit of the Accounting or Legal departments. Their titles use plain
font.
Prototypes
Click on the Prototypes tab to see the prototypes used in this document. In
the upper right-hand corner of the map, the adornment named Data
Prototypes contains prototypes used to characterize these expenses:
9
City
Summary
Draft Summary
Expense
The prototype defines what sort of note each note is. Every expense record
adopts Expense as its prototype, so it’s easy to find expenses and separate
them from other notes.
Second, the prototype defines the base appearance of each note. The
distinctive font and color the Summary notes and the bold font of City notes
are inherited from the prototype; we don’t need to remember to set these
manually, and have no worries about
accidental inconsistencies.
Third, each prototype defines some key
attributes that are particularly relevant to
notes of that type.
• City simply records the $Currency typically
used in that place and the $StartDate of our visit to that city.
• Summary uses $StartDate to record the day it summarizes.
10
• Each Expense records a list of information about a single expenditure.
$StartDate is the date of payment, and $City is the place where the
payment was made. $Recipient is a user
attribute where we record whom we paid.
We record the $Amount we paid, the
$Currency we used, and the equivalent of
this payment in US $Dollars2. $Method
records whether the recipient was paid in
cash or credit card. Finally, $Tags holds a
set of tags that will help us (and the
Accounting Department) categorize and account for each expense. Tags
might include “lodging”, “travel”, “meals” (with additional tags such as
“lunch” and “dinner”), as well as tags about client accounts or projects
associated with the expense.
Every expense needs to record this information. It does us little good, for
example, to know that we spent 46.50 on dinner in Zürich if we forget to
2 Later, we will arrange this Tinderbox document so it automatically performs the currency conversions for us, and fills out many of
these fields automatically. If we expect to have only a few expenses over a short period of time, we could simply fill these out
manually; if we will be using this project daily for months or years, we might eventually decide to automate some of the more tedious
or error-prone chores as we have done in this example.
11
record whether we paid in Euros or Dollars or Swiss Francs. The list of key
attributes helps ensure that we will capture the information we need.
☞ Resist the temptation to add unnecessary key attributes. When you are in a hurry, you’ll
be tempted to skip over them or to add the data later, but questions that can be answered
today with ease may prove nettlesome to recall next week, or the night before the expense
report is due.
12
Collecting Expenses
The first agent in the Sandbox is named All Expenses, and collects every
note that uses the Expense prototype. In outline view, click on All Expenses
to select it, and click on its disclosure triangle to expand it. Inside the agent,
13
you will see a long list of aliases, one
for each expense recorded in the
entire document.
With All Expenses selected, open
the Inspector by choosing Inspector
from the Windows menu. Select the
Action Inspector, marked with a ⚙
icon, and choose the Query pane.
This Query is simply a logical
expression which is applied in turn
to every note; if the result is true, the
note’s alias is gathered by the agent,
while if the result is false the agent
takes no further action on that note.
Agent:"All"Expenses
Query:"$Prototype=="Expense""
14
The unusual operator “==” is the comparison operator, and is true if two things are equal.
We use it here to avoid confusion with the assignment operator “=”, which sets the value
of an attribute.
Note that, in the right-hand corner of this pane, Tinderbox displays the
number of notes currently found by this agent.
Sorting Expenses
Next, switch to the Sort pane of the
Action Inspector. Here, we choose
how the aliases inside the agent
should be arranged. Initially, they
are sorted using the system attribute
$StartDate, in the Event category.
The expenses are arranged in
chronological order, with the first
expenses – lunch at the airport and a
Paris guidebook – at the top and the
latest expenses at the bottom.
We can easily choose different
15
sorting criteria. Be sure that All Expenses is still selected, and click on the
Sort By pulldown menu and select Dollars from the User category, near the
top of the menu. The list is now sorted by expense, starting with a $4.99
downloadable map. Click on the reverse checkbox to invert the sort order;
now, the first item is our costly same-day flight from Boston to Paris.
For convenience, collapse the outline disclosure triangle of All Expenses
before continuing.
To qualify for this agent, a note must be an expense and it must have the tag
“meal.” The ampersand (&) is the logical “and” operator; the query is true if
its left side is true and its right side is also true.
$Tags is a set attribute – a list of labels or “tags,” separated by semicolons.
The expression
$Tags.contains("meal")"
Again, view the query and sort in the inspector, and expand the agent in
outline view to see which notes it has gathered. It’s always a good idea to
examine what your agents find!
The first clause is true for all notes that are inside the agent All Expenses
inside the container Examples. In this case, we might equivalently have
written
$Prototype=="Expense""
18
but if All Expenses required lots of computing work to finds its results,
inside() lets other agents take advantage of that work without having to
replicate it.
The second clause
($Dollars>1000"|"$Method=="cash")"
Weekends, Only
Because a proposed cost-control initiative advocates minimizing business
travel over weekends, we might need to identify expenditures on Saturdays
and Sundays.
Agent:""
Weekends"Only
Query:""
$Prototype=="Expense""&"("$StartDate.weekday==6|$StartDate.weekday==7")
Sort:"
""$StartDate" "
May Day
We might want to locate all expenses from a specific date.
Agent:""
May"Day
Query:""
$Prototype=="Expense""&"$StartDate==date("5/1/2015"")"
Sort:"
""$StartDate" "
This is simple enough, but does raise a few tricky issues concerning dates.
First, the date() operator converts strings to dates. The string can be any
date that Tinderbox recognizes, including dates expressed in your
computer’s local date preferences. If we were using a computer configured
with British date preferences (in System Preferences:Language and Region),
we’d write “1/5/2015” in conformance with British usage. Alternatively, we
could write “May 1, 2015” in either in the US or 1 May 2015 in the UK.
Second, Tinderbox dates always include a time of day. By convention, the
equality operator == is true if two dates fall on the same calendar day. If
event A begins on Monday morning and event B begins on Monday
20
afternoon, then $StartDate(A) == $StartDate(B) is true, even though
$StartDate(A)<$StartDate(B) is also true3.
Making A Timeline
Lise Nakamura’s trip is long and complicated, and the Accounting
Department might find it a bit confusing. A timeline can help sort things out.
Paris Torino
London:
WatchfulCon
3 All Tinderbox date attributes record a moment in time, including the time of day. When people ask whether two dates are equal,
though, they most often want to know if they refer to the same calendar day, not the same second.
21
We begin by making an agent to gather all the City notes.
Agent:+All"Cities
+
Query:+$Prototype=="City""
+
Next, we’ll focus the view to focus only on the results of this agent. Select
All Cities and choose Focus View
from the View menu. Finally,
choose Timeline from the View
menu. We see a simple timeline of
the cities visited in the course of this
trip.
To return to the outline view, choose
Outline from the View menu and
then click on Sandbox in the
breadcrumb bar to expand the view
to the Sandbox container.
Only slightly more work is required to locate expenses for meals that aren’t
tagged with a particular meal.
Agent:""
No"Meal"
Query:""
$Prototype=="Expense""&"$Tags.contains("meal")"
&"!($Tags.contains("breakfast")|"$Tags.contains("lunch")"|"
$Tags.contains("dinner")")"
The “!” operator is the “not” operator: if what follows it is true, is returns
false.
23
Counting Notes
The first agent we created in the Sandbox container collected every Expense
in the document.
Agent:"All"Expenses
Query:"$Prototype=="Expense""
When applied to strings like $Name, the “+” operator joins two strings
together. Thus, Tinderbox starts with the note’s $Name, appends a colon,
and then appends the number of children inside the agent.
Alternatively, we might write
DisplayExpression:"$ChildCount+""Expenses""
25
to label the agent “55 Expenses.”
Total Expense
Rather than reporting the number of expenses, we might be interested in the
cumulative total. Rather than change the agent All Expenses again, we’ll
define a new agent.
Agent:"Total
Query:"inside(/Sandbox/All"Expenses)
"
Display+Expression:"$Name+":""+sum(children,$Dollars)"
The query simply matches all notes that the agent named “All Expenses” has
found; this is a convenient shortcut that lets agents work together without
duplicating work.
The display expression adds up the value of $Dollars for all the agent’s
children, and appends the result to the agent’s name. This will display the
total as a number.
Total: 11955.3
Since we know the result is expressed in our local currency, we might format
it more suitably:
Display+Expression:"$Name+":""+sum(children,$Dollars).format("$")"
26
This takes the number
sum(children,$Dollars)"
The “$” argument to format means “format this number according to the
computer’s local currency formatting.” The result will look something like
this:
Total: $11,955.30
The currency symbol and conventions for punctuating currency are based on
the locale you choose in System Preferences: Language & Region.
This displays:
Dinners:
The min and max operators require a list of values. We can create a list using
the collect() function.
Display+Expression:"$Name+":""+collect(children,$Dollars)"
which displays:
Dinners: $20.80
Finally, we’ll add a dash and then find the largest dinner bill:
Display+Expression:"$Name+":""+"min(collect(children,$Dollars)).format("$")
+""–"""+"max(collect(children,$Dollars)).format("$")"
Summary Tables
In maps, when an agent has located some notes, we
typically see those notes inside the agent.
Sometimes, it’s more informative to list those notes
by name, perhaps appending some additional
columns of information we want to see. We can add
a summary table to any container or agent to do this.
For example, select the tab names Status and locate
the agent “missing tags”. This agent looks for any Expense reports that have
no tags; because every expense should have some category or explanation,
31
we’ll need to locate any unexplained expenses before submitting our report
to the Accounting Department.
We can inspect the agent’s query by selecting
it and opening the action inspector. The agent
looks through the entire document and finds
notes that use Expense as a prototype but that
have no tags.
The summary table is drawn in the agent’s
title bar below the agent’s name, provided
there’s sufficient space. To give us room to
display the table, select the agent and then
drag the top of the title bar upward, so the
title bar fills the agent.
Next, click on the Summary Table widget, marked
here with a blue arrow. Each column in the summary
table is listed in turn: here, we have only a single
column which lists the note’s name. We could add
additional columns here if we wished. Click
32
anywhere outside the Summary Table Properties popover to dismiss it.
As downloaded, the sample file has no
untagged expenses and so the summary
table is empty. Double-click the map
background to create a new note, name
it “test expense”, and use the note’s
prototype tab to select the Prototype
“Expense”. After a few seconds, the
note will appear in the summary table.
☞You may choose File ▸ Update Agents
Now to ask Tinderbox to update all
agents right away.
33
A Dashboard Note
The left-hand side of this dashboard has several notes that use the prototype
Dashboard for a distinctive appearance. The Dashboard prototype is located
in the Prototypes folder, and has the following properties:
Color: “3” (matching the background color)
BorderColor: transparent
34
BorderStyle: plain
Shadow: false
SubtitleSize: 75
SubtitleColor: green5
Using the Inspector to set all these parameters for each dashboard note
could be tedious, but prototypes lets notes inherit all these characteristics in
one step, and also let you modify the appearance of all dashboard notes by
changing the prototype.
This rule asks Tinderbox to locate the child count of another note — an
agent named “all expenses” inside a container named “Infrastructure” – and
then to store the result in this note’s subtitle.
5 The color “green” in this document has been defined as #5e8663 — a neutral gray-green.
35
Tinderbox constantly evaluates rules, running the rules for each note until it
reaches the end of the document and then starting over at the document’s
beginning6.
6A second kind of rule, called an Edict, is run less frequently than regular rules and is useful when the result of a rule will seldom
change.
36
This is very simple indeed — it takes the number “42” and stores it in
$Subtitle. Once the rule runs, this dummy value will appear in the dashboard.
(You may need to deselect the note to allow the screen to update.)
We’d like the subtitle to be formatted as currency.
Name:&total&cost
Rule:&$Subtitle=42.format("$")&
builds exactly this list, returning the $Path for each note that uses "Expense"
as its prototype. Next, we find the value of $City for each expense:
collect(find($Prototype="Expense"),&+$City)+
and, to wrap everything up, we get the size of the remaining list
collect(find($Prototype="Expense"),&&$City).unique.size+
Finally, we format the date and store the result in the dashboard
note’s subtitle.
Name:&start
Rule:&$StartDate=$StartDate(child(/Infrastructure/all&expenses));
$Subtitle=$StartDate.format("m/d")&
39
How long have we been away? Our start date is now conveniently available
as
$StarDate(/Status/start)&
so we can very easily write a note that reports how long we’ve
been away from the office.
Name:&days
Rule:&$Subtitle=days($StartDate(/Status/start),&$StartDate(/Status/end))
40
The action makes adds the tags “transportation” and “taxi” to the tags of
any expense the agent finds. Since $Tags is a set, duplicate tags are ignored;
if “taxi” or “transportation” – or both – have already been added, the action
leaves them untouched. But if one or both tags were forgotten, this agent
automatically adds them.
Currency Conversion
When we add an expense item, we write down the $Amount we paid and the
$Currency we used. In the US, the value of $Currency will be “$”, in the
42
UK, $Currency will be “£”, in the EU, “€”. Our company maintains
accounts in dollars, and Ms. Nakamura will want to be reimbursed in dollars;
naturally, we want to be clear and consistent in converting currency
Inside the Infrastructure container, you will find a container named
“currency conversion” that automates conversion of other currency into
dollars. The first agent, “$”, simply copies $Amount to $Dollars since no
conversion is needed:
Name:&
&&$
Query:&inside(/Infrastructure/all&expenses)&$Currency="$"
&
Action:& $Dollars=$Amount&
Similar agents convert Swiss Francs (CHF) and Israeli Shekels (ILS). We
never need to record more than one amount per transaction, and there is no
risk of an accidental mistake or inconsistency when applying conversion
rates.
3. If no $Currency has been specified, the note’s $Currency is set to the $Currency of its
parent. The currency of Boston is “$”, so expenses in Boston will use dollars unless you
specify otherwise.
4.If no $StartDate has been specified, the note’s $StartDate is set to the start date of the
previous sibling in that city.
Note that these are all initial assumptions, not hard and fast constraints. If
we want the note to be a summary, we can change the prototype from
“Expense” to “Summary”. If we want to specify a different date or use a
different currency, we are free to do so. By providing reasonable guesses,
Tinderbox saves time and avoid missing data.
7. Progress Bars
Inside the Expense Account container, we have three kinds of notes:
• Summaries provide narrative context for each day
It is clearly desirable to record each expense promptly, while the details are
fresh in our mind. Summaries are indispensable and mandatory, but these
always pose a problem. First, the traveller is frequently exhausted at the end
of the day, and the last thing he or she wants to do is to stay up writing a
narrative for the Accounting department. Second, the key elements from the
day’s activities might not always be immediately apparent, and a few day’s
perspective may help focus the summary on the most consequential matters.
Nevertheless, the summary is important and ought to be written while
matters remain fresh in our mind. One section of the Status dashboard keeps
track of summaries and draft summaries, reminding us of what has been
done and what remains to do.
48
Open the Status tab and scroll to the
upper right-hand section of the map
to find the Summaries dashboard.
At a glance, we see that we have
written six summaries, one of which
is very short. We have an additional
eighteen notes that use the prototype
“Draft Summary”. Fifteen have yet
to be written, and two more are very
brief.
If we go to the Expense Account tab,
we might change the prototype for
the April 24 summary back to Draft
Summary. Right-click the icon to
the left of the note title and select
Draft Summary from the menu of prototypes. Return to the Status tab; we
find that we have one fewer summary and one more draft. Go back to the
Expense Account tab and change the April 24 summary back to Summary;
the Status tab will return to its previous state.
49
Expected Progress
Next, select the note named “summaries” and open the Rule pane of the
Action Inspector.
Rule:&$Subtitle=find(Prototype="Summary").size&
The rule makes a list of all the summary notes in the document, recording the
size of that list in the note’s subtitle.
51
Next, switch to the note’s Plot
inspector. The plot pattern is “bar”
– a progress bar – and the
expression being plotted is simply
the $Subtitle just set in the note’s
rule.
The bar’s minimum value is 0. The
maximum is:
1+$Subtitle(/Status/days).toNumber&
Spotting Trouble
We might create Summary (or Draft Summary) notes as placeholders,
intending to come back later and flesh them out. The note “empty” finds
summaries with no text:
Rule:&$Subtitle=find(Prototype=="Summary"&&&$WordCount==0).size&
The notes “short” and “short drafts” identify summaries and drafts that are
very short – less than 100 words long.
Rule:&$Subtitle=find(Prototype="Summary"&&&$WordCount>0&&&$WordCount<100).size&
Setting A Target
It can be difficult to write summaries immediately, but too often we may
return from a long trip to find that we’ve postponed writing summaries for
53
days on end. This can leads to long evenings of tedium, forgotten details, and
unpleasant memos from the Accounting Department.
The number of draft summaries is a useful indicator that
paperwork is piling up. For this trip, we might attempt a
resolution to keep: we’ll try to keep the number of
unfinished drafts down to three or four.
The progress bar’s target is specified in the Plot Inspector, and may be a
constant number (here it’s “4”) or an expression. The marker is drawn using
the note’s $PlotColor, alternating with the contrasting color from the
progress bar.
Color Coding
Dashboards might want to call attention to problems. In the example above,
we have too many unfinished drafts: we resolved to aim for four drafts at a
time, and we currently have 18.
We can use a rule to change the appearance of notes that require attention.
For example, we could use this three-part rule (in which we’ve added some
extra space a line-breaks for clarity on the page):
54
$MyNumber=find(Prototype="Draft&Summary").size;
$Subtitle=$MyNumber;
if($MyNumber>4){$SubtitleColor="dark&bright&red"}&else&{$SubtitleColor=;}&
First, as before, we make a list of drafts, count them, and store the result in
$MyNumber. Next, we copy that result to the subtitle. And third, if the
result shows that we have more than four drafts, we set the subtitle color to
dark bright red; otherwise, the action
$SubtitleColor=;&
adds a warning symbol if far too many drafts have piled up.
55
Note that agents always have an AgentQuery, while regular notes have no
use for one, so locating notes with a query is a good way to locate agents7.
Next, select the “By Currency agent, open
the Appearance Inspector, and select the
Plot pane. Several settings merit noting.
• The pattern is “pie”, requesting a pie chart.
• Each child of the agent represents one
segment of the pie. In this case, each
currency agent represents one segment
• Expression can be any attribute or
combination of attributes we might wish to
analyze. Here, for each agent, we locate
all the children of the original agent and
sum their $Dollars values, giving us the
total expenditure in each currency.
• The background of the pie chart is drawn
7 Smart Adornments also have queries, but because agents never examine adornments that need not concern us here,
57
in Color “2’, and is opaque.
The pie chart legend is drawn to the
right of the chart, if space allows.
The colors used in the pie chart are
chosen in turn from a list of colors in
the note’s $PlotColorList; for this
note, the $PlotColorList is:
green;lighter&green;darker&
green;light&green;black;white;blue&
If you change the first color from green to red, the segment for $ will change
color.
power adapter
taxi
hotel Tel Aviv
maps Draft: Monday, 4 London->Tel
flight: Draft: Tuesday, 5 May
May dinner Aviv
Draft: hotel flight
Wednesday, 6
Dijon Zürich
May
Monday, 27 Tuesday,
April 28 train lunch
April Vienna
taxi to toy
dinner Draft: Thursday, 7 May pharmacy
Holmbrich Security:
breakfastretainer
(suppl)
coffee ontaxi
trainto hotel lunch
hotel Draft: Friday, 8
dinner hotel clinic May
taxi to Alliance
Against Marrakesh
Exploitation
Draft: Saturday, 9
May hotel lunch
near Como
Wednesday,lunch
29 April workout clothes
Ouarzazate Gothenburg
flowers hotel dinner dinner Draft: Monday, Draft:
11 MayWednesday, 13 May
breakfast
Torino
car rental
Draft: Tuesday, 12 May Stavanger
Draft: Thursday, 30 April Bar Z
Draft: Saturday, 16 flight
traffic fine return rentalflight
car to London May
flowers
flight Boston
lunch Draft: Sunday, 17 May taxi
9. Treemaps
61
The Treemap view is designed to display the structure of your Tinderbox
document in detail by using screen space efficiently. On my Macintosh, an
outline can only display about 25 notes at a time, but the treemap can easily
display more than 100 notes while showing how they are related.
To begin, select the rightmost tab named “Expense Account” in the sample
document. This opens a treemap view of the Expense Account container, just
as the leftmost tab opens an outline view of that container.
Each note appears in the treemap as a rectangle. If a note has children, its
interior is divided among its children. Those children, in turn, divide their
interior space among their children. This continues until we’ve drawn all the
notes, or until the notes become too small to see.
The area of each note is proportional to the number of descendants that not
contains. Within the parent rectangle, notes are arranged roughly in order,
right-to-left and top-to-bottom, though Tinderbox can move notes around to
help make sure everything fits.
62
As in other views, click on any note to select that note. Double-click a
container to focus the view on that container; or use the breadcrumb bar to
expand the view to the parent note’s container.
Weighted Treemaps
Initially, treemaps apply equal weight to
every note. We can instead tie the area of
each note to that note’s properties. For
example, we might make the areas of each
note proportional to the expense it records.
In the treemap tab, note the small “Info” button. Click that button to display
the the treemap popover.
The treemap expression can be any
numerical expression. If a note’s
result is zero or negative, that note is
omitted from the treemap;
otherwise, the note’s area will be
roughly proportional to the result and the sum of the results of the note’s
descendants.
63
Expense Account
Expense Account Boston
flight to Paris
London: WatchfulCon
Oyster Card
registration dinner hotel
theater
dinner
theater
Vienna
clinic Holmbrich Security: retainer hotel
dinner
evening dress
Marrakesh
hotel
Dijon Zürich
dinner hotel
Ouarzazate Stavanger
dinner car rental flight flight
near Como
Torino
traffic fine return rental car
Vienna
clinic Holmbrich Security: retainer hotel
Paris
dinner
evening dress
hotel
Marrakesh
hotel
Dijon Zürich
dinner hotel
Ouarzazate Stavanger
dinner car rental flight flight
near Como
Torino
traffic fine return rental car
theater
Color Coding
Tel Aviv
flight: London->Tel Aviv hotel flight
Marrakesh
hotel
dinner hotel
Ouarzazate Stavanger
dinner car rental flight flight
Torino
traffic fine return rental car
&
&&&&&&&if($Tags.contains(meal)){1}else{0}&
Expenses for meals will use the End Color; other expenses will use the Start
Color.
We might want to identify transactions that use various currencies. We can
use the same approach to color transactions in currencies other than dollars:
&
&&&&&&&if($Currency!="$"){1}else{0}&
65
Here, if $Currency is not “$” the treemap uses EndColor – light green –
while if the $Currency is “$” the item uses StartColor – off-white.
Perhaps we want distinct colors for transactions in dollars, euros, and in
other currencies. We could use nested if() statements to accomplish this:
if($Currency=="$"){0}else{if($Currency=="€"){0.5}&else&{1}}&
theater
Tel Aviv
Vienna
Paris
dinner
evening dress
hotel
Marrakesh
Dijon Zürich
dinner hotel
Ouarzazate Stavanger
dinner car rental flight flight
Torino
flowers hotel dinner
example:
"$:0;&£:0.33;&€:0.66;&default:1"&
$MyString(/Config/treemap).at($Currency)&