Hoppa till huvudinnehållet

Chart in Map Tip

Kommentarer

1 kommentar

  • Permanently deleted user
    Hi Lisa,

     

    I know this is an older post, but the question came up again today during a training course, and I'd like to provide a complete answer that everyone can access.

     

    This isn't an out of the box option for the HTML5 viewer.  We do have a feature request (GVH-4539) filed for tracking it.  If you're interested, posting it as an idea (https://support.geocortex.com/GSCIdeas?c=09a6000000008RsAAI&filter=1&categ=all&sub-nav=ideas&main-nav=essentials&page=1) would help other users to vote for it as well and might increase its visibility.

     

    There is a workaround that might work, depending on your charts- create a png report that displays the chart, and then include the chart in the feature description for the map tip:
    1. Create report in Report Designer.
    2. Right click the header/footer and remove them.
    3. Drag a Picture control onto the report
    4. For the picture's properties, set the DataField to the ID of the chart you have configured, and the SizeMode to Stretch
    5. In File > Report Settings > Page Setup, change all the margins to 0.  Then click the Printer Settings tab.  Change Paper Size to Custom paper, and enter 1.5 for both the width and height.  You can try different sizes if you like, but this seems like a good approximate size for a map tip.
    6. Save the report.  In Essentials Manager add the report to the layer that has the chart
    7. In the settings for the report in Essentials Manager, change the Output Formats to PNG only
    8. In Essentials Manager, navigate back to edit the layer details
    9. In Feature Description or Feature Long Description (whichever one your viewer uses for Map Tips), include the image tag, which will run the report and generate the image.  Here's my example using the LA County demo site: <img src="http://[servername]/Geocortex/Essentials/REST/sites/LA_County/map/mapservices/Dynamic/layers/15/reports/0/run?outputFormat=Png&where=OBJECTID+%3D+{OBJECTID}&f=file"> http://[servername]/Geocortex/Essentials/REST/sites/LA_County/map/mapservices/Dynamic/layers/15/reports/0 is the path to the report's REST endpoint, which you should replace with your own url.  If you are navigating your site REST endpoint, you can find it from: Map > Layer (that has the chart) > Reports (from the very bottom of the page).  If you have a different capitalization for the layer's objectid (eg, Objectid instead of OBJECTID) you will want to correct that in the image tag as well.
    I've found that reports don't do a good job scaling chart labels when you make Picture control really small like this.  Depending on your chart type and data, you may need to disable them (for a pie chart, Manager > Edit Layer > Charts > Edit Chart > More Options > Show Labels) in order for this to create a useable image.  Again, depending on the chart type and data, you could create a legend image to add to the map tip as well.  This is a workaround rather than a solution so it's definitely not perfect.

     

    _img_ alt="Map Tip chart" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000GsAK&feoid=Body&refid=0EM60000000UkIU" _/_img_

     

    Hope that helps!

     

    Amanda
    0

Du måste logga in om du vill lämna en kommentar.