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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!


My course: Introduction to Developing Power BI Visuals


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!


My course: Introduction to Developing Power BI Visuals


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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.