We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
latest
none
const data = [ { value: 10, category: 'OneOneOneOneOne' }, { value: 9, category: 'Two' }, { value: 6, category: 'Three' }, { value: 5, category: 'Four' }, { value: 4, category: 'Five' }, { value: 3, category: 'Six' }, { value: 1, category: 'Seven' } ]; let totalValue = 0; data.forEach(obj => (totalValue += obj.value)); const map = {}; data.forEach(obj => { map[obj.category] = `${((obj.value / totalValue) * 100).toFixed(2)}%`; }); const spec = { type: 'pie', data: [ { id: 'pie', values: data } ], categoryField: 'category', valueField: 'value', legends: { visible: true, orient: 'right', data: items => { return items.map(item => { item.value = map[item.label]; return item; }); }, item: { width: '15%', value: { alignRight: true, style: { fill: '#333', fillOpacity: 0.8, fontSize: 10 }, state: { unselected: { fill: '#d8d8d8' } } } } } };
fix it
- OS: - Browser: - Framework:
No response
The text was updated successfully, but these errors were encountered:
fix(vrender-components): label shoud omit automaticly when label's wi…
197efae
…dth exceeds item's width, relate VisActor/VChart#505
kkxxkk2019
No branches or pull requests
Version
latest
Link to Minimal Reproduction
none
Steps to Reproduce
Current Behavior
Expected Behavior
fix it
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: