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

   ### SUMMARY
   This PR implements the feature requested in Issue #35891. It adds axis 
configuration options to the trendline in the Big Number chart, addressing the 
current lack of context around the data's timeframe and value range.
   
   New Configuration Options
   - Show X Axis / Show Y Axis: Toggles to control the visibility of each axis.
   - Show Min/Max Axis Labels: Toggles to control the visibility of labels for 
the minimum and maximum values on both the X and Y axes.
   
   Technical Details
   - The implementation extends the existing BigNumberWithTrendline chart by 
adding new properties to its control configuration and props interface.
   - The chart's transformProps function was modified to pass the new settings 
to the underlying trendline visualization component.
   - The existing number and date formatting utilities are used for the axis 
labels. The Y-axis labels inherit the main metric's number format, and the 
X-axis labels use the existing date format settings applied to the time column.
   
   Testing
   - Manually tested all new configuration options in various combinations to 
ensure they work correctly and do not conflict with existing settings.
   - Verified that the chart behaves correctly when axes are hidden.
   - Confirmed that the min/max labels accurately reflect the dataset.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   BEFORE
   <img width="1611" height="778" alt="image" 
src="https://github.com/user-attachments/assets/8acc3d8d-10ac-4d0e-8273-735d71beb9d5";
 />
   
   AFTER
   <img width="1614" height="788" alt="image" 
src="https://github.com/user-attachments/assets/b9f91548-8469-45ac-ba13-d8f41059a724";
 />
   
   
   ### TESTING INSTRUCTIONS
   1. Create or edit a "Big Number with Trendline" chart.
   2. In the "Customize" tab, scroll to find the new Axis sections.
   3. Test Axis Visibility:
      - Enable "Show X Axis" and "Show Y Axis". The chart should now display 
both axes. 
      - Toggle the settings off and on to ensure the axes correctly appear and 
disappear.
   4. Test Min/Max Labels:
      - Enable the "Show Min/Max Axis Labels" option.
      - Verify that the Y-axis shows labels for the smallest and largest values.
      - Verify that the X-axis shows labels for the start and end of the period.
   5. Test Formatting Consistency:
      - Change the number format for the main metric (e.g., to a currency). The 
Y-axis min/max labels should reflect this new format.
      - Change the date format for the time column. The X-axis min/max labels 
should update to the new date format.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: #35891 
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to