[TW5] NEW plugin: tobibeer/sparkl for simple inline sparkline diagrams

447 views
Skip to first unread message

Tobias Beer

unread,
Jan 15, 2017, 12:35:44 PM1/15/17
to tiddl...@googlegroups.com
Hi everyone,

Dave asked whether there was a sparkline plugin for TW5 yet,
perhaps similar to how they were in TWC.

Hence I created and a new plugin called tobibeer/sparkl now released with version 0.5.0
starting from the above reference implementation, with a few enhancements.

Take a look at the sparkl widget syntax and examples.

Get it from:


Or via my plugin library:


Best wishes,

Tobias.

HansWobbe

unread,
Jan 15, 2017, 2:36:17 PM1/15/17
to TiddlyWiki
Nice !!  Thank you very much.  Your well designed plugins are one of the treats that keeps me reading this group.

Cheers,
Hans

Mat

unread,
Jan 15, 2017, 3:05:39 PM1/15/17
to TiddlyWiki
Zuper kool!!! Well done Tobias!

<:-)

Tobias Beer

unread,
Jan 16, 2017, 6:07:53 PM1/16/17
to TiddlyWiki
Hi everyone,

Thanks for the feedback Hans & Mat. ;-)

I published another little update version 0.5.1 of tobibeer/sparkl

Most of all, you can now render a dotted graph via as=dots.

To update, install from:

Release Notes v0.5.1
  • added link pattern via filter, similar to values
  • added as, as=dots & dot-size
  • slightly increased the default width
  • changed position computation to pixels, not em
    • browsers appear to inconsistently render the bar width when in em
Best wishes,

Tobias.

Penguinlay

unread,
Jan 16, 2017, 6:16:51 PM1/16/17
to TiddlyWiki
I tried dragging from your library but the plugin did not upgraded to the latest version. What should I do?

Tobias Beer

unread,
Jan 16, 2017, 6:22:08 PM1/16/17
to TiddlyWiki
Hi Penguinlay,

I tried dragging from your library but the plugin did not upgraded to the latest version. What should I do?

Usually you don't drag from the library, but rather click the (re)install button for the respective plugin when in the particular plugin library in the ControlPanel.

Best wishes,

Tobias. 

Penguinlay

unread,
Jan 16, 2017, 6:30:27 PM1/16/17
to TiddlyWiki
I am sorry for my inexperience. It is still listed as version 0.5.0. I uninstalled the whole library and all plugins but still the old version for that plugin. Maybe it doesn't work because my wiki is offline. I will try again later. Thank you for your plugins and your time! It is really helpful for my wiki math notebook.

Sincerely,

Penguinlay

Sylvain Naudin

unread,
Jan 18, 2017, 4:31:45 PM1/18/17
to TiddlyWiki
Hi Tobias,

Nice a good job as always :)

I was not looking for this small graph like Dave, but it seem it's quite close to this render, just have a classic bar graph.

What I was thinking, it's for example :
I have a country per tiddler, with some custom fields, for example average retirement age. And automatically, create a chart bar graph with filter country to see difference between them.

What do you think of this another plugin ?

Cheers,
Sylvain

Tobias Beer

unread,
Jan 19, 2017, 7:13:42 AM1/19/17
to TiddlyWiki
Hi Sylvain,

What do you think of this another plugin ?

Most likely, yes. With sparkl I have no aspirations to have it grow into a general purpose graphing plugin.
 
What I was thinking, it's for example :
I have a country per tiddler, with some custom fields, for example average retirement age. And automatically, create a chart bar graph with filter country to see difference between them.

So, if I get you right, what you would probably want are labels and scales.

Again, I think for this we should pursue a graph library implementation like D3, Raphaël, Google Charts, etc.. to yield something more with the capabilities of http://d3tw.tiddlyspot.com

Best wishes,

Tobias.

Chuck R.

unread,
Jan 19, 2017, 9:51:18 AM1/19/17
to tiddl...@googlegroups.com
So a sparkline graph is just a mini bar graph the height of a line of text?

Thanks Tobias.

Wow, those c3 graphs are impressive! Those make it easier to to a serious report on something science-y.

Pit.W.

unread,
May 4, 2017, 1:05:25 PM5/4/17
to tiddl...@googlegroups.com

From user to user (nothing spectacular), just:


The sparkl - plugin form #tobibeer offers an easy, elegant and high-impact possibility to visualize numerical values, producing diagrams.

I have found out, it is also highly customizable with great ease. And the little example below is imho afaik not causing any crashes, so the plugin seems to be resilient against my lack of competence.

I use the example to visualize size, mass, weight of cargo over a period of time.

The respected user might also want to have a look at https://ooktech.com/TiddlyWiki/BarChart/ , another plugin for visualiation, but with a different approach, brought to us by ooktech.

With many thanks to tobibeer, ooktech and the community

Pit


Example:

<table>
<tr style="vertical-align:top;">
<td colspan=7>
Value @@font-size:5em;
 <$sparkl
values="[[%title%]get{!!field}]"
titles="[has{!!field}sort[title]]"
width={{!!bar-width}}
link="yes"
margin={{!!bar-margin}}
min={{!!bar-min}}
as={{!!sparkle-as}}
default="0"
dot-size={{!!sparkle-dot-size}}
/>
@@
</td>
</tr>
<tr style="font-size:0.7em;">
<td>
</td>
<td>
Select field
<$select field="bar-width">
<option value="1px">1</option>
<option value="3px">3</option>
<option value="5px">5</option>
<option value="7px">7</option>
<option value="12px">12</option>
<option value="20px">20</option>
</$select>
</td>
<td>
Bar width <$select field="field">
<option value="weight">Weight</option>
<option value="mass">Mass</option>
<option value="volume">Volume</option>
</$select>
</td>
<td>
Bar margin<$select field="bar-margin">
<option value="1px">1</option>
<option value="3px">2</option>
<option value="5px">3</option>
<option value="7px">7</option>
<option value="12px">12</option>
</$select>
</td>
<td>
Min. scale:<$select field="bar-min">
<option value="50">50</option>
<option value="70">70</option>
<option value="80">80</option>
<option value="90">90</option>
<option value="100">100</option>
<option value="120">120</option>
<option value="130">130</option>
<option value="200">200</option>

</td>
<td>
As:<$select field="sparkle-as">
<option value="bars">bars</option>
<option value="dots">dots</option>
</$select>
</td>
<td>
As:<$select field="sparkle-dot-size">
<option value="1">1</option>
<option value="3">3</option>
<option value="5">5</option>
<option value="10">10</option>
</$select>
</td>
</tr>
</table>


Am 2017-01-15 um 18:35 schrieb Tobias Beer:
Hi everyone,

Dave asked whether there were a sparklines for TW5 yet,

perhaps similar to how they were in TWC.

Hence I created and a new plugin called tobibeer/sparkl now released with version 0.5.0
starting from the above reference implementation, with a few enhancements.

Take a look at the sparkl widget syntax and examples.

Get it from:


Or via my plugin library:


Best wishes,

Tobias.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/630b8e66-17cd-4bf6-8222-9706efb63c74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




Danielo Rodríguez

unread,
May 4, 2017, 3:40:41 PM5/4/17
to TiddlyWiki
May I am too stupid to understand it , but may you explain a bit the scope/target/usage scenwrios of this plugin ? It looks nice and we'll done, but I can't see the usage.

Thanks !

Dave Parker

unread,
Jul 2, 2020, 1:55:16 AM7/2/20
to TiddlyWiki
This is a little after the fact, but to answer the question I intend to use it to summarize data from previous tiddlers to catch trends at a glance.
Reply all
Reply to author
Forward
0 new messages