Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.