Dynamic style settings
Add dynamic className to cell with styleCallback property.
index.columns and index.rows are delivered in json format.
var styleCallback = function(pivot, index, value){
if (index.rows["Country"] === "Domestic" && index.rows["Brand Name"] === "Kia" && index.valueField === "Vehicle Price") {
var st = 'background';
if (value < 10000) {
st += '-low';
} else if (value > 50000) {
st += '-high';
}
return st;
}
};
pivot.setDisplayOptions({styleCallback: styleCallback});
pivot.drawView();