cancel
Showing results for 
Search instead for 
Did you mean: 

removing nodata from piechart display

former_member200679
Participant
0 Kudos

Hi,

i am unable to remove nodata text when piechart is not displayed(due to no date range selection).

Here is the snapshot of display:

Below is the code used for piechart display in controller.js:

=============================

var oViz = this.byId("piechart");

  //oViz.setNoData("Select Date Range");

  //sap.ui.getCore().byId("piechart").setNoData("Select Date Range");

  var oModel = new sap.ui.model.json.JSONModel({

  'data' : a1

  });

  /*var oTextView=new sap.ui.commons.TextView();

  oTextView.setText("Please select date range to proceed");*/

  var dataset = new sap.viz.ui5.data.FlattenedDataset({

  dimensions : [ {

  axis : 1,

  name : 'Status',

  value : "{Status}",

  } ],

  measures : [ {

  name : 'Total Emp',

  value : "{Scount}",

  } ],

  data : {

  path : "/data"

  }

// , noData : oTextView

  });

  oViz.setDataset(dataset);

  oViz.setModel(oModel);

  }

===================

Please let me know where to make changes in order to display new text instead of noData text.

Thanks,

Saurabh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Abdul_Waheed
Contributor
0 Kudos

1. In FlattenedDataset, there is no property to set no data text like we have in sap.m.ListBase

2. One idea will be to set model with the required text with key value pair in JSON model

FYI

Class sap.viz.ui5 deprecated since version 1.32.0. The chart controls in the sap.viz.ui5 package (which were always marked as experimental) have been deprecated since 1.32.0. They are no longer actively developed and won't receive new features or improvements, only important bug fixes. They will only remain in the SAPUI5 distribution for backward compatibility.