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

[Bug] WaterFall chart does not be rendered as expected #265

Closed
kkxxkk2019 opened this issue Jul 24, 2023 · 0 comments
Closed

[Bug] WaterFall chart does not be rendered as expected #265

kkxxkk2019 opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working high priority
Milestone

Comments

@kkxxkk2019
Copy link
Collaborator

Version

latest

Link to Minimal Reproduction

none

Steps to Reproduce

const spec = {
type: 'waterfall',
data: {
id: 'id0',
values: [
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Feb4', total: true, value: 45 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Feb11', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': -5 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Feb20', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Feb25', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': -2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Mar4', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Mar11', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Mar19', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': -2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Mar26', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 1 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Apr1', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 1 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Apr8', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 1 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Apr15', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Apr22', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': 1 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'Apr29', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': -2 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'May', '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb': -1 },
{ '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6': 'total', total: true }
]
},
legends: { visible: true, orient: 'bottom' },
xField: '2f19e6c4-96b5-42a4-8c4c-dd6a83db6ed6',
yField: '8fa59ff8-dd59-4c6f-95c0-4b4899cffccb',
stackLabel: {
valueType: 'absolute',
formatMethod: text => {
return text + '%';
}
},
seriesFieldName: {
total: '总计',
increase: '增加',
decrease: '减少'
},
total: {
type: 'field',
tagField: 'total',
valueField: 'value'
},
axes: [
{
orient: 'left',
range: { min: 30, max: 50 },
title: { visible: true, text: 'favorability' },
label: {
formatMethod: v => {
return v + '%';
}
}
},
{
orient: 'bottom',
label: { visible: true },
type: 'band',
paddingInner: 0.4,
title: { visible: true, text: 'date' }
}
]
};

Current Behavior

image

Expected Behavior

image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

No branches or pull requests

2 participants