mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[TSVB] Y-axis has number formatting not considering all series formatters in the group (#83438)
* [TSVB] Y-axis has number formatting not considering all series formatters in the group * Replace check for percent with a check for same formatters in common * Remove unnecessary series check
This commit is contained in:
parent
00c0535946
commit
957882a479
1 changed files with 5 additions and 1 deletions
|
@ -161,6 +161,10 @@ export class TimeseriesVisualization extends Component {
|
|||
const yAxis = [];
|
||||
let mainDomainAdded = false;
|
||||
|
||||
const allSeriesHaveSameFormatters = seriesModel.every(
|
||||
(seriesGroup) => seriesGroup.formatter === seriesModel[0].formatter
|
||||
);
|
||||
|
||||
this.showToastNotification = null;
|
||||
|
||||
seriesModel.forEach((seriesGroup) => {
|
||||
|
@ -211,7 +215,7 @@ export class TimeseriesVisualization extends Component {
|
|||
});
|
||||
} else if (!mainDomainAdded) {
|
||||
TimeseriesVisualization.addYAxis(yAxis, {
|
||||
tickFormatter: series.length === 1 ? undefined : (val) => val,
|
||||
tickFormatter: allSeriesHaveSameFormatters ? seriesGroupTickFormatter : (val) => val,
|
||||
id: yAxisIdGenerator('main'),
|
||||
groupId: mainAxisGroupId,
|
||||
position: model.axis_position,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue