Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rbartley
Specialist II
Specialist II

applyPatches invalid parameters

Hi all,

I'm getting an invalid parameter error when trying to use applyPatches on a barchart to change the orientation

 

The current properties are:

 

 

 

{
  "qInfo": {
    "qId": "sBJftb",
    "qType": "barchart"
  },
...
  "orientation": "vertical",
  "scrollStartPos": 0,
...
 
  "visualization": "barchart",
  "masterVersion": 0.96
}

 

 

 

 

And I'm using 

 

 

 

app.visualization.get(vizID).then(viz => {
			model=viz.model;
			model.applyPatches( [{
			  qPath: '/layout/orientation',
			  qOp: 'replace',
			  qValue: 'horizontal'
			}], false );
		})

 

 

 

 

I've tried qPath without the 'layout'  and without the forward slashes, but I always get the same response.  Any ideas?  

Cheers,

 

Richard

 

 

Labels (1)
1 Solution

Accepted Solutions
rbartley
Specialist II
Specialist II
Author

I managed to solve this by using vis.setOptions instead:

 

app.visualization.get(vizID).then(viz => {
    		viz.setOptions({orientation:"horizontal"});
			
		})

 

Perhaps applyPatches cannot be used for this purpose.

View solution in original post

1 Reply
rbartley
Specialist II
Specialist II
Author

I managed to solve this by using vis.setOptions instead:

 

app.visualization.get(vizID).then(viz => {
    		viz.setOptions({orientation:"horizontal"});
			
		})

 

Perhaps applyPatches cannot be used for this purpose.