Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ todo
*.asm

# Distribution files
/dist/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/dist should be uploaded when a new version release, so please revert this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recitfied in 1b15177

/esm
/echarts.all.js
/echarts.simple.js
Expand Down
20 changes: 18 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/util/decal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@ export function createOrUpdatePatternFromDecal(
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
}
// Add SVG background color support
else if (isSVG && decalOpt.backgroundColor) {
const bgRect: SVGVNode = {
tag: 'rect',
attrs: {
x: 0,
y: 0,
width: pSize.width,
height: pSize.height,
fill: decalOpt.backgroundColor
},
key: 'bg'
};
svgRoot.children.push(bgRect);
}

let ySum = 0;
for (let i = 0; i < dashArrayY.length; ++i) {
Expand Down
61 changes: 61 additions & 0 deletions test/decal_bg_svg_testing/bar-chart-decal-test.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions test/decal_bg_svg_testing/test-decal-svg.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.