plotly / plotly/plotly.py

Parcats not support displaying the category name

Open
#4,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Summary of the issue: You wanted to display the category name on hover in a go.Parcats plot using Plotly for Python. We tried using the hoverinfo and hovertemplate parameters to achieve this, but these parameters do not support displaying the category name. Currently, it seems that it is not possible to directly display the category name on hover in a go.Parcats plot using Plotly for Python.

Report: Dear Plotly Developers,

I recently encountered an issue while creating a go.Parcats plot using Plotly for Python. I wanted to display the category name on hover, but I found that this functionality does not seem to be possible.

I tried using the hoverinfo and hovertemplate parameters to achieve this, but these parameters do not support displaying the category name. Upon further investigation, I found that it is currently not possible to directly display the category name on hover in a go.Parcats plot using Plotly for Python.

I believe this is an important feature that would help users better understand the data in the plot. Therefore, I strongly suggest that you consider adjusting this issue to support displaying the category name on hover in future versions.

Thank you for your attention to this matter and I look forward to your response.

import plotly.graph_objs as go
from plotly.offline import iplot

# Create a trace for the parcats plot
parcats = go.Parcats(
    dimensions=[
        {'label': 'Category A',
         'values': ['A1', 'A2', 'A3']},
        {'label': 'Category B',
         'values': ['B1', 'B2', 'B3']}
    ],
    hovertemplate='%{dimension.label}'
)

# Create the layout
layout = go.Layout(
    title='Parcats Plot with Hover Text'
)

# Create the figure
fig = go.Figure(data=[parcats], layout=layout)

# Show the plot
iplot(fig)

image image

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 running the provided Python go.Parcats example and compare the current hover output with the requested category name. Trace how Parcats handles hovertemplate and dimension labels, then verify that category names appear on hover without breaking the existing hover content.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.