-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Description
When a custom visual loads more than 30,000 rows, the initial load works correctly. However, after calling host.persistProperties(...), it triggers an update() with VisualUpdateType.Data that correctly indicates more segments are available (dataView.metadata.segment is present). When calling host.fetchMoreData(false), it returns true indicating more data is available, but the update() method is never called again and the remaining data is not loaded.
Expected Behavior
After host.fetchMoreData(false) returns true, the update() method should be called again with the next segment of data, allowing the visual to load all available data iteratively.
Actual Behavior
fetchMoreData(false)returnstrue- No subsequent
update()call is triggered - Data remains incomplete (stuck at initial segment)
Steps to Reproduce
- Create a custom visual with data > 30,000 rows
- Configure
capabilities.jsonwith data reduction algorithm:
{
"dataViewMappings": [{
"table": {
"rows": {
"for": { "in": "values" },
"dataReductionAlgorithm": {
"top": { "count": 30000 }
}
}
}
}]
}- In the visual code, implement the following:
public update(options: VisualUpdateOptions) {
const dataView = options.dataViews?.[0];
if (!dataView) return;
// First load works correctly
this.processData(dataView);
if (dataView.metadata?.segment) {
console.log("Has more segments"); // This logs correctly
const hasMore = this.host.fetchMoreData(false);
console.log("fetchMoreData returned:", hasMore); // Returns true
// rest of the logic
}
}- Call
persistPropertiesafter the data was loaded
// Call persistProperties for any reason
this.host.persistProperties({
merge: [{
objectName: "settings",
selector: null,
properties: { someProperty: "value" }
}]
});This triggers update() again with VisualUpdateType.Data. There is dataView.metadata?.segment and this.host.fetchMoreData(false) returns true, but the update() is not triggered anymore.
Observe that:
- Initial 30,000 rows load successfully
persistProperties()triggersupdate()dataView.metadata.segmentexistsfetchMoreData(false)returnstrue- But
update()is never called again with the next segment
Environment
- Power BI Visual API Version: 5.11.0
- Node Version: v18.20.0
- Operating System: Windows 11
Additional Context
This issue only occurs when:
- Data has multiple segments (> 30,000 rows)
persistProperties()is called- The subsequent
update()attempts to fetch more data
Impact: This prevents visuals from:
- Loading complete datasets when properties need to be saved
- Implementing features that require both data segmentation and property persistence
- Maintaining state while progressively loading large datasets