tiddly-gittly / tw-echarts Goto Github PK
View Code? Open in Web Editor NEWAn All-in-one Visualization Framework for TiddlyWiki5 based on ECharts
Home Page: https://tiddly-gittly.github.io/tw-echarts/
License: MIT License
An All-in-one Visualization Framework for TiddlyWiki5 based on ECharts
Home Page: https://tiddly-gittly.github.io/tw-echarts/
License: MIT License
我觉得一个热力图组件,需要用户传递两个参数,一个是日期。一个就是数值。
日期可以是各种形式,20231006或者2023-10-06都可以。数值就是条目里的数值。
然后这个应该是不需要浮动展示。因为一展示就容易影响注意力,感觉就跑偏了。
目前这个组件感觉什么地方出了问题,但说不上来。比如我只有八百来个条目,但统计则是显示成九百多个条目。感觉有什么计算错了。
其次是组件不能调整数值大小。
To restore the chart you have to close and reopen tiddler (see https://talk.tiddlywiki.org/t/echarts-bringing-amazing-visualization-tools-to-tiddlywiki/1944/11?u=mohammad)
Version 0.1.2 doesn't respect the $height parameter
</$reveal>
<$reveal type="match" state="$:/state/curChart" text="Profession_HPS_BoxPlot">
---
<div class="flex-row">
<div class="flex-col border">
!!Heals per Second Box Plot by Profession
<$echarts $text={{202301151239_HPS_Profession_Box_PlotChartData}} $height="800px" $theme="dark"/>
</div>
</div>
</$reveal>
Example chart.tid
202301151239_HPS_Profession_Box_PlotChartData.tid.txt
之前在论坛里看到一个旧版本的echarts,导入后热力图显示正常。
但是当前版本的echarts,CalendarHeatmap.js条目并没有选择application/javascript类型,CalendarHeatmapExample中引用的js条目$:/plugins/Gk0Wk/echarts/addons/oflg/CalendarHeatmap/CalendarHeatmap.js
也和插件包含的js条目/home/runner/work/tw-echarts/tw-echarts/plugins/Gk0Wk/echarts/addons/oflg/CalendarHeatmap/CalendarHeatmap.js
并不相同
手动替换js条目为旧版本文件后,依然不显示热力图
启发式就是写死的拍脑子想到的方法的意思。
我今天想到,在 tiddlerChanges 里,对于传来的变化了的条目,可以缓存前五次的最终结果,如果有的条目一直没导致实际变化,就把它记录为无关,之后就忽视来自它的变化
I tried these example echarts from this site -https://echarts.apache.org/examples/en/index.html
These three were not working. But many other examples were working in my wiki.
Any suggestions ?
boot.js:214 Uncaught TypeError: Cannot read properties of undefined (reading 'showLoading')
$tw.utils.error @ boot.js:214
/*
Display an error and exit
*/
$tw.utils.error = function(err) {
// Prepare the error message
var errHeading = ( $tw.language == undefined ? "Internal JavaScript Error" : $tw.language.getString("InternalJavaScriptError/Title") ),
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
// Log the error to the console
console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);
Uncaught TypeError: Cannot read properties of undefined (reading 'showLoading')
at EChartsWidget.generateOption (widget.js:277:26)
at EChartsWidget.makeRefresh (widget.js:365:12)
at eval (widget.js:375:12)
// 异步更新
EChartsWidget.prototype.generateOption = function () {
const that = this;
this.echartsInstance.showLoading(); // <---
new Promise(function (resolve) {
try {
if (that.text === undefined) {
if (!that.tiddlerTitle || !$tw.wiki.getTiddler(that.tiddlerTitle)) {
resolve();
return;
}
在更新完插件的时候弹出
ok,关于缩放显示标题的功能,echart图表缩放功能以及缩放事件处理:https://blog.csdn.net/z_dmsd/article/details/100049471
能否单独支持调试环境只有单个echarts插件, 使调试不受其他配置影响
In the sidebar TheBrain shows the missing exmp01
?
Is this intentional? If so how can I disable such parent? In Tiddlywiki standard this is not a node!
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/gh-pages.yml
actions/checkout v3
actions/setup-node v2-beta
actions/cache v3
peaceiris/actions-gh-pages v3
package.json
eslint 8.16.0
eslint-config-prettier 8.5.0
eslint-import-resolver-alias 1.1.2
eslint-plugin-autofix 1.1.0
eslint-plugin-html 6.2.0
eslint-plugin-node 11.1.0
eslint-plugin-prettier 4.0.0
eslint-plugin-react 7.30.0
eslint-plugin-react-hooks 4.5.0
eslint-plugin-security 1.5.0
eslint-plugin-security-node 1.1.1
eslint-plugin-typescript-sort-keys 2.1.0
eslint-plugin-unicorn 42.0.0
eslint-plugin-unused-imports 2.0.0
prettier 2.6.2
@types/echarts 4.9.15
cross-env 7.0.3
eslint-config-standard 17.0.0
eslint-plugin-import 2.26.0
eslint-plugin-n 15.2.0
eslint-plugin-promise 6.0.0
html-minifier-terser 6.1.0
tiddlywiki 5.2.2
tw5-typed 0.2.7
uglify-js 3.15.4
workbox-cli 6.5.3
tw-echarts/src/echarts/widget/index.ts
Line 130 in d67ea4f
这里使用 $:/info/darkmode 判断是不是更合适
主题是whitespace,漂亮的主题,不过经常出事。
事情是这样的,我发现有的时候滑动侧边栏,放置在sidebar的TheBrain会突然消失,不是和热力图一样的问题,它消失只剩下一小块白色空间,无论它正常的时候占多大面积,消失的白块大小是一样的。
我不知道这是为什么。
感谢每一个解答此问题的人,无论是否解决了这个问题。
I have 15,380 ChartData tiddlers that originally were type application/javascript
that I realized didn't need to be marked because they are static charts generated upstream in python. I was hoping to take advantage of my currently lazyload configuration and reduce the 100mb initial size back down to <10mb.
However, the widget <$echarts $text={{LazyLoadExampleOfTextData}}/>
doesn't appear to handle lazyloading of the tiddlers.
errors thrown:
TypeError: this.getAttribute(...) is null
TypeError: parent is undefined
Is there a way to handle lazyloading of the ChartData tiddlers to the $echart widget?
Uncaught TypeError: Cannot read properties of undefined (reading 'showLoading')
at EChartsWidget.generateOption ($:/plugins/Gk0Wk/echarts/widget.js:277:26)
at EChartsWidget.makeRefresh ($:/plugins/Gk0Wk/echarts/widget.js:365:12)
at eval ($:/plugins/Gk0Wk/echarts/widget.js:375:12)
主题为whitespace,插件安装比较多无法一次说清。
使用链接球没有问题,但键入热力图的代码点击完成显示一篇空白,空白和标准热力图大小相同。
在测试一些echart官网实例时也出现过此类问题。
我仿照核心模板写了一个自己的展示模板。
\whitespace trim
<section class="tc-story-river" role="main">
<section class="story-backdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/StoryTiddlerTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
<section class="story-frontdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
</section>
以上是核心里的源代码。我只是在故事河前面加上我定义的css,thebrain就失效了。
\whitespace trim
<section class="tabs-tc-story-river" role="main">
<section class="story-backdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/StoryTiddlerTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
<section class="story-frontdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
</section>
我把<section class="tc-story-river" role="main">
改成了<section class="tabs-tc-story-river" role="main">
,tabs-tc-story-river是我定义的。
@media only screen and (min-width: 767px)
.tabs-tc-story-river {
padding: 0px;
width: 100%;
max-width: 1200px;
}
thebrain中的代码如下。
<$echarts $tiddler="$:/plugins/Gk0Wk/echarts/addons/TheBrain.js" aliasField="caption" levels=1 focussedTiddler=<<currentTiddler>> $height="500px" $width="1000px" graphTitle="Graph" />
可以对changedTiddlers做一个 过滤, 比如排除 $:/ 或者 Draft of
开头的条目, 因为tw的状态条目变化的很频繁,几乎每一个操作 都会导致 $:/status/xxx 条目变化, 引起不必要的刷新
ps: 热力图数据稍微多, 会引起明显的卡顿
shouldUpdate: (_, changedTiddlers) => $tw.utils.count(changedTiddlers) > 0;
shouldUpdate: (_, changedTiddlers) => {
const filteredChangedTiddlers = Object.keys(changedTiddlers).filter(
title => !(title.startsWith('$:/') || title.startsWith('Draft of')),
);
return filteredChangedTiddlers.length ? true : false;
}
对于饼图这种有tooltip窗口的, 似乎第二次被它给挡住了, 单击事件都正常
Is there a way to create new edge types for the FocusMap? For example, I have a tiddler with the field "journal-keywords", which is a list separated by commas and spaces (i.e. the list can be generated by the following filter expression: [get[journal-keywords]split[, ]]). Can I display what keywords a tiddler has, using FocusMap?
TypeError: setting getter-only property "parentNode" [$:/boot/boot.js:8250:10](chrome://devtools/content/webconsole/$:/boot/boot.js)
error $:/boot/boot.js:8250
onerror $:/boot/boot.js:8277
Uncaught TypeError: setting getter-only property "parentNode"
appendChild $:/core/modules/utils/fakedom.js:126
insertBefore $:/core/modules/utils/fakedom.js:139
render $:/plugins/Gk0Wk/echarts/widget.js:57
renderChildren $:/core/modules/widgets/widget.js:443
render
这个 wiki 很牛的
默认高度 300px 太小了,但如果默认设大有可能在手机上太大了。应该像 Sidebar resizer 一样搞个可拖动的抓手。
On CPL, haven't updated to $:/plugins/Gk0Wk/focused-tiddler
I seem to have a conflict which I am unable to locate with TheBrain echarts plugin. When switching to dark theme the text is not automatically switching to dark theme property.
Any ideas appreciated. I have had no luck. Switching to $theme="dark" and "light" manually does work in the chart, but not "auto".
Thank you for this amazing plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.