You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a bug in the options.type (from the VisualUpdateOptions object) passed to the update function of the IVisual class.
While implementing logic to handle different update types using the VisualUpdateType flags (#422 (comment)), I noticed inconsistent behavior, especially when changing styles.
First change: The console logs a formatting sub-selection change update event, as expected.
Subsequent changes: The console logs a data update event, which seems incorrect.
Expected Behavior:
The event returned in options.type should consistently reflect the change as formatting sub-selection change update for all style modifications, instead of switching to data update.
@luizzappa That's strange. I copied your code and I'm getting only data update.
Also, when I toggle "General -> Title" setting it's also adding/removing a title, which causes the visual to shift/resize. It also shows data update and Resize/Resize End, which sounds logical.
I tested this by cloning the example repository for the Circle Card visual and noticed that, for the behavior in question to occur, the following options in capabilities.json need to be enabled:
I have a question regarding how the visual's update API works. Perhaps I misunderstood, but I would like to confirm:
Is an update to a visual property (such as changing a color) always treated as a "Data" update? Is it not possible to distinguish between an update involving adding/removing columns/measures from the visual and a change to properties only?
Context of my use case
I am using the fetch more data API, but data loading is quite slow, taking around 30 seconds. Currently, whenever a user changes a property of the visual — such as a color or another layout configuration — the visual reloads all the data, which makes customizing layout settings very cumbersome for the end user.
I expected to use the VisualUpdateType values (such as Style or FormattingSubSelectionChange) to distinguish between:
Updates related to the formatting/style of the visual (e.g., color or size changes)
Issue Description:
There seems to be a bug in the
options.type
(from theVisualUpdateOptions
object) passed to theupdate
function of theIVisual
class.While implementing logic to handle different update types using the
VisualUpdateType
flags (#422 (comment)), I noticed inconsistent behavior, especially when changing styles.Steps to Reproduce:
Implement the following update function:
Change any style in the visual:
formatting sub-selection change
update event, as expected.data update event
, which seems incorrect.Expected Behavior:
The event returned in
options.type
should consistently reflect the change as formatting sub-selection change update for all style modifications, instead of switching to data update.Environment:
SDK Version: 5.11.0
Browser/Platform: Edge/Windows 11
The text was updated successfully, but these errors were encountered: