Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
so, how to use the new "Ring Indicator" (Read 1232 times)
Desalegn
Full Member
*
Offline



Posts: 78
Norway
so, how to use the new "Ring Indicator"
Mar 23rd, 2016, 8:14am
 
TB 6.5 is out. One of the features I am excited about is the Ring Indicator. I am not sure if I understood its function thought, by reading the release notes. So, I want to know how one can use the feature to set a daily target of 2000 words note. †

The idea is to use it as the Goal feature of Ulysses, well explained here: http://www.agdaws.com/2015/12/reaching-your-writing-goals-with-ulysses/

it seems easy to put the Ring Indicators as a prototype to a note ($TotalWordCount) and then assign that prototype to every of my new notes I create every morning. The Ring then grows, according to the number of words written, as I scribe more words into the note. The Ring reaches at 360 degree as I accomplish my target.Grin
Even displaying the Ring as a badge: hmm, would make it heavenly.

is that possible?
Back to top
 
« Last Edit: Mar 23rd, 2016, 8:27am by Desalegn »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: so, how to use the new "Ring Indicator"
Reply #1 - Mar 23rd, 2016, 9:50am
 
An update to aTbRef is imminent, but here is how the ring plot works. †The pattern is set in $Pattern and is used only in map icons, including the title area of container/agent icons.

The basic settings look like this (value 60, min 0, max 100, target 40):



The degree of progress (value) is the light green segment, drawn in $PlotColor and centred on the 9-o'clock position of the ring. Note that the 'target' currently seems hard-wired to using black lines, it is entered on the same origin in as the progress bar.

In this image, the first note has been copied and the 4 inputs for ring() have been set via User Attributes - which may make it easier to make the plot dynamic. A display expression shows the $MyValue instead of the $Name and the title has been centred on the icon:



The other two examples show the plot can be used in shaped notes and that the progress colour can be changed. Note from the bottom example that the centring of the title depends on the shape.

Via a rule you could use action code to vary $PlotColor depending on the degree of completion. You could use different colours or vary the hue/brightness/saturation instead.

Here is the TBX file used to make the above, to help folk get started.

Back to top
 
« Last Edit: Mar 23rd, 2016, 9:52am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: so, how to use the new "Ring Indicator"
Reply #2 - Mar 23rd, 2016, 10:52am
 
If you'd like to display a progress indicator in the badge, you might use something like this for a rule, or perhaps an edict:

† if($WordCount>2000){$Badge="label green"} else {if($WordCount>1000) {$Badge="label yellow"} else {$Badge="label red"}}

For a quick-and-easy ring indicator, just compute the completion percentage. If weíre aiming for each day's note to run to 2000 words, then

     ring( ($WordCount/2000)*100 )

Back to top
 
 
WWW   IP Logged
Desalegn
Full Member
*
Offline



Posts: 78
Norway
Re: so, how to use the new "Ring Indicator"
Reply #3 - Mar 23rd, 2016, 1:47pm
 
Thank you guys. I now have made a note prototype to make a habit of writing every day.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: so, how to use the new "Ring Indicator"
Reply #4 - Mar 23rd, 2016, 2:13pm
 
I probably should add that if not stipulated, the optional max and min  default to 100 and 0 respectively. Thus if you just use ring(value) where the 'value' is an integer between 0 and 100 you'll be shown a percentage completion.Thus ring(75) equates to 75% progress. If you want to use the 'target' option you must also provide valid min and max arguments as well.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Desalegn
Full Member
*
Offline



Posts: 78
Norway
Re: so, how to use the new "Ring Indicator"
Reply #5 - Mar 24th, 2016, 10:49am
 
Based on your note, I made a slightly different arthematic because I don't want to worry about the Max and Min values. I made them dependent (calculable from) on the value of the Target. I also add another attribute called $progress:

so, I have Code:
$MyValue=$WordCount;
$MyMin=$MyTarget/5;
$MyMax=$MyTarget;
$progress=(($WordCount/$MyTarget)*100);
$DisplayExpression=$progress+"%"
 


as edict; and the following as rule:
Code:
if($progress>=80){$Badge="label green";$PlotColor=green} else
{if($progress>=50) {$Badge="label yellow";$PlotColor=yellow} else
 {$Badge="label red";$PlotColor=red}}
 



But, I still have some questions:
how do you make the map a diamond shape?

is it possible to use the if clause to use 5 colors. I want to have: orange, and blue in addition to the above 3 colors. †I tried to combine with the between command, but, no success.

how do you make the texts inside the note invisible at the map?
the Display Expression is becoming the file name of my note. why is that happening?

Back to top
 
« Last Edit: Mar 24th, 2016, 10:55am by Desalegn »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: so, how to use the new "Ring Indicator"
Reply #6 - Mar 24th, 2016, 11:24am
 
Re your code, I'd suggest - as best practice - that strings are always quoted. Thus, $PlotColor=green is better coded as $PlotColor="green".

The shape of a map icon is set in $Shape. The easiest way to set this is via the Interior sub-tab of the Inspector.

5 colours?  Use greater-than and less-than tests.  This works in v6.5.0 (except the badges cited for blue & orange don't exist):
Code:
if($progress>=80) {
	$Badge="label green";$PlotColor="green";
} else {
	if($progress < 80 & $progress >= 65) {
		$Badge="label blue";$PlotColor="blue";
	} else {
		if($progress < 65 & $progress >= 50) {
			$Badge="label yellow";$PlotColor="yellow";
		} else {
			if($progress < 50 & $progress >= 35) {
				$Badge="label orange";$PlotColor="orange";
			} else {
				$Badge="label red";$PlotColor="red"
			}
		}
	}
}; 


I've added lots of whitespace to clarify the nesting though it's not needed for actual use. Note the semi-colon after the last closing }. You only need that if other action code follows within the edict/rule/action. The semi-colon ensures the outer if(){}else{} (and its rested code) is all executed before moving onto the next discrete action code expression.

To hid the $Text, use $MapBodyTextSize of '1'.  (Apologies, in my demo file I'd used -1 - but it still seems to work as intended!).
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Desalegn
Full Member
*
Offline



Posts: 78
Norway
Re: so, how to use the new "Ring Indicator"
Reply #7 - Mar 24th, 2016, 12:05pm
 
Thank you Mark for the fast reply and understanding my questions. Worked great!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print