OLa,
Que codigo implementar para que as colunas dentro dos quadro vermelho fiquem de uma determinada cor, como tambem quando os valores das colunas na cor amarela estiverem diferentes.
Hello,
Thank you for contacting us.
If you want to change the background color of a specific measure, you can use the customizeCell feature. For example,
let pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
customizeCell: customizeCellFunction,
// other configs
});
function customizeCellFunction(cell, data) {
if (
data &&
data.measure &&
data.type == "value" &&
data.measure.name == "originalQty" // measure name
) {
cell.addClass("highlighted-static")
}
}
Then, add the necessary CSS rules:
#fm-pivot-view .fm-grid-view div.fm-cell.highlighted-static {
background-color: #FFB8B8 !important;
}
To highlight the values, when two measures are not equal, you can use the Conditional Formatting feature:
report: {
// other properties
conditions: [
{
measure: "qty",
formula: "sum('qty') != sum('originalQty')",
format: {
backgroundColor: "#ffee8c",
},
},
],
}
You are welcome to check the following example for reference: https://jsfiddle.net/flexmonster/t1juws54/.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia