plotly / plotly/plotly.js

add title parameter for the angular axis of polar charts

Open
#6,332 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

As the title says, the title of the angular axis can't be changed or set as a parameter. I can change the radial axis title, but not the angular one. There is also no parameter in the documentation https://plotly.com/python/reference/layout/polar/#layout-polar-angularaxis. The code for the redefinition of my chart is below.

chart_result.update_layout(
        polar = dict(
            sector=[0, 180],
            angularaxis=dict(
                #thetaunit = "degrees",
                dtick=10,
                #rotation=270,
                direction="counterclockwise",
                #tickmode="array",
                tickvals=list_angular_ticks,
                ticktext=list_angular_labels,
            ),
        ),
        height=600
    )
    
    chart_result.update_polars(
        radialaxis_title_text='Normalized STD',
    )

I also have a proposal for the placement of the title. As seen in the code below, I will only consider the upper half of a circle. Therefore, the title could be placed in the middle - at 90 degrees (above the tick labels). This is also valid if we have, for example, only one quadrant (0-90). In that case, the label should be placed above 45 degrees tick label. An example can be seen below. This logic also works for other domains.
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 with the angularaxis configuration and the polar-chart reference documentation at the linked layout/polar/angularaxis page. Define how an angular-axis title should be exposed and positioned for sectors such as 0–180 and 0–90, then verify that the title can be set alongside the existing radial-axis title and that the documentation describes the parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.