commit | 5b66d9346648121e3ae4d20667f9c88ab45c389a | [log] [tgz] |
---|---|---|
author | pissang <bm2736892@gmail.com> | Sun Jan 10 23:33:07 2021 +0800 |
committer | pissang <bm2736892@gmail.com> | Sun Jan 10 23:33:07 2021 +0800 |
tree | b3a7d6139daa358560107bf61991c5b495c2495c | |
parent | fba4f4ea29f5fa8ab0e19cd26448d540310278cb [diff] |
Error handling when failed to generate option in build-example
npm install
npm run dev
npm run release
It will copy all the build resources to incubator-echarts-website/next/examples
common/config.js
local=1
in URL. For example: editor.html?c=area-basic&local=1
npm run build:example
Only for default theme
node tool/build-example.js -t default
Run all the examples to test module importing, minimal bundling and DTS correctness.
Before run the tests. you need to update the examples.
npm run build:example
Then run the tests.
npm run test:e2e
If you want to test with esbuild bundler. Which is much faster.
npm run test:e2e:esbuild
If you want use the packages in your local folder which is still in developing. Please update the dir
path in test/config.js
for all packages first. Then run the script directly without --fetch
arg.
node e2e/main.js --bundler esbuild -m node e2e/main.js --bundler webpack -m
All test cases are in the public/data
folder. The comment in the header
/* title: Area Pieces titleCN: 折线图区域高亮 category: 'line, visualMap' */
describes the meta info of this example.
For example:
$.when( $.getScript(ROOT_PATH + '/data/asset/js/myTransform.js'), $.getScript('https://cdn.jsdelivr.net/npm/d3-contour@2.0.0/dist/d3-contour.jXs'), ).done(function () { // ... });
Use this code to enable controller panel for a example:
app.config = { aNameForTheSelectWidget: 'This is the initial value' aNameForTheRangeWidget: 45, aNameForTheButtonWidget: function () { // Do something. }, onChange: function () { // Do something. } }; app.configParameters = { aNameForTheSelectWidget: { options: [ 'This is the initial value', 'This is another value', 'This is the third value' ] }, aNameForTheRangeWidget: { min: -90, max: 90 } };
app.onresize = function () { // Do something. }
var width = myChart.getWidth(); var height = myChart.getHeight();