-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
provide option to display totals on top of each bar #5375
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
base: master
Are you sure you want to change the base?
Changes from all commits
f99ee3b
9493050
0743a99
0883ffd
66852fb
db3d1d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,5 +51,19 @@ module.exports = { | |
'Sets the gap (in plot fraction) between bars of', | ||
'the same location coordinate.' | ||
].join(' ') | ||
} | ||
}, | ||
barshowtotal: { | ||
valType: 'boolean', | ||
dflt: false, | ||
role: 'style', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no longer |
||
editType: 'plot', | ||
description: 'Display the total value of each bar.' | ||
}, | ||
totaltemplate: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may want this attribute or a similar one to control hover. stackbartotal: {
texttemplate: ...,
hovertemplate: ...
} And there is no need for |
||
valType: 'string', | ||
dflt: '%{total}', | ||
role: 'style', | ||
wilhelmhb marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no longer |
||
editType: 'plot', | ||
description: 'Template to display the total value of each bar.' | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"data":[ | ||
{ | ||
"name":"Col1", | ||
"y":["-1","2","3","4","5"], | ||
"x":["1","2","3","4","5"], | ||
"type":"bar" | ||
}, | ||
{ | ||
"name":"Col2", | ||
"y":["2","3","4","-3","2"], | ||
"x":["1","2","3","4","5"], | ||
"type":"bar" | ||
}, | ||
{ | ||
"name":"Col3", | ||
"y":["5","4","3","-2","1"], | ||
"x":["1","2","3","4","5"], | ||
"type":"bar" | ||
}, | ||
{ | ||
"name":"Col4", | ||
"y":["-3","0","1","0","-3"], | ||
"x":["1","2","3","4","5"], | ||
"type":"bar" | ||
} | ||
], | ||
"layout":{ | ||
"height":400, | ||
"width":400, | ||
"barshowtotal": true, | ||
"barmode":"relative" | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.