|
public paletteSettings: Object = {
palette: [
{ startValue: 0, endValue: 20, minColor: "#FFFFDA", maxColor: "#EDF8B6" },
{
startValue: 20,
endValue: 50,
minColor: "#CAE8B4",
maxColor: "#78D1BD"
},
{
startValue: 50,
endValue: 100,
minColor: "#36BCC6",
maxColor: "#208FC6"
}
]
}; |


|
public jsonCellData: Object = [
{
rowid: "France",
columnid: "2010",
value: "77.6",
smartphones: "20",
laptops: "67"
},
{
rowid: "France",
columnid: "2011",
value: "79.4",
smartphones: "20",
laptops: "67"
}]
dataSource: Object = this.jsonCellData;
dataSourceSettings: Object = {
isJsonData: true,
adaptorType: "Cell",
xDataMapping: "rowid",
yDataMapping: "columnid",
valueMapping: "value"
};
tooltipRender(args) {
var datasource = args.heatmap.dataSource.find(
element => element.rowid == args.xLabel && element.columnid == args.yLabel
);
args.content = [
"smartphones : " +
datasource.smartphones +
" | " +
" laptops :" +
datasource.laptops +
" | Ylablel : " +
args.yLabel +
" | X lablel : " +
args.xLabel +
" : $ " +
(args.value as number) / 10 +
"K"
];
}
|
|
tooltipRender(args) {
var datasource = args.heatmap.dataSource.find(
element => element.rowid == args.xLabel && element.columnid == args.yLabel
);
args.content = [
"SmartPhones " +
" : " +
datasource.smartphones +
"<br/>" +
"Laptops " +
" : " +
datasource.laptops +
"<br/>" +
"YLabel " +
" : " +
args.yLabel +
"<br/>" +
"Value " +
" : " +
(args.value as number) / 10
];
}
|