This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch ultraset-nif-44532-2
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/ultraset-nif-44532-2 by this 
push:
     new e44d5a8c622 fix(calendar): pass the subdomain datum to 
positionSubDomainY too
e44d5a8c622 is described below

commit e44d5a8c622463577f34a007727d3e96ff40ea88
Author: Joe Li <[email protected]>
AuthorDate: Thu Sep 24 08:06:53 2026 +0000

    fix(calendar): pass the subdomain datum to positionSubDomainY too
    
    positionSubDomainX now derives a Month/Week cell's column from its index
    within its block, so it takes the whole subdomain datum. positionSubDomainY
    was still passing only the timestamp, which leaves the transposed 'x_*'
    subdomain types broken: they map position.y onto another type's position.x,
    so an x_week subdomain in a month domain would compute a NaN offset. Pass
    the datum through both helpers.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
---
 .../plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/superset-frontend/plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts 
b/superset-frontend/plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts
index fe9253e5d2f..3022f28447f 100644
--- a/superset-frontend/plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts
+++ b/superset-frontend/plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts
@@ -1074,7 +1074,7 @@ var CalHeatMap = function () {
         return self.positionSubDomainX(d);
       })
       .attr('y', function (d) {
-        return self.positionSubDomainY(d.t);
+        return self.positionSubDomainY(d);
       })
       .on('click', function (d) {
         if (options.onClick !== null) {
@@ -1242,7 +1242,7 @@ var CalHeatMap = function () {
           return self.positionSubDomainX(d) + options.cellSize / 2;
         })
         .attr('y', function (d) {
-          return self.positionSubDomainY(d.t) + options.cellSize / 2;
+          return self.positionSubDomainY(d) + options.cellSize / 2;
         })
         .attr('text-anchor', 'middle')
         .attr('dominant-baseline', 'central')
@@ -2233,8 +2233,12 @@ CalHeatMap.prototype = {
   positionSubDomainY: function (d) {
     'use strict';
 
+    // Takes the whole subdomain datum, like positionSubDomainX: the
+    // transposed 'x_*' subdomain types map position.y onto another type's
+    // position.x, which is index-based.
     var index = this._domainType[this.options.subDomain].position.y(
-      new Date(d),
+      new Date(d.t),
+      d.i,
     );
     return index * this.options.cellSize + index * this.options.cellPadding;
   },

Reply via email to