Hi All,
We are using vizFrame to display a chart. The chart has 4 measures ms1, ms2, ms3 and ms4.
However, not all of them need to be displayed. Based on the checkboxes that user selects, we want to switch ON / OFF a particular measure from the graph.
For this we are using the following statement in the controller on Checkbox Press:-
var yaxis = '["ms1", "ms3"]'; <- This variable is updated based on checkboxes selected
var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "valueAxis",
'type': "Measure",
'values': [yaxis]
}),
Issue :-
We get an error message ""Failed to update chart 50014 : Feed "ms1 , ms3" could not accept more containers.
Looks like it expects the actual measures to be mentioned in the 'values' property and not a variable name.
Any idea on how to specify values to the FeedItem through a variable name ?
Note - When we write the following lines of code then everything seems to work fine, but it doesn't serve our purpose :-
var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "valueAxis",
'type': "Measure",
'values': ["ms1", "ms3"]
}),
Thanks,
Ashish
just build the yaxis as an array (instead of a String like what you have now) and pass it as 'values' property directly
var yaxis = ["ms1", "ms3"]; // <- Array is updated based on checkboxes selected
var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "valueAxis",
'type': "Measure",
'values': yaxis
})
Add a comment