I have written a variety of plugins to integrate charting libraries into TiddlyWiki. My latest discovery was a “pure CSS” table-to-chart library. I was impressed and made a TW plugin for it.
However, pure CSS doesn’t quite cut it - it needs a little JS help. What I need to do is run a little JS every time a tiddler is displayed or updated:
for (let e of document.querySelectorAll('.charts-css td')) {
let n = Number.parseFloat(e.textContent);
e.style[Number.isNan(n) ? 'removeProperty' : 'setProperty']('--value', n);
}
Does TiddlyWiki support such a thing?