Sheets: Spreadsheets and graphs

An updated version of the mathcell concept.

It allows an additional label which can be viewed in edit and results mode which can contain KaTeX.
The cell takes wiki text and my intention is to use with the formula plugin and the KaTeX plugin to make the input of equations a little less cumbersome than the .js equivalent.

Much back and forth with co-pilot, so any feedback welcome and I’ll wrap it up as a plugin.

Cheers

Updates:

Data is now automatically stored in the tiddler the cells are created in.
Data from other tiddlers fields can be used with the datatiddler atribute.
Inline mode now works.

It seems you fixed the troubles, with the formula plugin. – I did so too. Probably in a different way.

I am still testing the current examples on Evan’s homepage, to fix them, if broken. For me, the whole repository is a lot more aligned to TW development now.

Just to let you know.
-m

I don’t think it was the formula plugin that was the issue. I don’t get conflict on my other wikis which use it.

Looking at my plugins on that wiki I have a few eblaster plugins, which I grabbed way back when, had a poke at and then forgot about!

I think the cullprits are attribute-modules and modloader.

But I also have condition and timer.

Mod loader was a prerequisite for formula form memory. By its name I suspect we have new ways to allow the same. I suspect the formula plugin is leveraging a JavaScript project or library with the smart mushroom braces to facilitate.

Perhaps we can research how he approached this and look at incorporating an updated library?

I think it’s some of the demo stuff that needs the extra plugins.

See Formula Plugin Docs and scroll down a bit. The core functionality seems to be working without modloader.

You should be able to get the lot (minus the other plugins) by dragging the formula tab to a clean wiki.

That’s right - I did remove modloader and implemented attribute-modules in a different way. Not sure, yet if it works with v5.3.x too.

I did change it, in a more TW friendlier way. But it is still a patch. I am not sure yet, if we should keep it. More experiments needed.

That’s the good thing :slight_smile: But many examples broke, because of the syntax they used.


As I wrote, I do like the concept and the possibilities those plugins provide.

But, I did not use the plugins myself, because of the hacks they included. I did not decide yet. How I personally would like to handle it.

Final, maybe, update.

Labels can now be created in view mode. A setup button allows labels to be created in the same way as data can be entered. This allows easier creation and editing of more complicated data sets. Labels created this way are stored as label_cell name fields in the current tiddler.

For quick single cells the label=“” attribute can still be used.

sheetsinline is available to ensure that inline results adds no extra data, labels, cell names are included which would break up the flow of text.

A nice blue background has been added for editing data, a nice yellow for editing labels.

And finally: a nice centralised table can be made with a stylesheet option.

Sheets, now with Graphs.

Integrated jsxgraph .

Can produce line graph from points which can be manually entered or a pasted csv.
Can produce line graphs from formulas using TiddyForumula syntax.
Variables can be changed with sliders and the graph will update in real time.
Katex can be displayed of the formula. Variable values also updating in real time.

Graphs can be created using a nice little wizard, or individual procedures for graphs, sliders, katex, can be typed and tweaked.

New update:

Sheets now has three separate but related functions for displaying equations and graphs.

Sheets gives spreadsheet like behaviour with TW flexibility.

Graphs Allows formulas or CSV to be used to generate graphs.

Katex Calc Allows evaluation of maths and rendering in KaTeX, and can be used mid KaTeX markup.

Sheets now has a default display of 4dp but keeps the full decimal for calculation. Default can be overridden. This removes, mostly, the need to use round from the tiddlyformula plugin.

General tweaking.

Todo: Documentation.:slight_smile:

Changelog:

Graphs:

Graph formula fields use TiddlyFormula-style maths expression syntax, but without the outer (= =)delimiters. The graph widget adds those internally after substituting graph variables.

Graph variables use the form $(name)$.

graph_formula is used for numeric plotting.
graph_latex is used for KaTeX display.

Example:

graph_formula: $(m)$ * $(x)$ + $(c)$
graph_latex: y = $(m)$x + $(c)$

The procedure <<graphwizard>> calls a nice little tiddler which lets you choose your graph type, (currently point and formula, but more may be added). This allows easy entering of data and a tiddler name using <<formulacreate>> or <<pointcreate>>. Once the create button is pressed the graph and all data is created in one tiddler.

To edit <<formulaedit>> or <<pointedit>> can be used in the graph tiddler.

The formula graph produces up to three widgets. <<formulaslider>>, <<formulalegend>>, <<formulagraph>> to allow the components to be placed in the desired locations in text.

**KaTeX Calc:
**
!! KaTeX with embedded TiddlyFormula calculations

Use:

<<kc
KaTeX expression with ##calculation|format## markers>>

Examples:

<<kc 5+7-##sqrt(5)|3##>>

Displays

image

This can also be integrated into Sheets. It also accepts a range of basic calculations using KaTeX syntax.

Todo:

Integrate some more standard graph types.
Make a plugin

Any feedback welcome.

I really, really want to find time to play with this. It looks amazing!

153 days, 13 hours, 19 minutes until election day! But who’s counting?