PromucFlow_constructor/app/client/src
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
..
actions fix: remove redundant eval trigger (#36764) 2024-10-10 16:32:53 +05:30
api chore: decouple widget-config.json from main chunk (#36924) 2024-10-17 20:48:39 +05:30
assets chore: Update JS Editor Run designs (#36998) 2024-10-23 06:47:20 +00:00
ce feat: Update TableWidgetV2 to include customIsLoading property (#36857) 2024-10-22 14:51:45 +05:30
components chore: Updating plugin action name editor component to use ADS text component (#36960) 2024-10-18 19:07:50 +05:30
constants chore: Split library side pane for adding package control section (#36926) 2024-10-22 10:48:03 +05:30
Datasource/components chore: reconnect ds detached from datasource editor part 1 (#35907) 2024-09-02 11:26:34 +05:30
ee chore: Split library side pane for adding package control section (#36926) 2024-10-22 10:48:03 +05:30
enterprise
entities chore: Split library side pane for adding package control section (#36926) 2024-10-22 10:48:03 +05:30
globalStyles
icons chore:delete unused files (#36368) 2024-09-19 16:01:03 +03:00
IDE chore: Update JS Editor Run designs (#36998) 2024-10-23 06:47:20 +00:00
layoutSystems chore: decouple widget-config.json from main chunk (#36924) 2024-10-17 20:48:39 +05:30
mockResponses
mocks chore: delete unused code (#36461) 2024-09-23 13:52:00 +03:00
modules/ui-builder/ui/wds chore: move chat widget to EE repo (#36845) 2024-10-14 13:10:28 +03:00
navigation chore: Split library side pane for adding package control section (#36926) 2024-10-22 10:48:03 +05:30
pages chore: Update JS Editor Run designs (#36998) 2024-10-23 06:47:20 +00:00
PluginActionEditor chore: Update JS Editor Run designs (#36998) 2024-10-23 06:47:20 +00:00
plugins/Linting chore: add telemetry for current linter (#36417) 2024-09-20 11:59:08 +08:00
polyfills chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
reducers chore: Migrate sub components into Plugin Action Editor (#36844) 2024-10-16 18:29:10 +05:30
reflow chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
sagas chore: Migrate sub components into Plugin Action Editor (#36844) 2024-10-16 18:29:10 +05:30
selectors feat: adding branch persistence (#36622) 2024-10-14 19:04:16 +08:00
templates
theme
UITelemetry chore: cache dependencyMap computation on client (#35965) 2024-10-15 21:05:39 +05:30
usagePulse chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
utils chore: decouple widget-config.json from main chunk (#36924) 2024-10-17 20:48:39 +05:30
WidgetProvider chore: move wds widgets to modules (#36511) 2024-09-24 18:04:02 +02:00
WidgetQueryGenerators chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
widgets fix: Refactor handling of empty chart data in ChartWidget (#37009) 2024-10-23 14:03:46 +05:30
workers chore: cache dependencyMap computation on client (#35965) 2024-10-15 21:05:39 +05:30
App.css
AppErrorBoundry.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
config.d.ts
Globals.d.ts
index.css
index.tsx chore: heartbeat code removed (#36837) 2024-10-15 13:31:22 +05:30
LandingScreen.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
preload-route-chunks.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
react-app-env.d.ts
RouteChangeListener.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
serviceWorker.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
store.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
wdyr.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00