Dave,

First thing I notice is 
val="{{||vasSumGraph}}"

The contents will be passed as a literal string. Use this instead.
val={{||vasSumGraph}}

When using macros or transclusions the delimiters they use such as `<<` and 
`{{` doubles as a way to delimit themselves. 
Additional delimiters just say you are passing a literal.

If in doubt calling any macro including your own, use the macrocall widget
<$macrocall $name=sparkl varname={{||vasSumGraph}}/> 
I do not see the macro sparkl defined so I guessed varname
Note the use of $name this keeps the possibility of using a "name" 
parameter in the macrocall.

Macrocall lets you pass parameters from various macros and transclusions 
including fields, tiddlers text references even from something constructed 
with triple curly braces.
{{{[all[current]addprefix[$:/namespace/]]}}

The short form of macrocall is basically limited to the following
<<macroname "firstparamvalue" namedparam:"Value for named param">>


Although inside a macro you can use $(varname)$ and $parmname$
So one macro calling another can say
<<macroname "$firstparam$" namedparam:"$namedparam$" 3rd-param:
"$(currentTiddler)$">>

I hope this quick briefing helps. It is all documented but takes time to 
bring this together in ones head.

Regards
TW Tones

On Thursday, July 2, 2020 at 3:06:13 PM UTC+10, Dave Parker wrote:
>
> Here I've tried several different ways to get a variable into Tobibeer's 
> Sparkl plugin (a TW5 version of the old TWC sparklines tiny graph thing)
>
> http://tobibeer.github.io/tw5-plugins/#sparkl
>
> Here's several attempts:
> \define sprk2(val)
> <$sparkl values="$val$"/> $val$ :: <$sparkl values="13 7 19 15"/>
> \end
>
> \define sprk()
> <$macrocall $name=sprk2 val="{{||vasSumGraph}}"/>
> \end
>
> ..<<sprk>>..
>
> 1) {{||vasSumGraph}} 
>
> 2) <<sparkl "{{||vasSumGraph}}">> 
>
> 3) <<sparkl "13 7 19 15">>
>
> 4) <$sparkl values="{{||vasSumGraph}}"/>
>
> 5) <$sparkl values="13 7 19 15"/>
>
> with the following results:
>
>
> You can see in the top one the $val$ successfully passes the info, and 
> when the real info is entered in to the widget directly that works too, but 
> when you put the $val$ into the widget it fails.
>
> I've looked for similar questions and suspect I have to maybe use "<$set" 
> somehow, but can't seem to figure it out.
>
> Any suggestions?
>
>
> Thanks,
> - Dave
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7a2c61bf-7fd9-4d69-8189-201046db0fd6o%40googlegroups.com.

Reply via email to