Replies: 4 comments 7 replies
-
I've solved my parsing problem, but the issue of parameter handling is still a mystery. I'll stick with \define for now. |
Beta Was this translation helpful? Give feedback.
-
In ApexChart - Area Chart - Basic you use a lot of
The easier way would be to use the
|
Beta Was this translation helpful? Give feedback.
-
I would add the CodeMirror plugin with a basic configuration, which makes editing the code much easier, since CM allows tabs to be used for indentation. My basic code example would look as follows. IMO it's much easier to read for new users. And more advanced users who need more parameters would need to read the Apex docs. If they understand this doc they should be able to adapt the JSON structure accordingly.
Here's a ZIP with a configuration I would use. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your suggestions. I'm still new to this \function business. In some ways it looks better, but it does have the disadvantage of separating those instructions away from all the other chart options. A problem if the chart widget is in the middle of a pile of WikiText, but not a problem if it's a tiddler by itself and transcluded. Which is the "TiddlyWiki way" anyway. I'm sure CodeMirror is a nice plugin, but the charts plugin is big enough without recommending another relatively large plugin. I think a manual tidy of the JSON will help - I've just been smashing the copy-and-paste from the ApexCharts website then doing the minimal to make it JSON-friendly. I don't know how most people will want to use my plugin anyway. I suspect most won't go too far beyond minimal options changes and a data dictionary tiddler! I really don't know. The primary objective of re-implementing the ApexCharts demos is to stress-test my plugin. I still have a lot to do. |
Beta Was this translation helpful? Give feedback.
-
It appears recent TiddlyWiki changes are suggesting the use of procedures over macros. The tiddler linked below needs to parse text dates like "6-Sep-2022" into a Unix timestamp like "1662393600000". My \define macro works just how I'd like, but when I tried it as a procedure it doesn't work.
The second points of each list group are showing the working \define. The first two numbers should be the same and the difference between them is one is obtained via my preferred option of direct field transclusion {{!!released}}, while the second number is variable substitution, which I'd prefer to not do.
http://www.scss.com.au/family/andrew/tiddlywiki/#ApexChart%20Timeline%20Test%20JSON
The documentation indicates that double angle brackets are how parameters are used, but something clearly isn't working.
I spent over an hour last night on another issue trying various brackets, transclusions, macros before finally getting the magic incantation that worked. This has to be the most frustrating aspect of working with TiddlyWiki :-(
Beta Was this translation helpful? Give feedback.
All reactions