PromucFlow_constructor/app
Rahul Barwal ccb0c9c32a
fix: Refactor handling of empty chart data in ChartWidget (#37009)
## Description
* This pull request handles empty chart dAata more efficiently. 
* lso updates tests to ensure this is not overlooked again.

These changes ensure that the ChartWidget can handle scenarios where the
chart data is null or undefined, and that the tests accurately reflect
this behavior.


Fixes #37008
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Chart"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11473049534>
> Commit: 08602d3a0658b1753d4d377ce9673379ab234d3f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11473049534&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Chart`
> Spec:
> <hr>Wed, 23 Oct 2024 04:52:48 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved data handling in the ChartWidget to prevent runtime errors
when chart data is undefined.
  
- **Tests**
- Added a new test case to verify the behavior of the emptyChartData
function when series data is null or undefined, enhancing test coverage.

- **Documentation**
- Updated interface to include an optional property for handling data
point clicks in the ChartWidget.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-23 14:03:46 +05:30
..
client fix: Refactor handling of empty chart data in ChartWidget (#37009) 2024-10-23 14:03:46 +05:30
server chore: Add spans attributes for no of lines and action count (#37001) 2024-10-22 14:22:29 +05:30
util chore: Revert "chore: delete redundant files" (#35022) 2024-07-18 16:18:10 +05:30