Skip to content

support template string on hover #3126

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

Merged
merged 53 commits into from
Nov 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4c197e8
rough first implementation for hovertemplate
antoinerg Oct 15, 2018
613c8f5
supply hover's eventData inot hovertemplate
antoinerg Oct 16, 2018
edf4795
delete unrelated file from branch
antoinerg Oct 17, 2018
dd62855
update description for hovertemplate
antoinerg Oct 17, 2018
a86327a
fix hovertemplate test not being run
antoinerg Oct 18, 2018
1fde3aa
for now, only offer hoverdata and trace objects to hovertemplate
antoinerg Oct 18, 2018
d263cce
templateString evaluates attributes with a dot in their name
antoinerg Oct 18, 2018
040208f
do not coerce hoverinfo if hovertemplate is defined
antoinerg Nov 5, 2018
3eaa3b9
replace templateString with the more specific hovertemplateString
antoinerg Nov 5, 2018
0084efb
hovertemplate: add warning if variable can't be found
antoinerg Nov 5, 2018
046d367
coerce hovertemplate at trace-level, starting with scatter(gl)
antoinerg Nov 6, 2018
59083ad
add <extra></extra> tag to hovertemplate for secondary labels
antoinerg Nov 6, 2018
266d43a
add URL to d3-format documentation
antoinerg Nov 6, 2018
108b68a
initial hovertemplate support for pie
antoinerg Nov 6, 2018
eb1a94a
pie hovertemplate test %{label}
antoinerg Nov 7, 2018
8214d36
bar support with limited test
antoinerg Nov 7, 2018
bb97abe
add hovertemplate support in histogram
antoinerg Nov 7, 2018
22e3a9d
pie returns default formatted value
antoinerg Nov 8, 2018
377ecba
pass hovertemplate data around in `hoverData` instead of opts
antoinerg Nov 8, 2018
bc6cbab
update Fx.multiHovers to properly massage hoverItem
antoinerg Nov 8, 2018
8c9ba5b
fix lint
antoinerg Nov 8, 2018
c767482
pass `trace` object in Fx.loneHover and Fx.multiHovers for hovertemplate
antoinerg Nov 8, 2018
6d4c03a
extra regex still matches in the presence of newlines
antoinerg Nov 8, 2018
8f440b0
fix jsDocs syntax
antoinerg Nov 12, 2018
0659d20
move regex to outer scope
antoinerg Nov 12, 2018
41ab464
remove old unused commented lines
antoinerg Nov 12, 2018
37e40f9
move regex to outside scope
antoinerg Nov 12, 2018
8e8b75b
move hovertemplate out of global-level plots attributes
antoinerg Nov 12, 2018
2015c57
scatter: do not coerce hovertemplate if hoveron: 'fills'
antoinerg Nov 12, 2018
aef48c0
fix lint
antoinerg Nov 12, 2018
a3058f4
test hovertemplate support for <extra> and pseudo-html
antoinerg Nov 12, 2018
3068d7d
hovertemplate warns user about missing variables up to 10 times
antoinerg Nov 12, 2018
a808883
hovertemplate attribute supports array
antoinerg Nov 12, 2018
522f744
scattergl support for hovertemplate array
antoinerg Nov 12, 2018
c501b44
pie support for hovertemplate array
antoinerg Nov 12, 2018
f89baca
make axes available in eventData to give access to its title
antoinerg Nov 12, 2018
369c9d6
add axis information to eventData only if hovertemplate
antoinerg Nov 12, 2018
8d95f05
axis information is already included in hovertemplate
antoinerg Nov 12, 2018
1e4bd33
pie: test that hovertemplate supports array
antoinerg Nov 13, 2018
61a2da7
list available variables in pie's hovertemplate description
antoinerg Nov 13, 2018
43a4cd9
hovertemplate: do not look into trace object, use fullData instead
antoinerg Nov 13, 2018
70befe3
describe hovertemplate variables for scatter(gl)
antoinerg Nov 13, 2018
b6822e8
describe hovertemplate variables for histogram
antoinerg Nov 13, 2018
59bc981
fix lint
antoinerg Nov 13, 2018
f75f2e0
scatter: test hover event data
antoinerg Nov 13, 2018
0654245
test that event data has correct fields in bar, scatter, histogram
antoinerg Nov 13, 2018
0ecd1c1
bar test: fix hover position to trigger hover events
antoinerg Nov 13, 2018
6f86522
scatter: add `marker.color` to `hovertemplate` available variables
antoinerg Nov 14, 2018
7be804e
one source of truth for event data keys used for doc and test
antoinerg Nov 14, 2018
583eb97
fix lint
antoinerg Nov 14, 2018
14ac99f
scatter: list additionnal variables available in eventData
antoinerg Nov 14, 2018
1caf321
hovertemplate: update desc, do no list attributes that are `arrayOK`
antoinerg Nov 15, 2018
a78600a
fix syntax
antoinerg Nov 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
antoinerg committed Nov 14, 2018
commit 583eb9739fba72b620473b5112577aa808361a75
2 changes: 1 addition & 1 deletion src/traces/bar/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes')
var colorAttributes = require('../../components/colorscale/attributes');
var colorbarAttrs = require('../../components/colorbar/attributes');
var fontAttrs = require('../../plots/font_attributes');
var constants = require('./constants.js')
var constants = require('./constants.js');

var extendFlat = require('../../lib/extend').extendFlat;

Expand Down