02-18-2019 04:12 AM - edited 02-18-2019 04:38 AM
I have created a heatmap chart in a B.I. Map in M.App Studio using two attribute columns. The heatmap displays correctly however I would like to add the values that each square in the heatmap represents. Is there a way to do this?
Thanks in advance.
02-21-2019 04:59 AM
There's no direct way in the GUI settings. But there may be a way through some coding. Heatmap is rendered similar to this in the browser:
You need to extract <title> and make it <text> positioned inside the <rect> element of the SVG widget definition. This can be done using e.g. jQuery by firstly finding the chart via its ID ('chart_5vp9' in my sample case) and traversing it down to the <svg ... /> model.
03-13-2019 05:32 AM
I trust you are well.
I am trying to display the heatmap values too, however, when I change the value from title to text the number still is not displayed in the rectangle. here is the jQuery code I tried just as a test on one of the rect elements via chrome developer console $('.box-group').html().replace(/\title/g,'text') which indeed does change the <title> tags to <text> but doesn't display the value in the rectangle. Applying the positioning tag elements(x="39%" y="50%" dominant-baseline="middle" text-anchor="middle") partially solves my problem but wont be a sufficient solution when i apply the JQuery to the entire heatmap..
Do you have any further advice on what i can try?
All inputs or suggestions from the community are welcome.
05-28-2019 12:48 PM
You could try Feature Analyzer. Displaying the heatmap cell value is built into the GUI and can be enabled by clicking the "Include Value in Label" check box of the heatmap measure configruation.
Hope this helps,
Ps. Analyzer and M.App Studio use the same underlying package to render the heatmap chart. The work needed to support this in Analyzer was a little involved as there wasn't a striaght forward way to do it in the charting package.