PromucFlow_constructor/app/client/cypress/fixtures/chartCustomSankeyDataDsl.json

85 lines
6.3 KiB
JSON
Raw Normal View History

fix: Correct x and y values returned for Sankey (custom fusion chart) when onDataPointClick is triggered (#26267) ## Description We are adding `rawEventData` property to `onDataPointClick` for the chart widget. Also, when `x` and `y` are not available, we make them `-1`. #### PR fixes following issue(s) Fixes #26026 #### Type of change - Bug fix (non-breaking change which fixes an issue) ## Testing > #### How Has This Been Tested? - [x] Jest #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-08-21 09:30:04 +00:00
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 4896.0,
"snapColumns": 64.0,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0.0,
"bottomRow": 790.0,
"containerStyle": "none",
"snapRows": 124.0,
"parentRowSpace": 1.0,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 85.0,
"minHeight": 1292.0,
"dynamicTriggerPathList": [],
"parentColumnSpace": 1.0,
"dynamicBindingPathList": [],
"leftColumn": 0.0,
"children": [
{
"boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
"mobileBottomRow": 43.0,
"widgetName": "Chart1",
"allowScroll": false,
"dynamicPropertyPathList": [],
"displayName": "Chart",
"iconSVG": "/static/media/icon.8eea39845729f7f4bfadeecd3810a09d.svg",
"searchTags": ["graph", "visuals", "visualisations"],
"topRow": 4.0,
"bottomRow": 79.0,
"parentRowSpace": 10.0,
"type": "CHART_WIDGET",
"hideCard": false,
"mobileRightColumn": 29.0,
"chartData": {
"xne7s065jy": {
"seriesName": "2023",
"data": "[\n {\n \"x\": \"Product1\",\n \"y\": 20000\n },\n {\n \"x\": \"Product2\",\n \"y\": 22000\n },\n {\n \"x\": \"Product3\",\n \"y\": 32000\n }\n]"
}
},
"animateLoading": true,
"fontFamily": "{{appsmith.theme.fontFamily.appFont}}",
"parentColumnSpace": 20.078125,
"dynamicTriggerPathList": [{ "key": "onDataPointClick" }],
"leftColumn": 0.0,
"dynamicBindingPathList": [
{ "key": "borderRadius" },
{ "key": "boxShadow" },
{ "key": "accentColor" },
{ "key": "fontFamily" }
],
"customFusionChartConfig": "{\n \"type\": \"sankey\",\n \"dataSource\": {\n \"nodes\": [\n {\n \"label\": \"Netherlands\"\n },\n {\n \"label\": \"Canada\"\n },\n {\n \"label\": \"Belgium\"\n },\n {\n \"label\": \"Italy\"\n },\n {\n \"label\": \"Mexico\"\n },\n {\n \"label\": \"Russia\"\n },\n {\n \"label\": \"Spain\"\n },\n {\n \"label\": \"South Korea\"\n },\n {\n \"label\": \"Germany\"\n },\n {\n \"label\": \"China\"\n },\n {\n \"label\": \"European Union\"\n },\n {\n \"label\": \"Japan\"\n },\n {\n \"label\": \"United Kingdom\"\n },\n {\n \"label\": \"United States\"\n },\n {\n \"label\": \"France\"\n },\n {\n \"label\": \"Hong Kong\"\n },\n {\n \"label\": \"Switzerland\"\n },\n {\n \"label\": \"Austria\"\n },\n {\n \"label\": \"Sweden\"\n }\n ],\n \"links\": [\n {\n \"from\": \"Netherlands\",\n \"to\": \"European Union\",\n \"value\": 798744\n },\n {\n \"from\": \"Germany\",\n \"to\": \"European Union\",\n \"value\": 1468990\n },\n {\n \"from\": \"European Union\",\n \"to\": \"France\",\n \"value\": 745931\n },\n {\n \"from\": \"European Union\",\n \"to\": \"United States\",\n \"value\": 660541\n },\n {\n \"from\": \"Canada\",\n \"to\": \"United States\",\n \"value\": 594546\n },\n {\n \"from\": \"Belgium\",\n \"to\": \"European Union\",\n \"value\": 628796\n },\n {\n \"from\": \"China\",\n \"to\": \"Hong Kong\",\n \"value\": 400571\n },\n {\n \"from\": \"China\",\n \"to\": \"United States\",\n \"value\": 526454\n },\n {\n \"from\": \"European Union\",\n \"to\": \"United Kingdom\",\n \"value\": 520318\n },\n {\n \"from\": \"China\",\n \"to\": \"European Union\",\n \"value\": 560536\n },\n {\n \"from\": \"Italy\",\n \"to\": \"European Union\",\n \"value\": 539556\n },\n {\n \"from\": \"Mexico\",\n \"to\": \"United States\",\n \"value\": 492715\n },\n {\n \"from\": \"Russia\",\n \"to\": \"European Union\",\n \"value\": 385778\n },\n {\n \"from\": \"Spain\",\n \"to\": \"European Union\",\n \"value\": 365191\n },\n {\n \"from\": \"China\",\n \"to\": \"Japan\",\n \"value\": 312062\n },\n {\n \"from\": \"European Union\",\n \"to\": \"Switzerland\",\n \"value\": 328609\n },\n {\n \"from\": \"South Korea\",\n \"to\": \"China\",\n \"value\": 229073\n },\n {\n \"from\": \"European Union\",\n \"to\": \"Austria\",\n \"value\": 244913\n },\n {\n \"from\": \"Japan\",\n \"to\": \"United States\",\n \"value\": 206091\n },\n {\n \"from\": \"European Union\",\n \"to\": \"Sweden\",\n \"value\": 204849\n },\n {\n \"from\": \"Germany\",\n \"to\": \"United States\",\n \"value\": 184287\n }\n ],\n \"chart\": {\n \"caption\": \"Immigrant Flow for Last Month (In Millions)\",\n \"legendPosition\": \"bottom\",\n \"linkcolor\": \"blend\",\n \"theme\": \"fusion\"\n }\n }\n}",
"onDataPointClick": "",
"showDataPointLabel": false,
"key": "8qdt18v5ny",
"isDeprecated": false,
"rightColumn": 64.0,
"widgetId": "1jj1ihohlk",
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
"minWidth": 450.0,
"isVisible": true,
"version": 1.0,
"parentId": "0",
"labelOrientation": "auto",
"tags": ["Display"],
"renderMode": "CANVAS",
"isLoading": false,
"mobileTopRow": 11.0,
"responsiveBehavior": "fill",
"yAxisName": "Revenue($)",
"originalTopRow": 68.0,
"chartName": "Sales Report",
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
"mobileLeftColumn": 5.0,
"xAxisName": "Product Line",
"originalBottomRow": 100.0,
"chartType": "CUSTOM_FUSION_CHART"
}
]
}
}