We have the need to relabel the Y axis labels. Adding category support to the Y axis appears to be the way to do this.

I request the ability to add categories to the Y axis.

Comments

John Cook created an issue. See original summary.

john cook’s picture

I had to use a custom chart to test this as the categories are for each integer and the example chart has too large a range for this option. It is possible to set labels for specific values but they are not necessarily going to be displayed on the chart - maybe work on #2945776: Add Y-Axis Tick options would help with this.

The custom chart has the following setting:

$chart['#options']['yaxis_categories'] = [1 => 'Level 1', 'Level 2', 'Level 3'];

The patch adds settings for the categories to the Yaxis

Before:

After:

john cook’s picture

Status: Active » Needs review

andileco’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.