Html report

Hi guys

I’m trying to create an html report using js, I want to check a value then change the CSS color. Example

//get data from analytics

If ($(“#bcg”).html.json()) > 50)
{
//change background color for the span bcg to green
}

The point is i want to check if an indicator is in a certain range set the background color of the span/div to say green.

Any help is appreciated
Regards

Ngoni Windows Phone

Dear Ngoni,

I recently developed some standard report similiar to your scenario which displays an RMNCH Score card. It takes the ranges of data (from analytics) and changes the color codes depending on the range.If the increment is more than five or less than five, it shows an UP /down arrow respectively.It compares data for period in question with previous period.

Please find attached example for changing color codes I used.

Alex

ColorChange example.html (0 Bytes)

···

On Sun, Mar 22, 2015 at 2:01 PM, Ngoni Manika nmanika@hotmail.com wrote:

Hi guys

I’m trying to create an html report using js, I want to check a value then change the CSS color. Example

//get data from analytics

If ($(“#bcg”).html.json()) > 50)
{
//change background color for the span bcg to green
}

The point is i want to check if an indicator is in a certain range set the background color of the span/div to say green.

Any help is appreciated
Regards

Ngoni Windows Phone


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET

Kampala

Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don’t want to be anything other than what I have been - one tree hill "