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

feat: support round cap for polar bars #11393

Merged
merged 11 commits into from Oct 18, 2019
Merged

feat: support round cap for polar bars #11393

merged 11 commits into from Oct 18, 2019

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Oct 14, 2019

Fix #4856 .

image

Set roundCap to be true (default false) for polar bars will have this effect.

var option = {
    angleAxis: {
        max: 5
    },
    radiusAxis: {
        type: 'category',
        data: ['a', 'b', 'c'],
        z: 10
    },
    polar: {
    },
    series: [{
        type: 'bar',
        data: [1, 2, 3],
        coordinateSystem: 'polar',
        name: 'A',
        roundCap: true,
        color: 'rgba(200, 0, 0, 0.5)',
        itemStyle: {
            borderColor: 'red',
            borderWidth: 1
        }
    }],
    legend: {
        show: true,
        data: ['A']
    },
    tooltip: {
        show: true
    }
};

It may also help to provide an array as polar.radius to make rings more easily. Currently, this can be done with empty data in the inner side:

image

This will be improved in future PRs. I'll see if I can make it in this milestone. Please ignore this feature for now.

TODO:

  • feat: support polar.radius
  • feat: support bar background

@Ovilia
Copy link
Contributor Author

Ovilia commented Oct 15, 2019

Polar radius supports array now. b5e6ba7
image

src/coord/polar/polarCreator.js Outdated Show resolved Hide resolved
src/layout/barPolar.js Outdated Show resolved Hide resolved
src/util/graphic.js Outdated Show resolved Hide resolved
src/util/symbol.js Outdated Show resolved Hide resolved
Ovilia added a commit to ecomfe/zrender that referenced this pull request Oct 16, 2019
so that to support it for Sausage shape
defined in apache/echarts#11393
100pah
100pah approved these changes Oct 18, 2019
@maplness
Copy link

maplness commented Jan 3, 2020

Is there an offset property that allows those bars don't need to start from 0 point for all?

@gaoqiang19514
Copy link

gaoqiang19514 commented Apr 4, 2020

nice work!

@iaminvictus1993
Copy link

iaminvictus1993 commented Sep 2, 2020

mark,bar stack 做环形图倒角

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.

[feature] Support barBorderRadius on the polar bar chart
6 participants