top of page

Add additional information to tooltip - Area map

By default, in Area Map, tooltip shows limited information like name of country/state and one calculated value. Below script allow us to add more information to tooltip.




widget.on("beforequery", function (se, ev) {
	
	var newJaql = {
		jaql  : {
				//agg:'max', //enable this if you need to display aggreated value
				column: "Region", //Colum name
				datatype: "text",
				dim: "[Records.Region]", //table + column name
				table: "Records", //table name
				title: "Region"
		}
	}
	ev.query.metadata.push(newJaql)
	lastIndex = ev.query.metadata.length - 1	
})

widget.on("render", function (se, args){
	$.each(args.widget.queryResult.$$rows, function(index, value){
		value[1].text = value[1].text + ', Region: ' + value[2].text //replace 'Region' with label you want
	
	})
})



Kommentare

Mit 0 von 5 Sternen bewertet.
Noch keine Ratings

Rating hinzufügen
BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page