Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
augustindelaf
Impactful Individual
Impactful Individual

Data mapping and visual update not working

Hi,

I have another problem with the data mapping.
When I drag and drop data fields (three fields), the visual does not update and I do not understand why.

I have drawings which do not depend on the data that have to be displayed and I commented the use of data code in my update method in visual.ts.

 

For my data fields :
I wish to drag and drop one grouping column C1 which will be displayed in a legend and two others columns (C2 and C3) in values datarole) which will be the X,Y values for each row of C1 to be displayed as scatter plot in the visual.

I have this structure in my capabilities.json :

 

 

"dataRoles": [
        {
            "displayName": "Column",
            "name": "column",
            "kind": "Grouping"
        },
        {
            "displayName": "Value",
            "name": "value",
            "kind": "Measure"
        }
    ]
//...
 "dataViewMappings": [
        {
            "table": {
                "rows": {
                    "select": [
                        {
                            "for": {
                                "in": "column"
                            }
                        },
                        {
                            "for": {
                                "in": "value"
                            }
                        }
                    ]
                }
            }
        }
    ]

 

 

 

These are the same as in example from Microsoft documentation and as far as I understand, it seemed be what I need.

Thank in advance.

 

Best regards.

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @augustindelaf,

You can confirm the dataViewMapping looks as expected by checking the raw data for the developer visual, e.g.:

image.png

If the table shown under the visual looks as you might expect, then it is likely to be something in your visual's update method rather than the dataViewMapping. If there's no error handling set up (e.g. using try ... catch) in your update method then visuals often just seem to be doing nothing when they're actually failing at a point you might not expect.

Are you able to share your code (including all of capabilities.json, and package.json if you're using a particular node package) so that I can try and replicate and see where it might be getting stuck?

Thanks!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
dm-p
Super User
Super User

Hi @augustindelaf,

You can confirm the dataViewMapping looks as expected by checking the raw data for the developer visual, e.g.:

image.png

If the table shown under the visual looks as you might expect, then it is likely to be something in your visual's update method rather than the dataViewMapping. If there's no error handling set up (e.g. using try ... catch) in your update method then visuals often just seem to be doing nothing when they're actually failing at a point you might not expect.

Are you able to share your code (including all of capabilities.json, and package.json if you're using a particular node package) so that I can try and replicate and see where it might be getting stuck?

Thanks!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




augustindelaf
Impactful Individual
Impactful Individual

Hi @dm-p,

 

I did not know that the visual silently does not display when an exception is thrown. Thank you very much. 😉

With your advices, I manage to find the issue : it was in my constructor : some test code threw an exception.

 

Best regards.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.