Skip to content

Commit

Permalink
Update and fix [#88] [#83]
Browse files Browse the repository at this point in the history
  • Loading branch information
Gk0Wk committed Sep 23, 2023
1 parent 04bfeff commit 4ca1209
Show file tree
Hide file tree
Showing 29 changed files with 427 additions and 144 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SourceIterator } from 'tiddlywiki';
import { IScriptAddon } from '../../scriptAddon';
import { IScriptAddon } from '../../../scriptAddon';
import * as ECharts from '$:/plugins/Gk0Wk/echarts/echarts.min.js';

const getFilterByDate = (date: string) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
title: $:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap.ts
type: application/javascript
module-type: echarts-component
caption: GitHubHeatMap
echarts.author: Gk0Wk(Sttot)
echarts.readme: {{$:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap-readme}}
Modern.TiddlyDev#IncludeSource: false
53 changes: 53 additions & 0 deletions src/echarts/addons/Gk0Wk/GitHubHeatMap/readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
title: $:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap-readme

<div style="max-width: 800px; height: 230px; margin: 0 auto; position: relative;">
<center style="font-size:20px; position: absolute; bottom: 28px; z-index: 1000; width: 100%; left: 0; right: 0; display: flex; align-items: center; justify-content: center;">
<$button
set="$:/state/heatmap!!year"
setTo={{{ [{$:/state/heatmap!!year}subtract[1]!match[-1]] ~[<now YYYY>subtract[1]] }}}
class="tc-btn-invisible tc-tiddlylink"

>
</$button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<$button
set="$:/state/heatmap!!year"
setTo={{{ [{$:/state/heatmap!!year}add[1]!match[1]] ~[<now YYYY>add[1]] }}}
class="tc-btn-invisible tc-tiddlylink"

>
</$button>
</center>
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap.js" $width="100%" $height="100%" year={{$:/state/heatmap!!year}} subfilter="[all[tiddlers]!is[shadow]!is[system]!field:calendarEntry[yes]]" />
</div>

Simple usage:

```html
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap.js" />
```

You can add switch buttons like this:

```html
<div style="max-width: 800px; height: 230px; margin: 0 auto; position: relative;">
<center style="font-size:20px; position: absolute; bottom: 28px; z-index: 1000; width: 100%; left: 0; right: 0; display: flex; align-items: center; justify-content: center;">
<$button
set="$:/state/heatmap!!year"
setTo={{{ [{$:/state/heatmap!!year}subtract[1]!match[-1]] ~[<now YYYY>subtract[1]] }}}
class="tc-btn-invisible tc-tiddlylink"

>
</$button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<$button
set="$:/state/heatmap!!year"
setTo={{{ [{$:/state/heatmap!!year}add[1]!match[1]] ~[<now YYYY>add[1]] }}}
class="tc-btn-invisible tc-tiddlylink"

>
</$button>
</center>
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/GitHubHeatMap.js" $width="100%" $height="100%" year={{$:/state/heatmap!!year}} subfilter="[all[tiddlers]!is[shadow]!is[system]!field:calendarEntry[yes]]" />
</div>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
title: $:/plugins/Gk0Wk/echarts/addons/PluginsSize
type: text/vnd.tiddlywiki
caption: PluginsSize
echarts.author: Gk0Wk(Sttot)
echarts.readme: {{$:/plugins/Gk0Wk/echarts/addons/PluginsSize-readme}}

`{
"tooltip": {
Expand Down
7 changes: 7 additions & 0 deletions src/echarts/addons/Gk0Wk/PluginsSize/readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/plugins/Gk0Wk/echarts/addons/PluginsSize-readme

Visualize plugins size:

```html
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/PluginsSize" />
```
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IScriptAddon } from '../../scriptAddon';
import type { IScriptAddon } from '../../../scriptAddon';

const getPlatteColor = (name: string) =>
$tw.wiki.renderText(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
title: $:/plugins/Gk0Wk/echarts/addons/TagCloud.ts
type: application/javascript
module-type: echarts-component
caption: TagCloud
echarts.author: Gk0Wk(Sttot)
echarts.readme: {{$:/plugins/Gk0Wk/echarts/addons/TagCloud-readme}}
Modern.TiddlyDev#IncludeSource: false
7 changes: 7 additions & 0 deletions src/echarts/addons/Gk0Wk/TagCloud/readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/plugins/Gk0Wk/echarts/addons/TagCloud-readme

```html
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/TagCloud.js" />
```

<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/TagCloud.js" />
Loading

0 comments on commit 4ca1209

Please sign in to comment.