Date histogram timestamps on daily are getting displayed as epoch times (#85565)

* Add formattedkey so that we can use it in tooltip

* Fixed remarks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Uladzislau Lasitsa 2020-12-17 10:38:03 +03:00 committed by GitHub
parent 6671cf3c22
commit 25548bbae4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -41,7 +41,7 @@ export interface Point {
table: Table;
column: number;
row: number;
value: number;
value: string;
title: string;
};
parent: Aspect | null;
@ -94,7 +94,7 @@ export function getPoint(
table: table.$parent.table,
column: table.$parent.column,
row: table.$parent.row,
value: table.$parent.key,
value: table.$parent.formattedKey,
title: table.$parent.name,
},
parent: series ? series[0] : null,

View file

@ -34,14 +34,16 @@ function tableResponseHandler(table, dimensions) {
table.rows.forEach((row, rowIndex) => {
const splitValue = row[splitColumn.id];
const formattedValue = splitColumnFormatter.convert(splitValue);
if (!splitMap.hasOwnProperty(splitValue)) {
splitMap[splitValue] = splitIndex++;
const tableGroup = {
$parent: converted,
title: `${splitColumnFormatter.convert(splitValue)}: ${splitColumn.name}`,
title: `${formattedValue}: ${splitColumn.name}`,
name: splitColumn.name,
key: splitValue,
formattedKey: formattedValue,
column: splitColumnIndex,
row: rowIndex,
table,

View file

@ -33,6 +33,7 @@ export interface TableParent {
column: number;
row: number;
key: number;
formattedKey: string;
name: string;
}
export interface Table {