Giter VIP home page Giter VIP logo

tw-echarts's Issues

Version 0.1.2 doesn't respect the $height parameter

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

image

Current Version:
image

Version 0.0.9:
image

thebrain视图需要在故事河中才能实现

我仿照核心模板写了一个自己的展示模板。

\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" />

TheBrain Shows Missing Parent

  • I have few tiddlers like this
  • exmp01/demo
  • exmp01/data
  • exmp01/remarks

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!

热力图不工作

主题为whitespace,插件安装比较多无法一次说清。

使用链接球没有问题,但键入热力图的代码点击完成显示一篇空白,空白和标准热力图大小相同。

在测试一些echart官网实例时也出现过此类问题。

setting getter-only property "parentNode"

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 很牛的

图片

tiddlywiki.html.zip

https://mostlai.github.io/HD-WIKI/

https://github.com/Mostlai/Hundred-days

拖动调整高度

默认高度 300px 太小了,但如果默认设大有可能在手机上太大了。应该像 Sidebar resizer 一样搞个可拖动的抓手。

启发式避免更新

启发式就是写死的拍脑子想到的方法的意思。

我今天想到,在 tiddlerChanges 里,对于传来的变化了的条目,可以缓存前五次的最终结果,如果有的条目一直没导致实际变化,就把它记录为无关,之后就忽视来自它的变化

修复 tiddly-gittly/tiddlywiki-calendar#39

ncaught TypeError: Cannot read properties of undefined (reading 'showLoading')

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;
          }

在更新完插件的时候弹出

How to create new edge types with FocusMap?

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?

Too much call to filterTiddlers cause lagging

It takes 2s to run on my 10k+ tiddlers

Because this will call filterTiddlers many times.

            return [yearDates.get(t).map(([e,t])=>{
                var r = $tw.wiki.filterTiddlers(getFilterByDate(t, a)).length;
                return n += r,
                [e, r]
            }

热力图选择性刷新优化

可以对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;
  }

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency workbox-cli to v6.5.4
  • chore(deps): update dependency eslint-plugin-promise to v6.1.1
  • chore(deps): update dependency html-minifier-terser to v7
  • fix(deps): update dependency eslint-plugin-html to v7
  • fix(deps): update dependency eslint-plugin-unicorn to v45
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gh-pages.yml
  • actions/checkout v3
  • actions/setup-node v2-beta
  • actions/cache v3
  • peaceiris/actions-gh-pages v3
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

Errors about Cannot read properties of undefined

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)

When upgrading plugins
截屏2022-09-25 04 44 35

热力图组件不够通用

我觉得一个热力图组件,需要用户传递两个参数,一个是日期。一个就是数值。

日期可以是各种形式,20231006或者2023-10-06都可以。数值就是条目里的数值。

然后这个应该是不需要浮动展示。因为一展示就容易影响注意力,感觉就跑偏了。

目前这个组件感觉什么地方出了问题,但说不上来。比如我只有八百来个条目,但统计则是显示成九百多个条目。感觉有什么计算错了。

其次是组件不能调整数值大小。

放置在侧边栏的TheBrain突然消失

主题是whitespace,漂亮的主题,不过经常出事。

事情是这样的,我发现有的时候滑动侧边栏,放置在sidebar的TheBrain会突然消失,不是和热力图一样的问题,它消失只剩下一小块白色空间,无论它正常的时候占多大面积,消失的白块大小是一样的。

我不知道这是为什么。

感谢每一个解答此问题的人,无论是否解决了这个问题。

TheBrain $theme not auto switching

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.

https://gavart.ist/

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.

something wrong with the CalendarHeatmap addons

之前在论坛里看到一个旧版本的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并不相同

image

手动替换js条目为旧版本文件后,依然不显示热力图

Can not show any charts

I tried the brain, CalendarHeatmapExample etc after installation and refresh, no charts displayed.
image

LazyLoad chartdata with <$echarts $text={{LazyLoadExampleOfTextData}}/>

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.