Hi All,

I'm building a goal tracker using two html elements: <progress> and <svg>, 
the brilliant "rpn" macro by Thomas Elmiger and a simple "DaysDiff" macro 
that I created myself (it returns the number of days elapsed from a given 
date).

The <svg> HTML element moves along the x axis and shows the completion rate 
(using the fields 'tracker_current_value' divided by 'tracker_target_value' 
multiplied by 520 [px] as "520" is the width that amounts to "100% 
completion"); the <svg> element moves in parallel to the <progress> element 
that is measuring the time that's elapsed:

The relevant snippets of code:

<svg><text x=<<ProgressMark>> y=16 fill="red">▼</text></svg>
<progress value=<<some value>> max=<<max value>>></progress>

The problem that I have is that the <svg> element will not accept the 
output value of the <<ProgressMark>> macro that I've defined ad-hoc in the 
tiddler in order to calculate the position of the <svg> element in this way:

\define Proportion()
<$macrocall $name="rpn" a=$(currentVal)$ b=$(targetVal)$ operation="/">
\end

\define ProgressMark()
<$macrocall $name="rpn" a=<<Proportion>> b=520 operation="*">
\end

<$set name=currentVal value={{!!tracker_current_value}}>
<$set name=targetVal value={{!!tracker_target_value}}>

<svg> does accept the value if it's entered as <<SomeMacro 12345>> but not 
when entered as <$macrocall...> or <<ProgressMark>> even though the 
<<ProgressMark>> returns the correct value when used outside of the <svg> 
element.

How can I process the result of the macro? Could I use <$wikify> perhaps? 
If so, how? I've looked around this group and could not find a satisfactory 
solution.

Thank you very much for any suggestions!

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/269ff843-b32f-4f42-8d23-6685c0b8a3b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to