Skip to content
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

[Feature] add borderRadius option to heatmap #16493

Merged
merged 14 commits into from
Feb 15, 2022

Conversation

Rain120
Copy link
Contributor

@Rain120 Rain120 commented Feb 11, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Enhance the border radius for the heatmap, for more info plz go to issue.

View

Before

image

After

image

Also, you can use it in the Calendar Heatmap.

image

How to use it

borderRadius: number || number[]

more info plz go to zrender.Rect opts.shape.r

option = {
    series: {
        // ...
        itemStyle: {
            // borderRadius: 10,
            borderRadius: [10, 20, 30, 40],
        }
    }
}

Also, you can custom set it by data from each item.

var data = [
    {
        itemStyle: {
            borderRadius: [10, 20],
        },
        value: [0, 0, 5]
    },
    {
        itemStyle: {
            borderRadius: [30, 40],
        },
        value: [1, 1, 7]
    }
]

option = {
    // ...
    series: [{
        // ...
        data,
        // ...
    }]
}

Misc

Related test cases or examples to use the new APIs

Please refer to /test/heatmap-borderRadius.html

@echarts-bot
Copy link

echarts-bot bot commented Feb 11, 2022

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
test/heatmap-calendar.html Outdated Show resolved Hide resolved
test/heatmap-border-radius.html Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
test/heatmap-geo.html Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/chart/heatmap/HeatmapSeries.ts Outdated Show resolved Hide resolved
@pissang pissang added this to the 5.3.1 milestone Feb 15, 2022
@pissang pissang merged commit 66290cc into apache:master Feb 15, 2022
@echarts-bot
Copy link

echarts-bot bot commented Feb 15, 2022

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

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

Successfully merging this pull request may close these issues.

3 participants