{"_id":"@bndynet/icharts","_rev":"10-e01ada851852016dda2f5c8d7904512f","name":"@bndynet/icharts","dist-tags":{"latest":"6.3.0"},"versions":{"1.0.0":{"name":"@bndynet/icharts","version":"1.0.0","keywords":["typescript","library","sass","typescript library","UMD","ES5"],"author":{"name":"zb@bndy.net","email":"zb@bndy.net"},"license":"MIT","_id":"@bndynet/icharts@1.0.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"5cd77c98621aaa6bd927e71c7391dcd5bfb62746","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-1.0.0.tgz","fileCount":44,"integrity":"sha512-78AGR2mImxHi6A7G0oFaRvGa9jzvdKc78VCbNZqTR0eoACn+YCTvQP7THt3yaBwyB22lqzIEfzAG4/tdQ8Ssvw==","signatures":[{"sig":"MEUCIQCB8oXo4A3Z/q3JvrJvHgCgQX1TFUxIeccWNp5WtDAe2gIgDsn8BhNDh1qPpvl6P6ZrpyWy5YtFjaPNtUBkyL6Lf3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":477522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+nzPCRA9TVsSAnZWagAAzcAP/3PLqDZMk3F0qhnBLwPT\nhgXc2oaOYXNBeYYGvECciULXnc8he79WU7Fqdv4+GS5BXgT3ZIKzn8eNK0bD\nP5Z5LDzQhTaD8lvvQq11r91+0f4/CYj8KV/N85JFwwkstX2o29xav7osWBDZ\nGj3SNbbvhsohq3PozcRT2ES8iaY4wI6Akyb9HXz5R03lbYQXY4QW1VBMXaGg\nWJ2Trku8E+6G6oiSRZgc9NTUqVDuwer1m0wcyFf+bNGxkLpzFkMpeLTzOUsL\nlQhk0QtZFmQExKysnQH3rX49FqhJai6zBZ+AM6UAZeO+yIqXTkelpgclzYs2\nR8gFV37Dqcl7M3tqJ2yIw9vESakKb3OUl1C9DKeNJ2CIDcrOhJfkvcaIJqE8\nUzH/N5f2XqnCGqxCKDAjMQWKLdHPcRMx1b/XOjadtO5Trjrc8Xcj9bOaERu1\nivFsJtDUhXNhb6UW9/htpsyn1zIYJgxpJ31aEtz9HbkBYiJimkMY2Da8Ddhd\nq8YTMlxGUKi/7ZcRjhD4EYQ5zr2Y4CQOuMaAgH/5d2rkTChomgqCZIJNxnEl\n1qPm17R/I0orIRrrxDQHURMipqF5M0NMGvP3PdKmOQd7oLCzrYsGit/zPyO4\nP58ttpfZ7zs82NTNbKQM4GF/POqpsQElsgU4wBNcBw8HDoy3wm2Oh3zf1NF9\nO4qm\r\n=5CId\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/icharts.umd.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"types":"dist/types/index.d.ts","module":"dist/icharts.es5.js","gitHead":"334928ba98e2706df9cbf2cff72204bfdafa87c4","scripts":{"docs":"typedoc --theme ./node_modules/@bndynet/typedoc-default-themes/bin/default --out docs/api --mode file","init":"ts-node tools/init.ts","lint":"eslint ./src/**/*.ts","test":"jest --coverage","build":"tsc && rollup --config ./rollup.config.ts && npm run docs","start":"concurrently --kill-others \"npm run watch\" \"npm run site-serv\"","watch":"rollup --config ./rollup.config.ts -w","prebuild":"rimraf dist docs","precommit":"lint-staged","site-serv":"npm run docs && npm run test && lite-server","test:prod":"npm run lint && npm run test -- --no-cache","test:watch":"jest --coverage --watch","deploy-gh-pages":"npm run predeploy-gh-pages && ts-node tools/gh-pages-publish","report-coverage":"cat ./coverage/lcov.info | coveralls","semantic-release":"semantic-release","predeploy-gh-pages":"ts-node tools/gh-pages-prepare"},"_npmUser":{"name":"bndy","email":"zb@bndy.net"},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"6.14.8","description":"Chart library","directories":{},"lint-staged":{"{src,test}/**/*.ts":["organize-imports-cli","prettier --write","git add"]},"_nodeVersion":"12.20.0","dependencies":{"lodash-es":"^4.17.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0","husky":"^1.3.1","jsdom":"13.1.0","eslint":"^7.13.0","rimraf":"^2.6.2","rollup":"^0.67.0","postcss":"^7.0.14","ts-jest":"^24.1.0","ts-node":"^7.0.1","typedoc":"^0.19.2","prettier":"^2.1.2","coveralls":"^3.0.2","node-sass":"^5.0.0","babel-jest":"^23.6.0","typescript":"^4.0.5","@babel/core":"^7.2.2","@types/jest":"^23.3.12","@types/node":"^12.11.7","jest-config":"^23.6.0","lint-staged":"^8.1.0","lite-server":"^2.5.4","@bndynet/cli":"^1.2.0","autoprefixer":"^9.4.6","concurrently":"^5.0.0","jsdom-global":"^3.0.2","@types/echarts":"^4.9.2","@commitlint/cli":"^7.1.2","@types/lodash-es":"^4.17.3","babel-preset-env":"^1.7.0","semantic-release":"^17.2.2","rollup-plugin-json":"^3.1.0","rollup-plugin-sass":"^1.1.0","jest-transform-stub":"^1.0.0","rollup-plugin-babel":"^4.3.0","organize-imports-cli":"^0.8.0","rollup-plugin-terser":"^4.0.2","@semantic-release/git":"^9.0.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","rollup-plugin-commonjs":"^9.1.8","rollup-plugin-sourcemaps":"^0.4.2","@typescript-eslint/parser":"^4.7.0","awesome-typescript-loader":"^5.2.1","rollup-plugin-typescript2":"^0.18.1","rollup-plugin-node-resolve":"^3.4.0","@semantic-release/changelog":"^5.0.1","@bndynet/typedoc-default-themes":"^0.5.1","@typescript-eslint/eslint-plugin":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/icharts_1.0.0_1610251470690_0.5736922216279006","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@bndynet/icharts","version":"1.1.0","keywords":["typescript","library","sass","typescript library","UMD","ES5"],"author":{"name":"Bendy Zhang","email":"zb@bndy.net"},"license":"MIT","_id":"@bndynet/icharts@1.1.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"257e38314dc096a092bf1dc5679b8efc14559932","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-1.1.0.tgz","fileCount":71,"integrity":"sha512-Ocy8Tfw4Rv6qPEdhvhkQ2/pOOqcIzPV8aC5v8gpkk/SLApLcPUtai/zElF4dPWRh2TfQgqmbDZ99Udueebr7Ig==","signatures":[{"sig":"MEYCIQDOwGWmtq60ghjzfGBh1ApQIwQmZ6cnh6JBMdc+r+hsqAIhALB7GQiwlTUJYLiwa/CI8Wskw40JuFRTxcDEwBDXRqJx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7173164},"main":"dist/icharts.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"types":"dist/types/index.d.ts","module":"dist/icharts.js","gitHead":"725f7254a81fab207622d792b2f45418663c67c9","scripts":{"docs":"typedoc src/index.ts --out docs/api","init":"ts-node tools/init.ts","lint":"eslint ./src/**/*.ts","test":"jest --coverage","build":"rollup --config ./rollup.config.js --bundleConfigAsCjs && npm run docs","start":"concurrently --kill-others \"npm run watch\" \"npm run site-serv\"","watch":"rollup --config ./rollup.config.js -w  --bundleConfigAsCjs","prebuild":"rimraf dist docs","precommit":"lint-staged","site-serv":"lite-server","test:prod":"npm run lint && npm run test -- --no-cache","test:watch":"jest --coverage --watch","deploy-gh-pages":"npm run predeploy-gh-pages && ts-node tools/gh-pages-publish","report-coverage":"cat ./coverage/lcov.info | coveralls","semantic-release":"semantic-release","predeploy-gh-pages":"ts-node tools/gh-pages-prepare"},"_npmUser":{"name":"bndy","email":"zb@bndy.net"},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"10.8.2","description":"Chart library","directories":{},"lint-staged":{"{src,test}/**/*.ts":["organize-imports-cli","prettier --write","git add"]},"_nodeVersion":"20.18.1","dependencies":{"echarts":"^5.5.1","lodash-es":"^4.17.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","sass":"^1.77.8","husky":"^1.3.1","tslib":"^2.6.3","eslint":"^9.17.0","rimraf":"^6.0.1","rollup":"^4.19.1","globals":"^15.14.0","ts-jest":"^29.2.3","typedoc":"^0.27.6","prettier":"^3.3.3","@eslint/js":"^9.17.0","typescript":"^5.5.4","@types/jest":"^29.5.12","lint-staged":"^15.2.7","lite-server":"^2.6.1","@bndynet/cli":"^1.2.0","concurrently":"^8.2.2","@commitlint/cli":"^7.1.2","@types/lodash-es":"^4.17.12","semantic-release":"^24.0.0","typescript-eslint":"^8.19.0","rollup-plugin-scss":"^4.0.0","organize-imports-cli":"^0.10.0","@rollup/plugin-terser":"^0.4.4","@semantic-release/git":"^10.0.1","@rollup/plugin-replace":"^5.0.7","@semantic-release/exec":"^6.0.3","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3","@semantic-release/changelog":"^6.0.3","@bndynet/typedoc-default-themes":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/icharts_1.1.0_1736146538809_0.3806787046945803","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"@bndynet/icharts","version":"5.0.0","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@5.0.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"8fc23c0cc41a4d29ad11c67b4026beb2a64ff045","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-5.0.0.tgz","fileCount":10,"integrity":"sha512-FzoNAV7TaUQ0k3PrJmESOiqZ47pXKROTsSMKgOiHfajYq3CjWE4G74y59JCiAzCy5/NPnHtMafBPaZafLp206w==","signatures":[{"sig":"MEQCIC0qxEjDeIg37rpjuKf6pBdlW49eOJnxm/BGCdJGWby+AiACTE80giYbYLa9a1sEneNcEOaUKdpK/AZLP7SNqvoBrw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7634584},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"9b9b37bd7ed26670905d8b51920f29e5c37d8ae7","scripts":{"dev":"tsup --watch","demo":"npm run build && npx http-server . -o /demo/index.html -p 3210","lint":"eslint src","test":"vitest run","build":"tsup","start":"concurrently \"npm run dev\" \"npx http-server . -o /demo/index.html -p 3210\"","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"bndy","email":"zb@bndy.net"},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.9.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.14.0","dependencies":{"lit":"^3.3.1","echarts":"^5.6.0","@bndynet/color-hub":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/icharts_5.0.0_1775216352113_0.06833119821895561","host":"s3://npm-registry-packages-npm-production"}},"5.0.1":{"name":"@bndynet/icharts","version":"5.0.1","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@5.0.1","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"659209ed5fe7afc64ecbb8db1f63ea3063d42a96","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-5.0.1.tgz","fileCount":10,"integrity":"sha512-+qMVC3UJk99ZjFPBLVWHUUq8x7nQEC63uDw1EFVk60acddXv+TsiRAxqRY3b3gzcFagPywx1Aj3U8UOSejdY/g==","signatures":[{"sig":"MEUCIQCI6ewxuKXDn6qQ90K8Os+mF6afq9U6ImqHKVH5MI8QsQIgU9M/V5MkZLCtPW9r0HRlr0vZpswOuPJylAxHka8vMAQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@5.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7634644},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ce0f8ede2d5c20f0beefe12c220b44d52a14c754","scripts":{"dev":"tsup --watch","demo":"npm run build && npx http-server . -o /demo/index.html -p 3210","lint":"eslint src","test":"vitest run","build":"tsup","start":"concurrently \"npm run dev\" \"npx http-server . -o /demo/index.html -p 3210\"","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9cf92cc5-5fa8-4c9e-9f42-8a47b592f1b4"}},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.9.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.14.0","dependencies":{"lit":"^3.3.1","echarts":"^5.6.0","@bndynet/color-hub":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/icharts_5.0.1_1775220336643_0.0827760530290349","host":"s3://npm-registry-packages-npm-production"}},"6.0.0":{"name":"@bndynet/icharts","version":"6.0.0","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@6.0.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"3fb80b3425b26de4d02f94ac24ed714dc17b71d2","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-6.0.0.tgz","fileCount":10,"integrity":"sha512-6m27LPBoYGzA3gmLxQ811l0aR/7ixDRzmXLFYY1d+DyMuybF7fWa94u4WwkGqaNNBYSTrJHF34Y3Brxpzu47jg==","signatures":[{"sig":"MEUCIQCrx/8EhceUj2NMpSzUtar3qfMHgVwgkZSjvQdTluUw7AIgfDCg7DNxaWBvaa2h1Z7+icDJCxBi3riCOqHLEGodn+4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@6.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8316120},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"eb3287a48c01f39e0c82c70e69304c25d45965dc","scripts":{"dev":"tsup --watch","lint":"eslint src","site":"vite build --base=/icharts/","test":"vitest run","build":"tsup && npm run site","start":"vite","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:663bbfbd-f40f-4cf9-86f9-e23913cb2d0a"}},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.11.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.14.1","dependencies":{"lit":"^3.3.1","echarts":"^6.0.0","@bndynet/color-hub":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.32","tsup":"^8.5.0","vite":"^8.0.8","eslint":"^10.1.0","marked":"^18.0.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","vue-router":"^5.0.4","@types/node":"^25.6.0","concurrently":"^9.2.1","element-plus":"^2.13.6","highlight.js":"^11.11.1","typescript-eslint":"^8.58.0","@vitejs/plugin-vue":"^6.0.5","@vitest/coverage-v8":"^4.1.2","@element-plus/icons-vue":"^2.3.2","@fontsource-variable/inter":"^5.2.8"},"_npmOperationalInternal":{"tmp":"tmp/icharts_6.0.0_1775825907952_0.5333420245428804","host":"s3://npm-registry-packages-npm-production"}},"6.0.1":{"name":"@bndynet/icharts","version":"6.0.1","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@6.0.1","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"4da96e88e3b698eb72f9650bf371ede62d3ae55f","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-6.0.1.tgz","fileCount":18,"integrity":"sha512-2KOWK7kGkHxZfq/7k4eGLI5j47dI5/B1EfB8UvsO5FEYDWi0mbjfUni3V8wvDoQJyI7wVa+1o16OjAijkbpblw==","signatures":[{"sig":"MEUCIFjPIJZW/24GkBrLEMqILX8NYQdSug4fnAQeyiyB2u6XAiEApPe0xBbcnY9m/drwlUzYt52NEXd857d21AqH4Gfxhtk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@6.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11013984},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./core":{"types":"./dist/index-core.d.ts","import":"./dist/index-core.js","require":"./dist/index-core.cjs"}},"gitHead":"9d3de7e58121a625f6c999047a2b363a9b173f21","scripts":{"dev":"tsup --watch","lint":"eslint src","test":"vitest run","build":"tsup && cd site && npm i && npm run build","start":"cd site && npm i && npm run dev","typecheck":"tsc --noEmit","test:watch":"vitest","verify:ssr":"npx tsx scripts/verify-ssr.ts","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:663bbfbd-f40f-4cf9-86f9-e23913cb2d0a"}},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.13.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.16.0","dependencies":{"lit":"^3.3.1","echarts":"^6.0.0","@bndynet/vue-site":"^0.1.7","@bndynet/color-hub":"^0.1.0","@echarts-x/custom-word-cloud":"^1.0.1","@echarts-x/custom-liquid-fill":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","jsdom":"^29.1.1","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","@types/jsdom":"^28.0.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/icharts_6.0.1_1781267335546_0.36497836732033484","host":"s3://npm-registry-packages-npm-production"}},"6.1.0":{"name":"@bndynet/icharts","version":"6.1.0","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@6.1.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"4d7839c0e374c6f1d14aa4c28e6eb0245fe34bc2","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-6.1.0.tgz","fileCount":18,"integrity":"sha512-RvvQxvcxBBAYSQZ+Umf/lAktzL9XyIUnvURW6wmBWhxwDDZR/imNSXSQ/MsB6h4cmI5Hb2yWQD81EmaO5bplFA==","signatures":[{"sig":"MEYCIQCsxaGB/HhjiMcTG4cIsxu1S440NYKpu0Hh0vyA+XibDgIhANQwQFRVwbLsN8Bh2o7m1R0ql/7MwvjFlR+ANLJoY3ZX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@6.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11313744},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./core":{"types":"./dist/index-core.d.ts","import":"./dist/index-core.js","require":"./dist/index-core.cjs"}},"gitHead":"f12f0cd4d9f79700d82e1fd48f57f46fafac04bb","scripts":{"dev":"tsup --watch","lint":"eslint src","test":"vitest run","build":"tsup && cd site && npm i && npm run build","start":"cd site && npm i && npm run dev","typecheck":"tsc --noEmit","test:watch":"vitest","verify:ssr":"npx tsx scripts/verify-ssr.ts","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:663bbfbd-f40f-4cf9-86f9-e23913cb2d0a"}},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.17.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.19.0","dependencies":{"lit":"^3.3.1","echarts":"^6.0.0","@bndynet/vue-site":"^0.1.7","@bndynet/color-hub":"^0.1.0","@echarts-x/custom-word-cloud":"^1.0.1","@echarts-x/custom-liquid-fill":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","jsdom":"^29.1.1","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","@types/jsdom":"^28.0.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/icharts_6.1.0_1788013145920_0.427603271432603","host":"s3://npm-registry-packages-npm-production"}},"6.2.0":{"name":"@bndynet/icharts","version":"6.2.0","keywords":["echarts","chart","web-component","lit","visualization"],"author":{"name":"Bendy Zhang"},"license":"MIT","_id":"@bndynet/icharts@6.2.0","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"homepage":"https://github.com/bndynet/icharts#readme","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"05c2fa5b81d3686fc066fcb344f73be018c19dce","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-6.2.0.tgz","fileCount":18,"integrity":"sha512-Fqv3pUrkTZPuF3WMekVpN76GzPTB2WyuOKXSoc7gYRhWVlK4RuaCe/2PM+Z9ozi3N+sPHtF9d3nAilGKHKOYow==","signatures":[{"sig":"MEQCIGCNmIJoWwcJYrS+eKvRQwvO8HP9IVonjr8gTGkEP5nDAiB36Zss4lMetTb8Kv89UO5d8FB2Yk3w2uSpL9BSkP8q/w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@6.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11408050},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./core":{"types":"./dist/index-core.d.ts","import":"./dist/index-core.js","require":"./dist/index-core.cjs"}},"gitHead":"45eee49451eb3aa0685a432a9819be5f8f9b8bae","scripts":{"dev":"tsup --watch","lint":"eslint src","test":"vitest run","build":"tsup && cd site && npm i && npm run build","start":"cd site && npm i && npm run dev","typecheck":"tsc --noEmit","test:watch":"vitest","verify:ssr":"npx tsx scripts/verify-ssr.ts","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:663bbfbd-f40f-4cf9-86f9-e23913cb2d0a"}},"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.19.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"_nodeVersion":"24.20.0","dependencies":{"lit":"^3.3.1","echarts":"^6.0.0","@bndynet/vue-site":"^0.1.7","@bndynet/color-hub":"^0.1.0","@echarts-x/custom-word-cloud":"^1.0.1","@echarts-x/custom-liquid-fill":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","jsdom":"^29.1.1","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","@types/jsdom":"^28.0.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"tmp":"tmp/icharts_6.2.0_1788968548169_0.27549219599255603","host":"s3://npm-registry-packages-npm-production"}},"6.3.0":{"_id":"@bndynet/icharts@6.3.0","bugs":{"url":"https://github.com/bndynet/icharts/issues"},"dist":{"shasum":"a25f229010406b8001d5c2e4e2705d4fb4619906","tarball":"https://registry.npmjs.org/@bndynet/icharts/-/icharts-6.3.0.tgz","fileCount":18,"integrity":"sha512-39Ob3dYOynuoCqvo2nlorfqcva9bhJIeC+QSarOuwyZNce4M2HRXKTn0GkJOIwQ5UC0k5SuOLG0XXNi7SaycyA==","signatures":[{"sig":"MEYCIQDXcjRQWRsly4HHTRP82uqwZI2n8x3s4egnIr21aBoeWAIhAPp/xFkz2fL6VVPZooK/UrtY9a4hG2GLGut3AenfxsDP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDHm6aDR/CYlk4+JOQfdBTCrJZvlGKctRlmUBTDHhbt7AIgYmq7nuGynkrk7GI8GfDRd9vEYwXStQKl2I4p5I91X60="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bndynet%2ficharts@6.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11474471},"main":"dist/index.cjs","name":"@bndynet/icharts","type":"module","types":"dist/index.d.ts","author":{"name":"Bendy Zhang"},"module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./core":{"types":"./dist/index-core.d.ts","import":"./dist/index-core.js","require":"./dist/index-core.cjs"}},"gitHead":"18f635e4020418c061ca3a5f790372809d4a4c04","license":"MIT","scripts":{"dev":"tsup --watch","lint":"eslint src","test":"vitest run","build":"tsup && cd site && npm i && npm run build","start":"cd site && npm i && npm run dev","typecheck":"tsc --noEmit","test:watch":"vitest","verify:ssr":"npx tsx scripts/verify-ssr.ts","test:coverage":"vitest run --coverage"},"version":"6.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:663bbfbd-f40f-4cf9-86f9-e23913cb2d0a"}},"homepage":"https://github.com/bndynet/icharts#readme","keywords":["echarts","chart","web-component","lit","visualization"],"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"_npmVersion":"11.19.0","description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","directories":{},"maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"_nodeVersion":"24.20.0","dependencies":{"lit":"^3.3.1","echarts":"^6.0.0","@bndynet/vue-site":"^0.1.7","@bndynet/color-hub":"^0.1.0","@echarts-x/custom-word-cloud":"^1.0.1","@echarts-x/custom-liquid-fill":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","jsdom":"^29.1.1","eslint":"^10.1.0","vitest":"^4.1.2","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","@types/jsdom":"^28.0.3","concurrently":"^9.2.1","typescript-eslint":"^8.58.0","@vitest/coverage-v8":"^4.1.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/icharts_6.3.0_1789914233258_0.831281285412367"}}},"time":{"created":"2021-01-10T04:04:30.574Z","modified":"2026-09-20T14:23:53.952Z","1.0.0":"2021-01-10T04:04:30.912Z","1.1.0":"2025-01-06T06:55:39.047Z","5.0.0":"2026-04-03T11:39:12.370Z","5.0.1":"2026-04-03T12:45:36.834Z","6.0.0":"2026-04-10T12:58:28.228Z","6.0.1":"2026-06-12T12:28:55.765Z","6.1.0":"2026-08-29T14:19:06.152Z","6.2.0":"2026-09-09T15:42:28.389Z","6.3.0":"2026-09-20T14:23:53.422Z"},"bugs":{"url":"https://github.com/bndynet/icharts/issues"},"author":{"name":"Bendy Zhang"},"license":"MIT","homepage":"https://github.com/bndynet/icharts#readme","keywords":["echarts","chart","web-component","lit","visualization"],"repository":{"url":"git+https://github.com/bndynet/icharts.git","type":"git"},"description":"A simplified ECharts wrapper providing an <i-chart> web component and createChart() API","maintainers":[{"name":"bndy","email":"zb@bndy.net"}],"readme":"# @bndynet/icharts\n\nA lightweight charting library with a Web Component (`<i-chart>`) and a simple `createChart()` API.\n\n## Installation\n\n```bash\nnpm install @bndynet/icharts\n```\n\n---\n\n## Quick Start\n\n### Option 1 — Web Component (HTML)\n\n```html\n<script type=\"module\">\n  import '@bndynet/icharts';\n</script>\n\n<i-chart id=\"myChart\" type=\"line\" style=\"width: 600px; height: 400px;\"></i-chart>\n\n<script type=\"module\">\n  const chart = document.getElementById('myChart');\n  chart.data = {\n    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],\n    series: [\n      { name: 'Revenue', data: [120, 200, 150, 80, 270] },\n      { name: 'Cost',    data: [90,  170, 130, 60, 210] },\n    ],\n  };\n  chart.options = { title: 'Monthly Overview' };\n</script>\n```\n\n### Option 2 — JavaScript / TypeScript\n\n```ts\nimport { createChart } from '@bndynet/icharts';\n\nconst chart = createChart(\n  document.getElementById('app'),\n  'bar',\n  {\n    categories: ['Q1', 'Q2', 'Q3', 'Q4'],\n    series: [{ name: 'Sales', data: [300, 450, 280, 600] }],\n  },\n  { title: 'Quarterly Sales' }\n);\n\n// Update / resize later:\nchart.update(newData, newOptions);\nchart.resize();\n\n// Disposal is automatic — the chart releases itself the moment its\n// container leaves the DOM (e.g. when a Vue/React component unmounts).\n// Calling `chart.dispose()` explicitly is still supported and idempotent\n// for cases where you want to free resources eagerly.\nchart.dispose();\n```\n\n### Option 3 — CDN (no bundler)\n\n```html\n<script src=\"./node_modules/@bndynet/icharts/dist/index.global.js\"></script>\n\n<div id=\"chart\" style=\"width: 600px; height: 400px;\"></div>\n<script>\n  iCharts.createChart(document.getElementById('chart'), 'pie', [\n    { name: 'Chrome',  value: 65 },\n    { name: 'Firefox', value: 15 },\n    { name: 'Safari',  value: 12 },\n    { name: 'Edge',    value: 8  },\n  ]);\n</script>\n```\n\n### Option 4 — SSR / Server-Side Rendering (Next.js, Nuxt, Astro, SvelteKit, Vite SSR…)\n\nImport from the SSR-safe subpath `@bndynet/icharts/core` so the module\ngraph never touches the `<i-chart>` web component, Lit, or the\n`@echarts-x` plugin installers. There are two distinct SSR scenarios\nthis entry supports:\n\n#### 4a. Client-side chart, SSR-safe import (the common case)\n\nThe page is server-rendered to HTML, the chart is instantiated **on the\nclient** inside a lifecycle hook (`onMounted`, `useEffect`, `'use client'`\nboundary, …). The server import only needs to be safe to evaluate.\n\n```ts\n// SSR-safe: this import does not access `window` / `document` /\n// `customElements` and is safe to evaluate on the server.\nimport { createChart } from '@bndynet/icharts/core';\n\n// In client-only lifecycle code:\nonMounted(() => {\n  createChart(el.value, 'line', {\n    categories: ['Jan', 'Feb', 'Mar'],\n    series: [{ name: 'Sales', data: [10, 20, 30] }],\n  });\n});\n```\n\n#### 4b. Server-rendered chart image (no browser needed)\n\nGenerate a complete `<svg>...</svg>` document directly on the server —\ninline it into HTML, save it to disk, attach it to an email, or pipe it\nthrough `sharp` / `@resvg/resvg-js` to produce PNG. No DOM, no canvas,\nno headless browser required. Powered by ECharts 6's built-in SSR mode.\n\n```ts\nimport { renderChartToSVGString } from '@bndynet/icharts/core';\nimport { writeFileSync } from 'node:fs';\n\nconst svg = renderChartToSVGString(\n  'line',                                                              // chart type\n  {                                                                    // data\n    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],\n    series: [\n      { name: 'Revenue', data: [120, 200, 150, 80, 270] },\n      { name: 'Cost',    data: [90,  170, 130, 60, 210] },\n    ],\n  },\n  { width: 800, height: 400 },                                         // SSR options\n  { title: 'Quarterly Revenue', theme: 'default' },                    // chart options\n);\n\nwriteFileSync('chart.svg', svg);\n```\n\n`RenderChartToSVGStringOptions` controls the rendered viewport:\n\n| Field            | Required | Description                                                                                         |\n|------------------|----------|-----------------------------------------------------------------------------------------------------|\n| `width`          | yes      | Viewport width in px (used as the SVG coordinate system).                                           |\n| `height`         | yes      | Viewport height in px.                                                                              |\n| `locale`         | no       | ECharts locale (default `'EN'`).                                                                    |\n| `useViewBox`     | no       | `true` (default) → root `<svg>` carries `width` + `height` + `viewBox`. `false` → no `viewBox` (strictly fixed-size). |\n\nThe underlying ECharts instance is created and disposed entirely\ninside the function, so calling it in a hot request loop never leaks\nengine state.\n\nTo convert the SVG to PNG (for emails, social cards, server-side\nrasterization), use a standalone library — icharts deliberately stays\nSVG-only so SSR consumers don't pay for a native canvas dependency\nthey may not need:\n\n```ts\nimport { renderChartToSVGString } from '@bndynet/icharts/core';\nimport { Resvg } from '@resvg/resvg-js';\n\nconst svg = renderChartToSVGString(\n  'pie',\n  [{ name: 'Apple', value: 30 }, { name: 'Banana', value: 50 }, { name: 'Cherry', value: 20 }],\n  { width: 800, height: 500 },\n  { title: 'Fruit Mix', legend: { show: true, position: 'bottom' } },\n);\n\nconst png = new Resvg(svg).render().asPng();   // Buffer\n// or with sharp:\n//   const png = await sharp(Buffer.from(svg)).png().toBuffer();\n```\n\n**SSR-mode fallbacks** — a few canvas-based features degrade\ngracefully when no DOM / canvas is available:\n\n- Label-width measurement falls back to a `chars × 7px` estimate, so\n  race-chart `grid.right` headroom and tree label widths can drift by\n  1–2 px from browser output.\n- `ResizeObserver` is unavailable, so the pie adapter's resize-driven\n  pixel-perfect center / radius recompute is replaced by the static\n  percent fallback (still legible, slightly less centered).\n- ECharts' SVG renderer approximates text widths internally, so very\n  long labels can wrap differently than in the browser. Pad your\n  widths slightly if you depend on exact parity.\n\nThese trade-offs are intrinsic to the SSR contract; the library\ndocuments them but does not paper over them with hidden polyfills.\n\n#### Entry-point cheat sheet\n\n| Entry                              | Auto-loads `<i-chart>`                       | Auto-loads wordcloud + liquid-progress | Safe to import on the server | `renderChartToSVGString` |\n|------------------------------------|----------------------------------------------|----------------------------------------|------------------------------|--------------------------|\n| `@bndynet/icharts` (default)       | yes (no-op when `customElements` is absent)  | yes                                    | no — the `@echarts-x` plugins reference `window` / `document` at module load | yes (re-exported from /core) |\n| `@bndynet/icharts/core` (SSR)      | no                                           | no                                     | yes                          | yes                          |\n\nIf you import the default entry from a server bundle, keep the\nimport inside a client-only branch (Next.js `'use client'` files,\nNuxt `<client-only>` islands, dynamic `await import()` inside\n`onMounted`, …).\n\n#### Plugin-backed chart types under `/core` (`liquidprogress`, `wordcloud`)\n\nThe SSR-safe entry deliberately does NOT auto-register the\n`@echarts-x/*` plugins on import. Opt in per chart type:\n\n- **`liquidprogress` (server + client):** call the SSR-safe installer\n  once at boot. It hides the `echarts` and `@echarts-x/*` packages —\n  you stay on `@bndynet/icharts/core`-only imports.\n\n  ```ts\n  import { installLiquidProgress, renderChartToSVGString } from '@bndynet/icharts/core';\n\n  installLiquidProgress(); // idempotent — call once at boot or per request\n\n  const svg = renderChartToSVGString(\n    'liquidprogress',\n    { value: 0.65 },\n    { width: 400, height: 400 },\n    { title: 'CPU' },\n  );\n  ```\n\n  For the **client** path under `/core`, the same `installLiquidProgress()`\n  call works from a client-only branch (`onMounted`, `useEffect`, …).\n  Or simply pull in the main entry via dynamic import — that registers\n  liquidprogress + wordcloud both:\n\n  ```ts\n  await import('@bndynet/icharts');                          // both plugins\n  await import('@bndynet/icharts/dist/installers/index.js'); // narrower, same effect\n  ```\n\n- **`wordcloud` (browser-only):** the `@echarts-x/custom-word-cloud`\n  package requires a real `window` at module-load and a real `<canvas>`\n  with `addEventListener` at render-time — both fundamental browser\n  dependencies that `renderChartToSVGString` cannot fake. There is\n  intentionally no `installWordCloud()` helper. Render wordcloud only\n  on the client, via `createChart('wordcloud', …)` from the main\n  `@bndynet/icharts` entry (or from a client-only branch when using\n  `/core`).\n\n  If you genuinely need wordcloud as a server-rendered image, run\n  the chart in a real browser (Playwright / Puppeteer) and screenshot\n  it — there is no pure-Node path today.\n\n---\n\n## Chart Types\n\n| Type   | `type` value | Variants |\n|--------|-------------|----------|\n| Line   | `line`   | `default`, `spark`, `race` |\n| Bar    | `bar`    | `default`, `horizontal`, `spark`, `race` |\n| Area   | `area`   | `default`, `spark` |\n| Map    | `map`    | `default` |\n| Pie    | `pie`    | `default`, `doughnut`, `half-doughnut`, `nightingale` |\n| Gauge  | `gauge`  | `default`, `percentage` |\n| Liquid Progress | `liquidprogress` | `default` |\n| Sankey | `sankey` | `default`, `vertical` |\n| Chord  | `chord`  | `default` |\n| Radar  | `radar`  | `default`, `circle` |\n| Network | `network` | `default`, `circular` |\n| Tree   | `tree`   | `default` (use `direction` for layout orientation) |\n| Treemap | `treemap` | `default` |\n| Heatmap | `heatmap` | `default` |\n| Calendar Heatmap | `calendarheatmap` | `default` |\n| Word Cloud | `wordcloud` | `default`, `diamond`, `poster` |\n\n### Map resources (`type: 'map'`)\n\n`map` charts require a pre-registered map resource. Register your GeoJSON (or SVG map) once with `registerMap`, then reference it via `options.mapName`:\n\n```ts\nimport { registerMap, createChart } from '@bndynet/icharts';\n\n// `chinaGeoJson` can come from your own local file or a remote fetch.\nregisterMap('china', chinaGeoJson);\n\ncreateChart(el, 'map', [\n  { name: '北京市', value: 92 },\n  { name: '上海市', value: 88 },\n  { name: '广东省', value: 97 },\n  { name: '浙江省', value: 85 },\n], {\n  title: '中国区域评分',\n  mapName: 'china',\n  visualMap: { min: 60, max: 100 },\n});\n```\n\n---\n\n## Data Formats\n\nEach chart type expects a specific data shape. Full schemas, field notes, and chart-specific options live in [`docs/`](docs/) (one file per family).\n\n| Chart | Data type | Reference |\n|-------|-----------|-----------|\n| Line / Bar / Area | `XYData` (`LineData` / `BarData` / `AreaData`) | [docs/chart-xy.md](docs/chart-xy.md) |\n| Map | `MapData` | [docs/chart-map.md](docs/chart-map.md) |\n| Pie | `PieData` | [docs/chart-pie.md](docs/chart-pie.md) |\n| Word Cloud | `WordCloudData` | [docs/chart-wordcloud.md](docs/chart-wordcloud.md) |\n| Gauge | `GaugeData` | [docs/chart-gauge.md](docs/chart-gauge.md) |\n| Liquid Progress | `LiquidProgressData` | [docs/chart-liquidprogress.md](docs/chart-liquidprogress.md) |\n| Sankey | `SankeyData` | [docs/chart-sankey.md](docs/chart-sankey.md) |\n| Chord | `ChordData` | [docs/chart-chord.md](docs/chart-chord.md) |\n| Radar | `RadarData` | [docs/chart-radar.md](docs/chart-radar.md) |\n| Network | `NetworkData` | [docs/chart-network.md](docs/chart-network.md) |\n| Tree | `TreeData` | [docs/chart-tree.md](docs/chart-tree.md) |\n| Treemap | `TreemapData` | [docs/chart-treemap.md](docs/chart-treemap.md) |\n| Heatmap | `HeatmapData` | [docs/chart-heatmap.md](docs/chart-heatmap.md) |\n| Calendar Heatmap | `CalendarHeatmapData` | [docs/chart-calendar-heatmap.md](docs/chart-calendar-heatmap.md) |\n\n**Shared options** (theme, title, colors, tooltip, …): [docs/chart-options-common.md](docs/chart-options-common.md).\n\nRunnable demos for every variant live in the [demo site](site/) (`npm start`).\n\n---\n\n## Options Reference\n\nAll options fields are optional. Each chart type extends the base `ChartOptions`; line / bar / area also share `XYChartOptions`.\n\n| Chart type | Options interface | Extends | Reference |\n|------------|-------------------|---------|-----------|\n| `line` | `LineChartOptions` | `XYChartOptions` | [docs/chart-xy.md](docs/chart-xy.md) |\n| `bar` | `BarChartOptions` | `XYChartOptions` | [docs/chart-xy.md](docs/chart-xy.md) |\n| `area` | `AreaChartOptions` | `XYChartOptions` | [docs/chart-xy.md](docs/chart-xy.md) |\n| `map` | `MapChartOptions` | `ChartOptions` | [docs/chart-map.md](docs/chart-map.md) |\n| `pie` | `PieChartOptions` | `ChartOptions` | [docs/chart-pie.md](docs/chart-pie.md) |\n| `gauge` | `GaugeChartOptions` | `ChartOptions` | [docs/chart-gauge.md](docs/chart-gauge.md) |\n| `liquidprogress` | `LiquidProgressChartOptions` | `ChartOptions` | [docs/chart-liquidprogress.md](docs/chart-liquidprogress.md) |\n| `sankey` | `SankeyChartOptions` | `ChartOptions` | [docs/chart-sankey.md](docs/chart-sankey.md) |\n| `chord` | `ChordChartOptions` | `ChartOptions` | [docs/chart-chord.md](docs/chart-chord.md) |\n| `radar` | `RadarChartOptions` | `ChartOptions` | [docs/chart-radar.md](docs/chart-radar.md) |\n| `network` | `NetworkChartOptions` | `ChartOptions` | [docs/chart-network.md](docs/chart-network.md) |\n| `tree` | `TreeChartOptions` | `ChartOptions` | [docs/chart-tree.md](docs/chart-tree.md) |\n| `treemap` | `TreemapChartOptions` | `ChartOptions` | [docs/chart-treemap.md](docs/chart-treemap.md) |\n| `heatmap` | `HeatmapChartOptions` | `ChartOptions` | [docs/chart-heatmap.md](docs/chart-heatmap.md) |\n| `calendarheatmap` | `CalendarHeatmapChartOptions` | `ChartOptions` | [docs/chart-calendar-heatmap.md](docs/chart-calendar-heatmap.md) |\n| `wordcloud` | `WordCloudChartOptions` | `ChartOptions` | [docs/chart-wordcloud.md](docs/chart-wordcloud.md) |\n\n`createChart` accepts `AnyChartOptions` — a chart-specific literal type-checks without importing the subtype. For stricter validation, import the matching `XxxChartOptions` and annotate explicitly.\n\nCross-cutting fields (`theme`, `title`, `padding`, `colors`, `colorMap`, `labelFontSize`, `tooltip`, `echarts`): [docs/chart-options-common.md](docs/chart-options-common.md).\n\nInternal design notes: [docs/COLORS.md](docs/COLORS.md) (color pipeline), [docs/LAYOUT.md](docs/LAYOUT.md) (title + legend layout).\n\n---\n\n## Theming\n\nTwo built-in themes: `light` (default) and `dark`.\n\n### Custom Theme\n\n```ts\nimport { registerTheme } from '@bndynet/icharts';\n\nregisterTheme({\n  name: 'ocean',\n  colorMode: 'dark',           // inherit unspecified tokens from 'dark'\n  colors: {\n    background:  '#0c1a2e',\n    textPrimary: '#ccd6f6',\n  },\n  palette: ['#64ffda', '#00b4d8', '#48cae4'],\n});\n\ncreateChart(el, 'bar', data, { theme: 'ocean' });\n```\n\nCall `registerTheme` once at application start, before any charts are created.\n\n### Global Default Theme via `configure`\n\nYou can also set a library-level default theme through `configure`. When a chart does not specify `options.theme`, this configured theme will be used.\n\n```ts\nimport { configure } from '@bndynet/icharts';\n\nconfigure({\n  theme: {\n    name: 'ocean',\n    colorMode: 'dark',\n    colors: {\n      background: '#0c1a2e',\n      textPrimary: '#ccd6f6',\n    },\n    palette: ['#64ffda', '#00b4d8', '#48cae4'],\n  },\n});\n```\n\n`options.theme` still takes precedence over the global config for that specific chart.\n\n### Consistent Colors Across Charts\n\nWhen building dashboards with multiple charts, enable `consistentColors` so that the same name always gets the same color — regardless of which chart it appears in or how many series that chart has.\n\n```ts\nimport { configure } from '@bndynet/icharts';\n\nconfigure({ consistentColors: true });\n```\n\nWith this enabled, if \"Revenue\" is palette color #1 in a line chart, it will also be #1 in a pie chart, a bar chart, or any other chart on the page.\n\n**Pre-register specific name → color mappings (sticky pins):**\n\n```ts\nimport { setColorMap } from '@bndynet/icharts';\n\n// Apply to all themes\nsetColorMap({\n  'Revenue':  '#ff6384',\n  'Expenses': '#36a2eb',\n  'Profit':   '#4bc0c0',\n});\n\n// Apply only to the dark theme\nsetColorMap({ 'Revenue': '#ff8fab' }, 'dark');\n```\n\nPins set via `setColorMap` are **sticky**: they survive `switchTheme()` and\n`resetColorMap()`, so a single call at app startup is enough. The auto-\nassigned palette slots get wiped by SPA navigation, but your pinned colors\ndo not.\n\n**Between-page state — usually automatic:**\n\n`switchTheme(name)` now clears the target theme's auto-assigned color\nslots as part of the switch, so most SPA pages do not need to call\n`resetColorMap()` directly — mounting a page that calls\n`switchTheme(currentTheme)` automatically restarts palette consumption\nat index 0, while preserving any `setColorMap` pins.\n\n```ts\nimport { resetColorMap } from '@bndynet/icharts';\n\n// Use these only if a page doesn't call switchTheme on mount, or to wipe\n// state mid-page without changing theme:\nresetColorMap();          // every theme — auto entries cleared, pins kept\nresetColorMap('dark');    // single theme — auto entries cleared, pins kept\n```\n\nPer-chart `colors` and `colorMap` options always take highest priority regardless of the global setting.\n\n---\n\n## Global API\n\n| Function | Description |\n|----------|-------------|\n| `configure(opts)` | Set global options (e.g. `{ consistentColors: true }` or `{ theme: { name, colors, palette } }`) |\n| `switchTheme(name)` | Switch all charts to a registered theme |\n| `syncThemeWithElementAttribute(attribute, options?)` | Watch a DOM element attribute (default `<html>`) and switch all charts whenever it changes |\n| `registerTheme(config)` | Register a custom theme |\n| `setColorMap(map, themeName?)` | Pre-register name → color mappings (all themes or one) |\n| `resetColorMap(themeName?)` | Clear accumulated color assignments (all themes or one) |\n| `getSeriesColor(name)` | Get the assigned color (with hover/active/disabled states) for a name |\n| `getCurrentTheme()` | Get the active theme object |\n| `getThemeColors()` | Get the active theme's UI color tokens |\n| `registerAdapter(type, adapter)` | Register a custom chart type adapter (warns when shadowing a built-in type) |\n| `getAdapter(type)` | Look up the registered adapter for a type (or `undefined`) |\n| `hasAdapter(type)` | Whether an adapter is registered for `type` |\n| `listAdapters()` | Type strings of every registered adapter (built-in + custom) |\n| `unregisterAdapter(type)` | Remove a registered adapter; returns whether one existed |\n\n### Auto-sync theme from a DOM attribute\n\nWhen your site drives its theme through an attribute on a DOM element (the\ncommon `html[data-theme=\"dark\"]` pattern, or a `class=\"dark\"` toggle), call\n`syncThemeWithElementAttribute` once at app start — the library keeps every\nlive chart in sync as the attribute changes:\n\n```ts\nimport { syncThemeWithElementAttribute } from '@bndynet/icharts';\n\nconst stop = syncThemeWithElementAttribute('data-theme');\n\n// Attribute value is not a theme name? Map it:\nconst stop2 = syncThemeWithElementAttribute('data-color-mode', {\n  resolve: (value) => (value === 'dark' ? 'dark' : 'light'),\n});\n\n// Watch <body> instead of <html>:\nconst stop3 = syncThemeWithElementAttribute('class', {\n  target: document.body,\n  resolve: (value) => (value?.includes('dark') ? 'dark' : 'light'),\n});\n\n// On unmount, disconnect the observer:\nstop();\n```\n\nNotes:\n\n- The current attribute value is applied **immediately** on start, so charts\n  created earlier (and the first paint) already match the document state.\n- The switch only fires when the resolved name differs from the active theme.\n- The resolved name must be a registered theme (`light` / `dark` built-in, or\n  one added via `registerTheme`).\n- Browser-only: in SSR / non-DOM environments it returns a no-op stop handle\n  instead of throwing, so it is safe to call from client entry code.\n\n---\n\n## Instance API\n\n`createChart()` returns an instance with these methods:\n\n| Method | Description |\n|--------|-------------|\n| `update(data?, options?)` | Re-render with new data / options |\n| `setTheme(name)` | Switch to a registered theme without re-creating the instance |\n| `resize()` | Trigger resize (e.g. after container size change) |\n| `dispose()` | Destroy the chart and free memory. Called automatically when the container leaves the DOM (idempotent — safe to call again). |\n| `getEChartsInstance()` | Access the underlying ECharts instance |\n| `highlight(target)` | Put data into the highlight (emphasis) state. `target` is a name string (shorthand for `{ name }`, matches across all series) or `{ name?, seriesName?, seriesIndex?, dataIndex? }`. Pair with `unhighlight` — see [Cross-chart linkage](#cross-chart-linkage). |\n| `unhighlight(target?)` | Clear a highlight (the counterpart to `highlight`; wraps ECharts' `downplay`). Call with no argument to clear every highlight on the chart. |\n\n---\n\n## Events\n\nListen for clicks and hovers with typed `options.events` handlers — no need to\nreach into the raw ECharts instance. Each handler receives a normalized\n`ChartEventContext` whose `data` reuses the **same item/edge shape** that\n`tooltip.customHtml` gets:\n\n```ts\ncreateChart(el, 'pie', data, {\n  events: {\n    onClick: (ctx) => {\n      // ctx.type === 'click'\n      if (ctx.data?.kind === 'item') {\n        console.log('clicked slice', ctx.data.name, ctx.data.value, ctx.data.color);\n      }\n    },\n    onMouseOver: (ctx) => {\n      /* ctx.data?.kind: 'item' (slice / node / word) | 'edge' (link) | undefined */\n    },\n  },\n});\n```\n\n`ChartEventContext`:\n\n```ts\ninterface ChartEventContext {\n  type: 'click' | 'dblclick' | 'mouseover' | 'mouseout';\n  data?: TooltipContextItem | TooltipContextEdge; // narrow with data.kind\n  componentType?: string; // 'series' | 'markPoint' | 'title' | …\n  seriesType?: string;    // 'line' | 'pie' | 'sankey' | …\n  seriesIndex?: number;\n  raw: unknown;           // raw ECharts params — escape hatch\n}\n```\n\n- A click on a pie slice / sankey node / word-cloud word → `data.kind === 'item'`;\n  on a sankey / chord / network link → `data.kind === 'edge'`. There is no\n  `'axis'` event kind (ECharts clicks always hit a single data item).\n- `data` is `undefined` when the hit wasn't on a series item (legend, title,\n  empty canvas) — fall back to `componentType` / `raw`.\n- Handlers stay in sync across `update({ events })` (no stacked listeners) and\n  are detached on `dispose()`. A throwing handler is swallowed so it can't\n  break ECharts' event dispatch.\n- For events not covered (`legendselectchanged`, `datazoom`, …) use\n  `getEChartsInstance().on(...)` directly.\n\n### Cross-chart linkage\n\nCombine the hover handlers with the instance's `highlight()` / `unhighlight()`\nmethods to link charts that share names — hovering one chart emphasizes the\nmatching data everywhere:\n\n```ts\nconst charts = [revenueLine, revenuePie, revenueRadar];\n\nconst link = {\n  onMouseOver: (ctx) => {\n    if (ctx.data?.kind !== 'item') return;\n    for (const c of charts) c.highlight(ctx.data.name); // string → { name }\n  },\n  onMouseOut: () => {\n    for (const c of charts) c.unhighlight(); // no target → clear all\n  },\n};\n\ncreateChart(lineEl, 'line', data, { events: link });\ncreateChart(pieEl, 'pie', data, { events: link });\ncreateChart(radarEl, 'radar', data, { events: link });\n```\n\n- `highlight(name)` matches every same-named item across all series; pass\n  `{ seriesIndex, dataIndex }` for finer targeting.\n- `unhighlight()` is the counterpart to `highlight` (it wraps ECharts'\n  `downplay` action) — always pair hover-in `highlight` with hover-out\n  `unhighlight`, otherwise the emphasis state lingers.\n- Both are no-ops after `dispose()`.\n\n> **Make the highlight pop.** By itself `highlight()` only emphasizes the\n> target, which is subtle on a busy multi-series chart. Set\n> `emphasis: { blurOthers: true }` (a base `ChartOptions` field) to additionally\n> **fade every other item** so the focused one clearly stands out. It applies\n> to real hover and `highlight()` alike, and is honored by line / area / bar /\n> pie / radar (graph charts already blur via adjacency). Tune the fade with\n> `emphasis.blurOpacity` (0–1, default `0.12`).\n>\n> ```ts\n> createChart(el, 'line', data, {\n>   emphasis: { blurOthers: true },        // fade the other lines on hover/highlight\n>   events: { onMouseOver: (ctx) => { /* … */ } },\n> });\n> ```\n\n---\n\n## Type-safe by chart type\n\n`createChart` infers `data` and `options` from the `type` argument, so a\nmismatch is a **compile-time** error (not a runtime throw) and editors offer\naccurate completions for the chart you picked:\n\n```ts\n// ✅ data is narrowed to PieData, options to PieChartOptions\ncreateChart(el, 'pie', [{ name: 'A', value: 1 }], { variant: 'doughnut' });\n\n// ❌ compile error — XYData is not assignable to PieData\ncreateChart(el, 'pie', { categories: [], series: [] });\n```\n\nPassing a dynamic `string` type still works and falls back to the broad\n`ChartData` / `AnyChartOptions` unions. The same inference applies to\n`chart.update(data, options)`.\n\n---\n\n## Extensibility\n\nCustom chart types can be registered via `registerAdapter`. Each adapter implements a `validate` guard and a `resolve` function that returns a full ECharts option object.\n\n```ts\nimport { registerAdapter, createChart, type ChartAdapter } from '@bndynet/icharts';\n\ninterface ScatterPoint { x: number; y: number }\n\nconst scatterAdapter: ChartAdapter = {\n  validate(data) {\n    return Array.isArray(data) && data.every((d) => 'x' in d && 'y' in d);\n  },\n  resolve(data) {\n    const points = data as ScatterPoint[];\n    return {\n      option: {\n        xAxis: { type: 'value' },\n        yAxis: { type: 'value' },\n        series: [{ type: 'scatter', data: points.map((d) => [d.x, d.y]) }],\n      },\n    };\n  },\n};\n\nregisterAdapter('scatter', scatterAdapter);\n\ncreateChart(el, 'scatter', [{ x: 1, y: 2 }, { x: 3, y: 5 }]);\n```\n\n### Making a custom type first-class (no `as` casts)\n\nFold your type into `ChartTypeRegistry` via declaration merging and the\ncustom `type` gets the same inference as a built-in — `createChart('scatter', …)`\nwill type-check `data` as your shape with full editor completions:\n\n```ts\ndeclare module '@bndynet/icharts' {\n  interface ChartTypeRegistry {\n    scatter: { data: ScatterPoint[]; options: ChartOptions };\n  }\n}\n\n// data is now inferred as ScatterPoint[] — no cast in the adapter or call site\ncreateChart(el, 'scatter', [{ x: 1, y: 2 }]);\n```\n\n### Adapter capabilities\n\nThe object returned by `resolve` and the adapter itself support a few optional hooks:\n\n| Field | On | Purpose |\n|-------|----|---------|\n| `onInit(instance)` | resolve result | Runs after the first `setOption` — attach event listeners, read canvas dimensions, etc. |\n| `notMerge` | resolve result | Forwarded to ECharts `setOption(option, notMerge)`. Default `true` (full replace); set `false` to let ECharts animate transitions across successive `update()` calls. |\n| `mergeData(prev, next)` | adapter | Fold the next `update()` data into the previous frame instead of replacing it — lets a live chart accept a partial patch (e.g. gauge `update({ value })` carries `max` / `label` forward). The engine only calls it when both frames pass `validate`. |\n| `clearOnThemeChange` | adapter | When `true`, the engine clears the instance before repainting on `setTheme()` — needed by custom-series renderers (e.g. wordcloud) that leave stale marks during diff/merge. |\n\n**`onInit` cleanup.** If `onInit` wires a `ResizeObserver`, event listener, or\ntimer, return a teardown function. The engine runs it before the next render's\n`onInit` and once more on `dispose()` — so you never leak observers and never\nhave to poll `isDisposed()`:\n\n```ts\nconst adapter: ChartAdapter = {\n  validate: (d) => Array.isArray(d),\n  resolve: (data) => ({\n    option: buildOption(data),\n    onInit: (chart) => {\n      const ro = new ResizeObserver(() => chart.resize());\n      ro.observe(chart.getDom());\n      return () => ro.disconnect(); // engine calls this on re-render + dispose\n    },\n  }),\n};\n```\n\n### Registry introspection\n\n`getAdapter(type)` / `hasAdapter(type)` / `listAdapters()` / `unregisterAdapter(type)`\nlet you inspect and manage the registry — branch before calling `createChart`,\nbuild a type picker, or swap an adapter during hot-reload. Re-registering a\n**built-in** type logs a `console.warn` (the override still applies); use a\ndistinct type string for custom charts to avoid the warning.\n\n> For the full runtime model — the `_apply` render loop, the `onInit` teardown\n> lifecycle, the engine-vs-adapter boundary, and how to add per-type behavior\n> without touching the engine — see the design guide in\n> [`docs/LIFECYCLE.md`](docs/LIFECYCLE.md).\n\n---\n\n## Development\n\n```bash\nnpm install\nnpm run dev        # Watch mode\nnpm run build      # Build all formats\nnpm run typecheck  # Type check\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}