From 529ca27e4e33b6f159757cd5a6ee467afba29dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 7 Aug 2024 17:25:45 +0200 Subject: [PATCH] Convert to string the action key when the type of x axis is date or datetime Closes #13440 (grafted from 937d9588e1e5b4e538cbbea097104e748b356a0e) --HG-- branch : 7.0 --- sao/src/view/graph.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sao/src/view/graph.js b/sao/src/view/graph.js index de3bff87be..4be933f77f 100644 --- a/sao/src/view/graph.js +++ b/sao/src/view/graph.js @@ -248,7 +248,15 @@ }, ctx, false); }, _action_key: function(data) { - return data.x; + var x = data.x; + var type = this.view.screen.model.fields[this.xfield.name] + .description.type; + if (x && (type == 'datetime')) { + x = Sao.DateTime(x).toString(); + } else if (x && (type == 'date')) { + x = Sao.Date(x).toString(); + } + return x; } });