Thank you very much for your help. As you gathered I am rather new to
TiddlyWiki but I am getting there and enjoying it!

The clue I was looking for was the use of the store object. That
achieves my need and your code works perfectly.

Thanks again.

Michel

On Sep 23, 1:20 pm, Eric Shulman <[email protected]> wrote:
> > As can be seen, there are three separate sections: html, the macro and
> > the script. How can I assign the output of the macro to the var
> > myvalues in the script part.
> > I think I am thinking about this the wrong way, but I am unclear on
> > how to think differently.  :)
>
> First, rather than using HTML syntax, you can simplify the creation of
> the 'target' element by using TiddlyWiki native "CSS class wrapper"
> wiki syntax to define a span with the desired classname for the script
> output.  Next, instead of using <<forEachTiddler>> to construct the
> list of values followed by a separate <script> block to render them to
> the target element, you could gather the values AND output the desired
> content in ONE combined script, without using <<forEachTiddler>> at
> all.
>
> Something like this:
>
> -------------
> Sparkline with dynamic data: {{dynamicsparkline{Loading...}}}
> <script>
> var myvalues=[];
> var tids=store.getTaggedTiddlers('journal');
> for (var i=0; i<tids.length; i++)
>    myvalues.push(tids[i].data('tramadol'));
> var mystyles={ height: '300px', width: '300px', spotRadius: '5' };
> jQuery('.dynamicsparkline').sparkline(myvalues, mystyles);
> </script>
> -------------
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to