Skip to content

Commit

Permalink
fix: use level instead of y label in verbose mode for stacked bar (#517)
Browse files Browse the repository at this point in the history
fixes #515
  • Loading branch information
ellvix authored Aug 10, 2024
1 parent 58f33c4 commit 1363d5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,16 +540,17 @@ class Display {
constants.chartType == 'stacked_normalized_bar' ||
constants.chartType == 'dodged_bar'
) {
// {legend x} is {colname x}, {legend y} is {colname y}, value is {plotData[x][y]}
// {legend x} is {colname x}, level is {colname y}, {legend y} is {plotData[x][y]}
if (plot.plotLegend) {
verboseText += plot.plotLegend.x + ' is ';
}
verboseText += plot.level[position.x] + ', ';
verboseText += 'level is ' + plot.fill[position.y] + ', ';

if (plot.plotLegend) {
verboseText += plot.plotLegend.y + ' is ';
}
verboseText += plot.fill[position.y] + ', ';
verboseText += 'value is ' + plot.plotData[position.x][position.y];
verboseText += plot.plotData[position.x][position.y];

// navigation == 1 ? {colname x} : {colname y} is {plotData[x][y]}
if (constants.navigation == 1) {
Expand Down

0 comments on commit 1363d5c

Please sign in to comment.