cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
augustindelaf Skilled Sharer
Skilled Sharer

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

Accepted Solutions
Super User I
Super User I

Re: Data mapping and visual update not working

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!




View solution in original post

2 REPLIES 2
Super User I
Super User I

Re: Data mapping and visual update not working

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!




View solution in original post

augustindelaf Skilled Sharer
Skilled Sharer

Re: Data mapping and visual update not working

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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications