Hi Pmario,
well 
I am playing with D3 plugin examples 
<http://tiddlywiki.com/plugins/tiddlywiki/d3/>.

my idea was to create a tiddlers with Title and Text = city names and add 
field "size". I tagged these tiddlers with tag "Cities"

then I created a tiddler "*toJSON*" with macro as 
in $:/core/templates/exporters/JsonFile

\define renderContent()
<$text text=<<jsontiddlers filter:"[tag[Cities]]">>/>
\end
<<renderContent>>

then tried to use these tiddler "toJSON" as source for D3 macros as 
This is a demo of TiddlyWiki5 incorporating a plugin for the [[D3.js]] 
visualization library.

! Word Cloud

<$d3cloud data="*toJSON*" spiral={{$:/spiral}}/>

but it doesn't work because [[toJSON]] don't have "application/json". 

But then I manually copied [[toJSON]] content to tiddler [[toJSON2]] typed 
with "*application/json*" and put it into data="toJSON2" to $d3cloud - then 
it works ok and showed me Word Cloud.


пятница, 22 апреля 2016 г., 11:07:21 UTC+3 пользователь PMario написал:
>
> Hi Martian,
>
> JSON is specified here: http://www.json.org/ ... So transclusions will 
> never work with a tiddler type: application/json, since this would be 
> against the spec. 
>
> but 
>
> it should be possible to create a wikitext template, that lets you create 
> json tiddlers. similar to the existing TW export function.
>
> can you post simple example, how your JSON creator tiddler looks like?
>
> -mario
>

-- 
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/d404deba-4dc6-46ed-be29-665dbf97934d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to