on 10-14-2013 2:14 PM
Hi ,
I am facing some issue when I am trying to display a chart firstly it shows the No Data and after few seconds it shows the chart.
It is showing No Data till the time JsonModel is trying to load data from the Backend.
I found some solution but ie depends on control like button and I don't think so it's useful.
Please have a look.
function chart(){
var line = new sap.viz.ui5.Line(
{
width : "800px",
height : "400px",
plotArea : {
'colorPalette' : d3.scale.category20().range()
},
selectionMode: 'single',
title : {
visible :false,
text : 'Stock Data'
},
dataset : dataset
});
line.setModel(oModel);
line.setBusyIndicatorDelay(0);
var bBusy = dataset.isBusy(); // it shows the loading image on div but no use of that.
line.setBusy(bBusy);
line.placeAt("content");
//Create a button to toggle busy mode
/***** var oBtn2 = new sap.ui.commons.Button({
text : "set loading-mode: on",
press : function() {
var bBusy = !line.isBusy();
bBusy ? oBtn2.setText("set loading-mode: off") : oBtn2.setText("set loading-mode: on")
line.setBusy(bBusy);
}
});
line.placeAt("content"); ********/
}
I would appreciate if somebody would give some suggestion.
This code will help to change the default value of SAPUI5 Chart(Line,Bar,Pie).
var oTextView = new sap.ui.commons.TextView();
oTextView.setText("Please wait, loading data");
var pie = new sap.viz.ui5.Donut(
{
width : "800px",
height : "400px",
plotArea : {
'colorPalette' : d3.scale.category20().range()
},
title : {
visible :false,
text : 'Stock Data'
},
dataset : dataset,
noData : oTextView
});
pie.setModel(oModel);
pie.placeAt("content");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
mabe the "nodata" aggregation is a solution for you?
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.