Skip to Content

is it possible to set css by script in sap design studio?

As follow picture,I want the bubble color auto changed by data,eg:if the value>0 the color red,else the color blue.

I've use follow code to get data,but if I follow like this,all of bubble will red or blue,not like I want just value less than 0.

How can I do to make it realize?Just the value greater than 0 will red,and others blue?

var va=DS_1.getMembers("ZCQYF", 2000);
va.forEach(function(element, index) {
var v=DS_1.getData("OVERDUE_TTL", {"ZCQYF": element.internalKey}).value;
LISTBOX_1.addItem(v+"", v+"");
 }else if(v<0){

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 27, 2016 at 08:18 AM

    Hi jing,

    How are you using Geo or Leaflet Map??

    If leaflet map, Please refer the below URL,



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Vidhya.

      I'm use Geo Map.I've view the url that you recommend ,but I still like use Geo Map,which bubble maybe more suit to my situation.



  • Dec 27, 2016 at 12:42 PM

    Hi Jing,

    The scenario you have documented is confusing. It appears that you would like to dynamically change the bubble colours in a geo map via CSS yet your script example is changing the CSS applied to a List Box. Can you clarify?



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Mustafa.

      Maybe I'm not express clear.

      I want to realize a situation in geomap that when the data less than 0,then "red",else "blue".Above code is just an eg to show that is a way to realize color according to data.But if I use geomap,I can't use html,so whether there have another way to realize color changed by data?

      Thanks .