Skip to content

v8.0 #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

v8.0 #828

wants to merge 1 commit into from

Conversation

kingyue737
Copy link
Member

@kingyue737 kingyue737 commented Apr 21, 2025

All preparations for the upcoming v8.0 release will be carried out on the 8.0 branch https://github.com/ecomfe/vue-echarts/tree/8.0 , stay tuned!

Major changes

Checklist

  • Remove vue-demi and Vue 2 related code
  • Build type declarations from source code instead of maintaining a manual version at https://github.com/ecomfe/vue-echarts/blob/b7852ab6430084c54a8e1c0a05648748da94bc64/src/index.d.ts
  • Use Web Components without native class support detection:

    vue-echarts/src/wc.ts

    Lines 9 to 39 in b7852ab

    export function register(): boolean {
    if (registered != null) {
    return registered;
    }
    if (
    typeof HTMLElement === "undefined" ||
    typeof customElements === "undefined"
    ) {
    return (registered = false);
    }
    try {
    // Class definitions cannot be transpiled to ES5
    // so we are doing a little trick here to ensure
    // we are using native classes. As we use this as
    // a progressive enhancement, it will be fine even
    // if the browser doesn't support native classes.
    const reg = new Function(
    "tag",
    // Use esbuild repl to keep build process simple
    // https://esbuild.github.io/try/#dAAwLjIzLjAALS1taW5pZnkAY2xhc3MgRUNoYXJ0c0VsZW1lbnQgZXh0ZW5kcyBIVE1MRWxlbWVudCB7CiAgX19kaXNwb3NlID0gbnVsbDsKCiAgZGlzY29ubmVjdGVkQ2FsbGJhY2soKSB7CiAgICBpZiAodGhpcy5fX2Rpc3Bvc2UpIHsKICAgICAgdGhpcy5fX2Rpc3Bvc2UoKTsKICAgICAgdGhpcy5fX2Rpc3Bvc2UgPSBudWxsOwogICAgfQogIH0KfQoKaWYgKGN1c3RvbUVsZW1lbnRzLmdldCh0YWcpID09IG51bGwpIHsKICBjdXN0b21FbGVtZW50cy5kZWZpbmUodGFnLCBFQ2hhcnRzRWxlbWVudCk7Cn0K
    "class EChartsElement extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&(this.__dispose(),this.__dispose=null)}}customElements.get(tag)==null&&customElements.define(tag,EChartsElement);"
    );
    reg(TAG_NAME);
    } catch (e) {
    return (registered = false);
    }
    return (registered = true);
    }
  • Support component rendered tooltips
  • Support dynamic theme switching with setTheme (see [Feature] Add dynamic theme switching support apache/echarts#20705)
    ...and enable same feature for CSP/SSR build
  • [CodeGen] add Thumbnail Component (see [feat]: add thumbnails components apache/echarts#17471)
  • [CodeGen] add Chord Chart (see feat: Chord charts apache/echarts#20522)
  • [Demo] Switch to Vite?
  • [Chore] ESLint flat config
  • [Chore] Cleanup unused devDependencies(resize-detector, @rollup/plugin-node-resolve...)

Sorry, something went wrong.

@kingyue737 kingyue737 marked this pull request as draft April 21, 2025 10:23
@ecomfe ecomfe deleted a comment from vercel bot Apr 21, 2025
Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue-echarts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 5:38am

@Justineo
Copy link
Member

Thank you, @kingyue737! I’ve added a few items to the list that I had been thinking about for a while.

@kingyue737
Copy link
Member Author

I found a nice example for component-rendered tooltips:

https://github.com/meitan-li/sfc-tooltip-demo?tab=readme-ov-file#%E6%96%B9%E5%BC%8F%E4%BA%8C-%E4%BD%BF%E7%94%A8customelement

According to this guide, users can render custom elements inside tooltip.formatter pretty easily.
So it seems like there's no extra work needed on our end🤔.

@Justineo
Copy link
Member

Justineo commented Jun 5, 2025

So it seems like there's no extra work needed on our end🤔.

I still think it's better DX if we can have this built-in as slots, which makes things much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any plan to remove the dependency on vue-demi?
2 participants