Skip to content

depley/nicegui-custom-echarts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add custom echarts integration to nicegui

How to integrate Apache ECharts in NiceGUI, but slightly customized.
Based on the zauberzeug/nicegui discussion apache echart always renders twice, why? #4501.

Example illustrating the problem https://depley.github.io/nicegui-custom-echarts/

research

TL;DR:

  • just subclass ui.element and implement a corresponding Vue component
  • currently echarts is integrated mainly via nicegui/elements/echart.py, nicegui/elements/echart.js

how to

current implementation

let's go

  1. setup

    uv init
    uv add nicegui
  2. create new package custom_elements with 1:1 copies of the original echart integration (nicegui/elements/echart.py, nicegui/elements/echart.js)

    • src/custom_elements/my_echart.py
    • src/custom_elements/my_echart.js
  3. install new package editable

    uv pip install -e .
  4. code

    • edits at custom_elements each indicated in comments between SECTION .. !SECTION
    • create main.py to run it
  5. 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published