plotly / plotly/plotly.R

Hover text do not show up if values does not exist in BOTH facet category

Open
#693 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

ggplotly
Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

Hover text exists in blue block

image

Hover text does not exist in either green or torquise block
image

Can't share the source data but what's happening is something like below:
Facility,ProductSubFamily,Measure,Qty
A,x,Commit,0.2
A,y,Request,0.9
A,d,Commit,0.8
A,d,Request,0.5
A,e,Commit,0.7
A,e,Request,0.3
...

        ggplot(data = dat,aes(x=Measure ,y=Quantity,fill = ProductSubFamily)) +
        geom_bar(stat = 'identity')+
        facet_grid(.~Facility,  space = "free", labeller = label_value,switch = 'both')+
        theme_bw()+
        theme(
          panel.grid.major.x = element_blank(),
          panel.border = element_blank(),
          legend.position='bottom',
          legend.title=element_blank(),
          axis.text.x=element_text(angle=30, hjust=1)
        )+
        scale_y_continuous(labels = percent)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied ggplot example with equivalent facet data, focusing on the green and turquoise blocks where values are absent in one facet category. Trace how the interactive chart derives hover text for faceted bars. Done means hover text appears consistently for those blocks as it does for the blue block.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.