on 09-04-2017 12:07 PM
I am trying to pre-select a set of data-points in a vizframe column chart once its rendered. I am trying out the fireSelectData method to specify a set of datapoints to be selected. Below is the controller code:
onRender365DaysChartData: function (oEvent) {
//get the reference to the vizframe
var oVizFrameYearly = this.getView().byId("idVizFrame365DaysChart");
var oDataSelect = [{
data: {
Month: "Oct 16",
Day: 13,
Value: 441
}
}];
oVizFrameYearly.fireSelectData(oDataSelect);
},
onSelect365DaysChartData: function (oEvent) {
var viz365ChartDataPreviousSelectionModel = new sap.ui.model.json.JSONModel(oEvent.getParameter('data'));
sap.ui.getCore().setModel(viz365ChartDataPreviousSelectionModel, "viz365ChartDataPreviousSelectionModel");
}
The fireSelectData method is triggering the selectData event of the chart, however oEvent.getParameter('data') in the selectData event handler is returning null. Also the data-points are not styled as selected on the web page.
I am not sure if I am going in the right direction. Is there a way in which we can achieve this manual selection of data-points?
Thanks for any sort of help in advance.
My understanding is that selectData/deselectData is aimed for data point selection performed after chart rendering complete. Try use vizSelection event if you wish to do selection during the initialization:
oVizFrame.attachRenderComplete(function(){
oVizFrame.vizSelection([
{data:{Month: "Oct 16", Day: 13, Value: 441}}
])
})
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.