You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "deepujain (via GitHub)" <gi...@apache.org> on 2026/09/23 05:26:45 UTC

[PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

deepujain opened a new pull request, #44556:
URL: https://github.com/apache/superset/pull/44556

   ### SUMMARY
   
   Stacked bars on a logarithmic axis can lose visible segments, as reported in #25829. This applies the requested control-panel guard: logarithmic mode disables the Stacked Style selector, and choosing a stacked style hides the logarithmic option. Turning the active setting off makes the other option available again.
   
   A saved chart with both values already set keeps both controls accessible so the user can clear either setting. Its stored configuration and existing rendering are not silently rewritten. The change is limited to the ECharts Bar panel; shared controls, line/area charts and Mixed Timeseries remain unchanged. The logarithmic option uses the panel's visibility mechanism because the shared CheckboxControl does not support a disabled state.
   
   Fixes #25829
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Isolated production SelectControl and CheckboxControl components in Storybook, using the Bar panel configuration. These show the control interaction, not a full Explore page or a database-backed chart.
   
   | Before: stacking selectable with log enabled | After: stacking disabled with log enabled |
   | --- | --- |
   | ![Before](https://raw.githubusercontent.com/deepujain/superset/evidence-25829-stacked-log-controls/before.png) | ![After](https://raw.githubusercontent.com/deepujain/superset/evidence-25829-stacked-log-controls/after.png) |
   
   [Stacked mode](https://raw.githubusercontent.com/deepujain/superset/evidence-25829-stacked-log-controls/stacked.png) and [a saved invalid combination with a recovery path](https://raw.githubusercontent.com/deepujain/superset/evidence-25829-stacked-log-controls/legacy.png).
   
   ### TESTING INSTRUCTIONS
   
   1. In an ECharts Bar chart, enable Logarithmic axis. Stacked Style is disabled; turning logarithmic mode off restores it.
   2. Select Stack. The logarithmic toggle is hidden; clearing stacking restores it. Check horizontal and vertical orientations.
   3. Open a saved chart whose stack and log settings are both enabled. Either setting can be cleared, without trapping the user behind two disabled controls.
   
   Local checks:
   - `jest plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts plugins/plugin-chart-echarts/test/Timeseries/Bar/transformProps.test.ts plugins/plugin-chart-echarts/test/MixedTimeseries/controlPanel.test.ts --runInBand`: 61 tests passed with Node 24.16.0. The five new guard cases fail against the original panel.
   - `npm run plugins:build`: passed, including declaration generation.
   - Staged-file `pre-commit run`: all applicable hooks passed, including frontend type checking.
   - Chromium exercised the real production controls in isolated Storybook for normal, logarithmic, stacked and saved-invalid states, including recovery interactions. Full application E2E and database-backed chart rendering were not run locally.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #25829
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in SIP-59)
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5792546387

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | eb418e31ae9a4268c0c6fc6f7d071d09c71faf61 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ab39e3c7cdda00008980dca |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-44556--superset-docs-preview.netlify.app](https://deploy-preview-44556--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQ0NTU2LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.sbxVfFbMZGhzyFBfXcI_hEmjymIif8u4XtRwGxbYM0w)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcrBDYAgDEDRXXqWhEBUcAPHqC0qEYWAB4xxd_mnf3gvpBzPdMME0MGS8aK9_eqrUL1RVpQb6XAsQtwEVl-aYpdCfGZubsBFW6dpJGaULWONZEL4fg) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-44556--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5791834369

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #44556:
URL: https://github.com/apache/superset/pull/44556


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5789581668

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on code in PR #44556:
URL: https://github.com/apache/superset/pull/44556#discussion_r4098741064


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx:
##########
@@ -246,9 +246,10 @@ function createAxisControl(axis: 'x' | 'y'): ControlSetRow[] {
           label: t('Logarithmic axis'),
           renderTrigger: true,
           default: logAxis,
-          description: t('Logarithmic axis'),
+          description: t('Logarithmic axis is not available for stacked bars'),

Review Comment:
   Addressed in c313d0e0: restored the original description and removed the new translation entry. The stack warning carries the explanation. Current-head checks have completed successfully.



##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts:
##########
@@ -330,3 +334,56 @@ test('x_axis_time_format should be hidden for numeric columns', () => {
     false,
   );
 });
+
+const logControls = config.controlPanelSections
+  .flatMap(section => (section && section.controlSetRows) || [])
+  .flat()
+  .filter(isCustomControlItem)
+  .filter(control => control.name === 'logAxis');
+
+test.each([OrientationType.Vertical, OrientationType.Horizontal])(
+  'prevents logarithmic selection while %s bars are stacked, and restores it when cleared',
+  orientation => {
+    expect(logControls).toHaveLength(2);
+    const state = {
+      controls: {
+        orientation: { value: orientation },
+        stack: { value: StackControlsValue.Stack },
+        logAxis: { value: false },
+      },
+    } as unknown as ControlPanelsContainerProps;
+    expect(
+      logControls.map(control => control.config.visibility!(state, {})),
+    ).toEqual([false, false]);
+    state.controls.stack.value = null;
+    expect(
+      logControls.filter(control => control.config.visibility!(state, {})),
+    ).toHaveLength(1);
+    state.controls.stack.value = StackControlsValue.Stack;
+    state.controls.logAxis.value = true;
+    // A saved chart with both settings must retain a route to turn log mode off.
+    expect(
+      logControls.filter(control => control.config.visibility!(state, {})),
+    ).toHaveLength(1);
+  },
+);
+
+test.each<[boolean, StackControlsValue | null, boolean]>([
+  [true, null, true],
+  [false, null, false],
+  [true, StackControlsValue.Stack, false],
+  [false, StackControlsValue.Stack, false],
+])(
+  'stack control with log=%s and stack=%s is disabled=%s',
+  (logAxis, stack, disabled) => {
+    const state = {
+      controls: { logAxis: { value: logAxis }, stack: { value: stack } },
+    } as unknown as ControlPanelState;
+    expect(
+      config.controlOverrides!.stack!.mapStateToProps!(state, {
+        type: 'SelectControl',
+        value: stack,
+      }),
+    ).toMatchObject({ disabled });

Review Comment:
   Addressed in c313d0e0: the four-row test now also checks that warning is a string with log enabled and null otherwise. Current-head checks have completed successfully.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5795038401

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5806448034

   No change needed here. The identical description is upstream master's original text (controlPanel.tsx line 249), restored verbatim per EnxDev's review note on this PR to drop the new tooltip. The stack interaction it suggests documenting is already surfaced by the stack control's warning text pinned in the test. Closing as pre-existing, reviewer-directed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5792539439

   Good catch on the missing truth-table row (bito review #0c1f7b). Added the missing [false, StackControlsValue.Stack, false] row in eb418e31 and verified all four rows against the mapStateToProps formula (disabled: Boolean(logAxis) && !stack).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5804107826

   Addressed both EnxDev review notes in commit c313d0e0:
   
   1. Tooltip: reverted to the original `t('Logarithmic axis')` description in `controlPanel.tsx` (the `stack` warning carries the explanation now), and dropped the new msgid from `messages.pot`.
   2. Test: `controlPanel.test.ts` now pins the warning text via `toMatchObject({ disabled, warning: logAxis ? expect.any(String) : null })`, verified against the exact `mapStateToProps` formula for all four truth-table rows.
   
   Fresh CI is running on the new head.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5805955926

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5789667213

   Added both new control messages to messages.pot in 32494b9. The new Babel job no longer reports either Bar-control string. Its remaining failure is the pre-existing credential-destination message rename: the same missing/stale pair is present at base 61fffbe0. I verified the patch and base with the pinned Babel 2.17 extractor; no additional message drift is introduced by this change.
   
   The focused 61-test run and staged frontend hooks passed. The public screenshots exercise the production controls in isolated Storybook; they do not claim full application or database-backed chart validation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44556:
URL: https://github.com/apache/superset/pull/44556#issuecomment-5789856649

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44556?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `85.71429%` with `1 line` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 65.97%. Comparing base ([`61fffbe`](https://app.codecov.io/gh/apache/superset/commit/61fffbe0c08f8a3400228cafefd46c641139089f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`32494b9`](https://app.codecov.io/gh/apache/superset/commit/32494b9abd312758078c057f1d72ab85db9362cc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/44556?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...charts/src/Timeseries/Regular/Bar/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/44556?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-echarts%2Fsrc%2FTimeseries%2FRegular%2FBar%2FcontrolPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9SZWd1bGFyL0Jhci9jb250cm9sUGFuZWwudHN4) | 85.71% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/44556?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #44556      +/-   ##
   ==========================================
   - Coverage   66.22%   65.97%   -0.25%     
   ==========================================
     Files        2949     2949              
     Lines      177381   177387       +6     
     Branches    41107    41111       +4     
   ==========================================
   - Hits       117465   117027     -438     
   - Misses      57413    57848     +435     
   - Partials     2503     2512       +9     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.92% <ø> (ø)` | |
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.37% <85.71%> (+<0.01%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.86% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.00% <ø> (-0.48%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/44556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.87% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/44556?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(chart): prevent stacking bars on a logarithmic axis [superset]

Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on code in PR #44556:
URL: https://github.com/apache/superset/pull/44556#discussion_r4087585934


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx:
##########
@@ -246,9 +246,10 @@ function createAxisControl(axis: 'x' | 'y'): ControlSetRow[] {
           label: t('Logarithmic axis'),
           renderTrigger: true,
           default: logAxis,
-          description: t('Logarithmic axis'),
+          description: t('Logarithmic axis is not available for stacked bars'),

Review Comment:
   The checkbox is hidden whenever bars are stacked, so outside the saved stack+log case this tooltip is only seen when log is available, and there it reads as if it isn't.
   
   I'd keep the original description here and let the `stack` warning carry the explanation.
   
   ```suggestion
             description: t('Logarithmic axis'),
   ```
   
   (That also drops the new msgid from `messages.pot`.)



##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts:
##########
@@ -330,3 +334,56 @@ test('x_axis_time_format should be hidden for numeric columns', () => {
     false,
   );
 });
+
+const logControls = config.controlPanelSections
+  .flatMap(section => (section && section.controlSetRows) || [])
+  .flat()
+  .filter(isCustomControlItem)
+  .filter(control => control.name === 'logAxis');
+
+test.each([OrientationType.Vertical, OrientationType.Horizontal])(
+  'prevents logarithmic selection while %s bars are stacked, and restores it when cleared',
+  orientation => {
+    expect(logControls).toHaveLength(2);
+    const state = {
+      controls: {
+        orientation: { value: orientation },
+        stack: { value: StackControlsValue.Stack },
+        logAxis: { value: false },
+      },
+    } as unknown as ControlPanelsContainerProps;
+    expect(
+      logControls.map(control => control.config.visibility!(state, {})),
+    ).toEqual([false, false]);
+    state.controls.stack.value = null;
+    expect(
+      logControls.filter(control => control.config.visibility!(state, {})),
+    ).toHaveLength(1);
+    state.controls.stack.value = StackControlsValue.Stack;
+    state.controls.logAxis.value = true;
+    // A saved chart with both settings must retain a route to turn log mode off.
+    expect(
+      logControls.filter(control => control.config.visibility!(state, {})),
+    ).toHaveLength(1);
+  },
+);
+
+test.each<[boolean, StackControlsValue | null, boolean]>([
+  [true, null, true],
+  [false, null, false],
+  [true, StackControlsValue.Stack, false],
+  [false, StackControlsValue.Stack, false],
+])(
+  'stack control with log=%s and stack=%s is disabled=%s',
+  (logAxis, stack, disabled) => {
+    const state = {
+      controls: { logAxis: { value: logAxis }, stack: { value: stack } },
+    } as unknown as ControlPanelState;
+    expect(
+      config.controlOverrides!.stack!.mapStateToProps!(state, {
+        type: 'SelectControl',
+        value: stack,
+      }),
+    ).toMatchObject({ disabled });

Review Comment:
   Nit, take it or leave it. This only checks `disabled`, but the warning is the one thing telling the user why Stacked Style is greyed out, and nothing fails if it goes missing.
   
   ```suggestion
       ).toMatchObject({
         disabled,
         warning: logAxis ? expect.any(String) : null,
       });
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org