Re: [twdev] Re: How to navigate to ids within a tiddler? Or How to add refresh between two steps of a widget

2020-12-09 Thread ajarmund
Hi!

uplight-dev posted a nice way to catch anchor links 
 in story.js, and ids 
can easily added in heading.js 
,
 
so the problem I guess, as mentioned above, is making unique ids. I was 
wondering if it could be possible to generate ids in heading.js by keeping 
track of nested headings, say we have a tiddler called "tiddlertitle";

! Header1 <- id = tiddlertitle:Header1
!! Header2 <- id = tiddlertitle:Header1:Header2
!!! Header3 <- id = tiddlertitle:Header1:Header2:Header3
!! Header2b <- id = tiddlertitle:Header1:Header2b
!!! Header3 <- id = tiddlertitle:Header1:Header2b:Header3

Can the parser keep track of this, or will it be awfully complicated?

It wouldn't guarantee uniqueness, of course, but it could still be useful, 
especially if transclusions would be treated as "ordinary" tiddler content 
(inheriting the nesting from the transcluding tiddler). Is the structure of 
when/how different parts of the wiki/DOM is parsed documented anywhere?

Best,
Anders

torsdag 19. september 2019 kl. 10:48:21 UTC+2 skrev Riz:

> Hi Tony,
>
> Thanks for the reply. You are right, that would not have scaled well. 
> Plus, we have a solution. Possibly something we can expand upon too! See 
> above
>
> Sincerely,
> Riz
>
> On Thursday, 19 September 2019 13:33:38 UTC+5:30, TonyM wrote:
>>
>> Riz,
>>
>> I understand. This limitation is really because we have a dynamic HTML 
>> page here, and the HTML standards did not seem to predict how we can use it 
>> in tiddlywiki.
>>
>> One passing thought, what if select tiddlers not already in the "visible" 
>> story, could be display: none (as opposed to display: hidden) below the 
>> story and somehow displayed when an anchor to something in them is 
>> activated. This of course may not scale too well, but may work for a large 
>> number of cases. Come to think of it tiddlers are in memory anyway, perhaps 
>> its is not so silly.
>>
>> Tiddlers to be treated this way could be tagged as such, and those not in 
>> the current story are "display: None" and once opened and displayed are 
>> not. In some ways this would be an open tiddler cache and since present on 
>> the page should be fully addressable with anchors. This could also be used 
>> to activate on demand stylesheets.
>>
>> Regards
>> Tony
>>
>> On Thursday, September 19, 2019 at 3:40:20 PM UTC+10, Riz wrote:
>>>
>>> I am aware of that. However if I recall correctly, 
>>> 1. it only aids navigation if the link and id exists within same tiddler 
>>> or 
>>> will scroll to id if it is already present in storylist. 
>>> 2. Need to modify ids to fit its unconventional pattern. 
>>>
>>> You see, the code given in my original post already solved the issue of 
>>> scrolling to an id if it exists in the storylist, without having to 
>>> modify 
>>> ids in any manner. My issue was if the id is not present in the story 
>>> list, 
>>> it takes 2 clicks to achieve the navigation: first to bring tiddler to 
>>> storylist, second to scroll. 
>>>
>>> On 19 September 2019 11:02:41 AM TonyM  wrote: 
>>>
>>> > If it helps there is prior work on using anchors in tiddlywiki. It 
>>> relies 
>>> > on an unconventional use of ## 
>>> > 
>>> > Regards 
>>> > Tont 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to a topic in the 
>>> > Google Groups "TiddlyWikiDev" group. 
>>> > To unsubscribe from this topic, visit 
>>> > 
>>> https://groups.google.com/d/topic/tiddlywikidev/NcCXnZu-OJE/unsubscribe. 
>>>
>>> > To unsubscribe from this group and all its topics, send an email to 
>>> > tiddly...@googlegroups.com. 
>>> > To view this discussion on the web visit 
>>> > 
>>> https://groups.google.com/d/msgid/tiddlywikidev/7dd87c37-15ad-447d-8316-6db99459c52c%40googlegroups.com.
>>>  
>>>
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/8e7a0e06-8b8d-435e-8f32-419fb9e9f81bn%40googlegroups.com.


[twdev] Re: [TW5] Data Visualisation using SVG or Chartist.js

2019-08-26 Thread ajarmund
Very nice, Jed! I think easy-to-use data visualisation tools will increase 
the value of tiddlywiki for use in research and academia a lot!

Best,
Anders


søndag 25. august 2019 09.56.25 UTC+2 skrev Jed Carty følgende:
>
> I made some data visualisation plugins.
>
> https://ooktech.com/TiddlyWiki/BarChart/
> https://ooktech.com/TiddlyWiki/ScatterPlot/
> https://ooktech.com/jed/ExampleWikis/SnapSVG/
>
> I should have some examples using chart.js and p5.js around somewhere but 
> I have no idea where they are.
>
> I have been working with d3.js in my day job so there will probably be 
> some more d3 plugins at some point in the future.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/eecd630c-dcb4-4221-8dc7-34f2a5dcc811%40googlegroups.com.


[twdev] Re: [TW5] Data Visualisation using SVG or Chartist.js

2019-08-26 Thread ajarmund
Thank you! I updated the macro to have plot width and marker size as 
parameters as well. The hover effect should be customisable through the CSS 
stylesheet, but I guess the plugins by Jed will have more functionality

Best,
Anders


mandag 26. august 2019 11.09.44 UTC+2 skrev Mohammad følgende:
>
> Hi Anders,
>  This is wonderful! The feasibility was proved!
> It is good if one can customize the size the marker and have a better 
> hover effect.
>
> --Mohammad
>
> On Saturday, August 24, 2019 at 3:32:13 PM UTC+4:30, ajarmund wrote:
>>
>> And now 5.1.20 has been released with mathematical operators! I tried to 
>> make a simple macro using SVG: http://folk.ntnu.no/anderhja/plotdemo.html
>>
>> However, what is the best way to transclude a macro making a SVG in terms 
>> of scaling? I tried to make a tiddler calling the macro with type SVG for 
>> transclusion, but it didn't work, so maybe CSS is the way to go?
>>
>>
>> - Anders
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/cd64b82a-5e5b-4cee-a784-1adf04faeb85%40googlegroups.com.


[twdev] Re: [TW5] Data Visualisation using SVG or Chartist.js

2019-08-24 Thread ajarmund
And now 5.1.20 has been released with mathematical operators! I guess a 
simply SVG approach for plotting the data tiddler "data" (
{"10":0,"40":40,"70":100,"120":90}) can be
\define makePoints()
<$list filter="[[data]indexes[]]" variable="key" >
<$set name="xv" filter="[multiply[$(xs)$]]">
<$set name="xval" filter="[add[10]]">
<$set name="yv" filter="[[data]getindex]">
<$set name="yva" filter="[mulitply[$(ys)$]]">
<$set name="yval" filter="[[110]subtract]">
> cy=<> r="1.5"/>






\end

\define makePlot(xsc ysc)
<$set name="xs" filter="[[100]divide[$xsc$]]">
<$set name="ys" filter="[[100]divide[$ysc$]]">




<>




\end

with call <>

However, what is the best way to transclude such a macro in regard of 
scaling? I tried to make a tiddler calling the macro with type SVG but it 
didn't work, so maybe CSS is the way to go?


- Anders

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/70c17c90-4b26-4291-ae32-3aed26742dbe%40googlegroups.com.