Skip to Content

sap.viz.ui5 charts: Warning/Alert (Limit) values

Hello Colleagues,

we are developing an application which contains a number of charts. Our data is retrieved via an OData service and currently our initial screen is as per the attached image writeOffChart1.

The code used to produce the chart looks like this:

//Data from OData Service for Chart display var oModel2 = new sap.ui.model.json.JSONModel(); var url2 = "/sap/opu/odata/sap/Z_WRITEOFF_001_SRV/wo_itemSet"; oModel2.loadData(url2,"",false); var dataset2 = new{

dimensions : [ {

axis : 1,

name : 'Abdat',

value : "{Abdat}"

} ],

measures : [ {

name : 'SumAmount',

value : '{SumAmount}',


data : {

path : "/d/results"



var chart = this.getView().byId('writeOffChart'); chart.setDataset(dataset2); chart.setModel(oModel2);

The requirement is to produce a screen as shown in the second attachment writeOffChart2.

Our questions are:

  • Is it possible to add 'alert/warning' lines to the chart? (Or do we need to use a different type of chart, say, Combination and generate the lines from a separate data-set)
  • Can the individual bars be coloured according to their status with respect to a pre-determined alert level (as shown in the second attachment)?
  • Is there a control which can be used to dynamically set the Warning and Alert levels, for example could a slider be used? Or is there a recommended way to achieve this?

We've looked thorough many examples and searched scn and read lots of documentation but we haven't found a particular example that is similar to ours.

I should also add that SAPUI5 and Fiori are relatively new topics for us, but any assistance would be gratefully received.

Kind regards,

Keith Sanderson

writeOffChart2.jpg (331.8 kB)
writeOffChart1.jpg (232.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2014 at 10:31 AM


    I am also facing the same kind of problem.

    I want some other colors or some alert/ blink in my one data line if exceeding value of another data line..

    Can anyone plzz help me out?

    Thanks & regards

    Snigdha Surabhi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.