Skip to content
Snippets Groups Projects
Commit 5fecec08 authored by Tom Robinson's avatar Tom Robinson
Browse files

Use series title for y axis labels

parent 9b4b00cc
No related branches found
No related tags found
No related merge requests found
......@@ -324,7 +324,9 @@ export function applyChartYAxis(chart, series, yExtent, axisName) {
axis.label(axis.setting("title_text"), Y_LABEL_PADDING);
} else {
// only use the column name if all in the series are the same
const labels = _.uniq(series.map(s => getFriendlyName(s.data.cols[1])));
const labels = _.uniq(
series.map(single => chart.settings.series(single).title),
);
if (labels.length === 1) {
axis.label(labels[0], Y_LABEL_PADDING);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment