@jonatandor35 const getColor = ( num ) => num > 0 ? ‘green’ : num < 0 ? ‘red’ : ‘black’ ;
$w . onReady (() => {
$w ( ‘#dataset6’ ). onReady (() => {
$w ( ‘#table7’ ). columns = $w ( ‘#table7’ ). columns . map ( e => {
if ( e . dataPath === ‘chg’ ) { e . type = ‘richText’ ;} return e ;});
$w ( ‘#table7’ ). rows = $w ( ‘#table7’ ). rows . map ( e => { e . chg = <p style="color: ${ getColor ( e . chg )} ;"> ${ e . chg } </p> ; return e ;});
})
});
const getColor = ( num ) => num > 0 % ? ‘green’ : num < 0 % ? ‘red’ : ‘black’ ;
$w . onReady (() => {
$w ( ‘#dataset6’ ). onReady (() => {
$w ( ‘#table7’ ). columns = $w ( ‘#table7’ ). columns . map ( e => {
if ( e . dataPath === ‘change’ ) { e . type = ‘richText’ ;} return e ;});
$w ( ‘#table7’ ). rows = $w ( ‘#table7’ ). rows . map ( e => { e . change = <p style="color: ${ getColor ( e . change )} ;"> ${ e . change } </p> ; return e ;});
})
});
const getColor = ( Text ) => text = ‘buy’ ? ‘green’ : text = ‘sell’ ? ‘red’ ;
$w . onReady (() => {
$w ( ‘#dataset9’ ). onReady (() => {
$w ( ‘#table11’ ). columns = $w ( ‘#table11’ ). columns . map ( e => {
if ( e . dataPath === ‘transactiontype’ ) { e . type = ‘richText’ ;} return e ;});
$w ( ‘#table11’ ). rows = $w ( ‘#table11’ ). rows . map ( e => { e . transactiontype = <p style="color: ${ getColor ( e . transactiontype )} ;"> ${ e . transactiontype } </p> ; return e ;});
})
});