Hexagon Geospatial
MENU

Smart M.App

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 33
Registered: ‎02-02-2018

Displaying values in a heatmap chart - M.App Studio

[ Edited ]

Hi All,

 

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.

Nastassia

Technical Evangelist
Posts: 1,119
Registered: ‎09-11-2015

Re: Displaying values in a heatmap chart - M.App Studio

Hi Nastassia,

 

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:

Capture.PNG

 

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.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 24
Registered: ‎05-16-2018

Re: Displaying values in a heatmap chart - M.App Studio

Hi Jan,

 

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.

 

Kind regards,

Marlin    

 

  

Staff
Posts: 13
Registered: ‎04-04-2018

Re: Displaying values in a heatmap chart - M.App Studio

Hi Marlin,

 

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,

 

Dave

 

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.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.